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 […]
Author Archive
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. […]
Install php5 and php4 in cPanel server
Now php has flushed their support for php4. Now most of the sites are loading under php5. But traditional php sites won’t work under php5. So we have to have php5 as primary and php4 as secondary php. Previously it was php4 as default and php5 as secondary, but now it is in the other […]
Install mod perl as DSO module
There are different ways to install mod_perl. This article explains how to install it as DSO using Apache extension tool apxs. 1) Download and untar the source. $ cd /usr/local/src $ wget http://perl.apache.org/dist/mod_perl-1.0-current.tar.gz $ tar -xzf mod_perl-1.0-current.tar.gz $ cd mod_perl-1.29/ 2) Configure it as DSO $ perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/local/apache/bin/apxs EVERYTHING=1 $ make $ make […]
Install mod evasive
Download mod_evasive from http://www.nuclearelephant.com/projects/mod_evasive/ $ tar zxvf mod_evasive_1.10.1.tar.gz $ cd mod_evasive Compile mod_evasive apache module For Apache 2 $ /usr/local/apache/bin/apxs -i -a -c mod_evasive20.cFor Apache 1.3 $ /usr/local/apache/bin/apxs -i -a -c mod_evasive.c Compilation is done under the assumption that path to apache is /usr/local/apache. If not replace /usr/local/apache with your path to apache. Edit your […]
Configure Apache to listen multiple ports
The listen directive in the Apache configuration file can be used to make Apache to listen in a particular port or IP address or port combination. Listen 80 Listen 8000 In this format the Apache server listens on the given ports on all interfaces (IP addresses) which are up in the server. If you mention […]
How to install APC (Alternative PHP Cache)
APC gives our server a huge performance boost. It is a free and robust framework for caching and optimizing PHP intermediate code. The installation steps are given below : 1. Login to the server as root 2. Download APC. You will get the latest tar file from the site http://pecl.php.net/package/apc wget http://pecl.php.net/get/APC-3.0.14.tgz 3. Extract and […]


Tags: 





