Archive for the ‘php’ category

Plesk – Not detecting PHP installed

June 18th, 2010

If you see the value of php as not_installed, you probably have to edit the database to detect the currently installed PHP version. Follow the steps below to do this.

Findout the current PHP version:

#php -v

Then, edit the psa components table

#mysql -u admin -p’cat /etc/psa/.psa.shadow’

mysql> use psa;
mysql> update Components set version=”4.4.6″ where name=”php” limit 1;
mysql>\q

Restart plesk:

#/etc/init.d/psa stopall
#/etc/init.d/psa start
if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz

Linux – Apache getting php5 to work (php4 too)

March 8th, 2010

When trying to setup php on apache you need to make sure the following is in your http.conf file. Also double check the module.

First look to make sure you have

“modules/libphp5.so”

This would be in /etc/httpd/modules/libphp5.so  (libphp4.so for php4)

Next open the httpd.conf file (located /etc/httpd/conf/httpd.conf) and look for the following:

# Make sure there's only **1** line for each of these 2 directives:
# Use for PHP 4.x:
#LoadModule php4_module        modules/libphp4.so
#AddHandler php-script   php
# Use for PHP 5.x:
LoadModule php5_module        modules/libphp5.so
AddHandler php5-script php
# Add index.php to your DirectoryIndex line:
DirectoryIndex index.html index.php
AddType text/html       php
Note that the index.php may already be listed in the Default DirectoryIndex. Double check.
Once you add these lines, restart httpd and php should work for all domains.
if you found this helpful feel free to donate to:
ZEC: t1NQp1UuqQbmnXzazbLTSreS2AbaZpRBuTM
LTC: LZyNF1qkBUA7XFz83m5xwzGgmmj1owQn9d
BTC: 1PY95KFPTEJTR7f2NnSgaB6xB9pwDJkcJz