Archive for December 2nd, 2011

Cpanel/WHM: License expired error

If “License expired” error is encountered while accessing the cpanel/whm, it can be fixed by following below mentioned steps: 1. Check whether the license is expired. This is the most obvious cause and simple to verify. Access the URL ‘http://verify.cpanel.net/’ and check the IP of the server. 2. If it is “active”, Run the following command:   $ […]

Basics Of cPanel : Access Information

cPanel is a control panel used in the server to handle different functionalities of a domain. This control panel is highly useful in web hosting industry. cPanel is used for server administration as well as domain administration. The server wide control panel is named as WHM(WebHost Manager) and the domain wise control panel is cPanel […]

Block IP addresses from accessing the site

You can block IP addresses from accessing the site by adding the following lines in .htaccess file. order deny,allow deny from 192.168.1.40 The order directive set the order in which the allow and deny directives will be processed and also the default access control state. In the above case, the default access control state is […]

Hide apache web server version

It is possible to hide apache web server version and other information.  This is done for security reasons. It is not a good idea to broadcast the version of the software that you are running on the server. You should have noticed the following details(or something similar) when an error page is displayed. Apache/2.2.9 (Unix) […]

Adding PHP RSS feeds to your website

RSS means Really Simple Syndication. This is used to publish frequently updated content such as blog entries, news headlines etc. An RSS document or a “feed” contains a summary of content from an associated web site. Adding RSS feeds to your web pages with PHP will provide fresh content for the search engines to give […]

Installing XCache on Linux machines

XCache is a fast, stable PHP opcode cacher that has been tested and is now running on production servers under high load. It is supported on all of the latest PHP. It optimizes performance by removing the compilation time of PHP scripts by caching the compiled state of PHP scripts into the shm (RAM) and […]

PHP scripts giving 500 Internal Server Errors and apache error log shows FATAL: erealloc()”

“PHP scripts giving 500 Internal Server Errors and apache error log shows the error as follows:” PROBLEM FATAL:  erealloc():  Unable to allocate 37581 bytes [Mon Apr 14 19:07:39 2008] [error] [client 125.17.242.245] Premature end of script headers: /home/username/public_html/site/index.php SOLUTION  The cause of the problem is because of the line “RLimitMEM 22369621” in httpd.conf file.commented out […]

How to enable runkit PHP extension

Installing runkit PHP extension. #cd /usr/local/src #wget http://pecl.php.net/get/runkit-0.9.tgz #tar -zxvf runkit-0.9.tgz #cd runkit-0.9 #phpize #./configure #make After running the make command you will get the following error. /usr/local/src/runkit-0.9/runkit_import.c: In function ‘php_runkit_import_class_props’: /usr/local/src/runkit-0.9/runkit_import.c:230: warning: passing argument 2 of ‘zend_unmangle_property_name’ makes integer from pointer without a cast /usr/local/src/runkit-0.9/runkit_import.c:230: error: too few arguments to function ‘zend_unmangle_property_name’ make: *** […]

Php memory size exhausted error

If you are getting a php Fatal error like Fatal error: Allowed memory size of 20971520 bytes exhausted at /usr/ports/lang/php5/work/php-5.2.1/Zend/zend_hash.c:1036 (tried to allocate 232 bytes) in /home2/webofunni/www/mediawiki-1.10.1/includes/SpecialPage.php on line 784 Then error is because of small memory limit in php. Try to increase php memory limit by following method . 1. Add following line to […]

Compile Apache + Mysql + PHP

Install Apache(apache2.2.2) 1. Download apache2.2.2(httpd-2.2.2.tar.gz) store in /usr/local/src 2. Type the following to un-tar the file into a directory called apache_[version]: tar -xvf apache_[version].tar 3.  cd into /usr/local/apache_[version] (or wherever you un-tared it) 4. Type the following to prepare for building, replacing [path] with your own path, such as /usr/local/usr/local/apache_new 5. ./configure –prefix=[path] –enable-module=so 6. […]