Changing eaccelerator cache directory


Issue :

We know that the default directory for eaccelerator cache is “/tmp/eaccelerator”. In most of the cases, this directory causing the /tmp to fill and that will cause many issues. In such cases it’s better to change the cache directory to another large partition.

Solution:

Use the following command to find cache director specified in “php.ini”‘ file.

# grep eaccelerator.cache_dir /usr/local/lib/php.ini

i.e;

root@tricks[~]# grep eaccelerator.cache_dir /usr/local/lib/php.ini
eaccelerator.cache_dir=”/tmp/eaccelerator”
root@tricks[~]#

Then change it to another directory “/var/eaccelerator” and save the file.

i.e; eaccelerator.cache_dir=”/var/eaccelerator”

Then create the folder “/var/eaccelerator”

# mkdir /var/eaccelerator

After that use the following commands.

#service httpd stop

#rm -rf /tmp/eaccelerator

#service httpd start

That’s all….!!!!

sh: /usr/local/bin/sendmail-logger: No such file or directory


Issue: I got the above error while trying to send mail from a test php file after enabling mail() function on the server.

sh: /usr/local/bin/sendmail-logger: No such file or directory

Solution:

1.copy /usr/local/lib/php.ini to the user’s document root and change the ownership.

# cp  /usr/local/lib/php.ini /home/username/public_html

#chown username.username /home/username/public_html/php.ini

2.Then edit /home/username/public_html/php.ini

# vi /home/username/public_html/php.ini

Now change the php.ini as described below.

sendmail_path = “/usr/sbin/sendmail -t -i” –> enable this
;sendmail_path = /usr/local/bin/sendmail-logger—> comment this

That’s all………!!!

 

Configure: error: mcrypt.h not found. Please reinstall libmcrypt


Issue : Configure: error: mcrypt.h not found. Please reinstall libmcrypt

I got the above error while compiling PHP

Solution:

You can install  libmcrypt using the following commands.

# cd /usr/src
# wget ftp://mcrypt.hellug.gr/pub/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz
# tar xvfz libmcrypt-2.5.7.tar.gz
# cd libmcrypt-2.5.7
# ./configure
# make
# make install

That’s all…….!!!!

error while loading shared libraries: libfreebl3.so


Issue : When I try to access any php file on the main account gives a ‘500 Internal Server Error’ and generates the following error log entry:

/usr/bin/php: error while loading shared libraries: libfreebl3.so: failed to map segment from shared object: Cannot allocate memory

Solution:

Please open the Apache configuration file.

vi /usr/local/apache/conf/httpd.conf

Then find the following lines.

RLimitMEM 67108864
RLimitCPU  240

Comment both of the lines.

#RLimitMEM 67108864
#RLimitCPU 240

Now try to access the web page.

That’s all…….!!!!!

Cannot login to phpmyadmin


Error: Internal Server Error

500

No response from subprocess (whostmgr (cpanel)): subprocess exited with status 12
cpsrvd/11.38.2.2 Server at 31.170.107.219

I got the above error while login to phpmyadmin using WHM

Solution :

1.Login to the server using SSH

2. Find all the cpanel process running on the server

ps aux | grep cpanel

3. Now kill all the cpanel process

4.After that restart the cpanel

service cpanel restart

Try to login to the cpanel now.

That’s all…….!!!!!

Command to find version of cpanel,Apache,php and MySQL on a server


1.cPanel version

You can find cPanel version using the following command

/usr/local/cpanel/cpanel  -V

2. Apache version

You can find the Apache version using the following command

httpd  -V

3.PHP version

You can find the PHP version using the following command

php  -v

4.MySQL version

You can find the MySQL version using the following command

mysql  -V

Enable the php mail() function


#vi php.ini

delete the entry mail() from disable functions

Now save and exit

You can test using below file
——————————-

vi test.php

———————-
<?
$to = “tester2mail@aol.com”;
$from = ‘anyone@fakedomain.com’;
$subject = “Mail Subject”;

$message = ‘This is a test message’;

$headers = “MIME-Version: 1.0\r\n”;
$headers .= “Content-type: text/html; charset=windows-1253, UTF-8\r\n”;
$headers .= ‘From: ‘.$from;

if (mail($to, $subject, $message, $headers))
{
echo “Email Sent : “. $to;
}
else
{
echo “Error Sending Email : “. $to;
}

?>

memcache installation


#pecl install memcache

or

#cd /home/cpeasyapache/src/php-5.3.17/ext/

#cd memcache

#phpize

#./configure

#MAKE

#MAKE INSTALL

Find the server’s php.ini file location using the command “php –ini” and add the pdo extension on it.

extension=”memcache.so”

After that restart the Apache

check if the module is installed using the command “php -m | grep memcache”

 

If the directory memcache not available in “/home/cpeasyapache/src/php-5.3.17/ext/” we have to install it manually. For that please follow the below steps.

#wget http://pecl.php.net/get/memcache-2.2.7.tgz

#tar -xvf memcache-2.2.7.tgz

#cd memcache-2.2.7

#phpize

#./configure

#MAKE

#MAKE INSTALL

Find the server’s php.ini file location using the command “php –ini” and add the pdo extension on it.

extension=”memcache.so”

After that restart the Apache

Thats all……..!!!!!!!

PDO installation (Php module)


#pecl install pdo

or

cd /home/cpeasyapache/src/php-5.3.17/ext/
cd pdo
phpize
./configure
MAKE
MAKE INSTALL

Find the server’s php.ini file location using the command “php –ini” and add the pdo extension on it.

extension=”pdo.so”

After that restart the Apache

check if the module is installed using the command “php -m”

Thats all…….!!!!!

 

Warning: ini_set() has been disabled for security reasons in /home/masoom/public_html/libraries/joomla/session/session.php on line 105


I got this when loading a website.

Fix:

1. In you joomla root folder, create a file called “php.ini”. or copy /usr/local/lib/php.ini

2. Edit that file “disable_functions =”. remove ini_set() from the disable function

3. Save the file and refresh you website.

 

 

 

 

Previous Older Entries

Blog Stats

  • 37,399 hits