Tuesday, April 22, 2008

Plesk 8.3 PSA Recovery

Well this morning my Plesk 8.3 suddenly stop working. The PSA database in MySQL were severely damaged and no way to recover.

Luckily I have the fresh install backup tar -cf mysql.tar /var/lib/mysql. Just load back the fresh backup, restart PSA service and voila, Plesk back online again.

Thursday, April 17, 2008

Installing Pear in Plesk Linux

Here are the steps
1. Download Pear
2.Change the php include path in the subdomain ( vhost.conf )

Downloading Pear
1. Create a directory in /usr/share/php
2. CD into /us/share/pear
3. Download go-pear script at http://pear.php.net/go-pear

wget http://pear.php.net/go-pear
cp go-pear go-pear.php
php -q go-pear.php

4. Follow the instructions
5. Now if you include PEAR in your application, PHP open base dir problem will occur, to solve it, follow my tips at here.

Wednesday, April 16, 2008

Plesk PHP Turn Off Safe Mode

Plesk PHP Safe Mode giving your headache ?

Try the following steps


Check under hosting menu


Untick the PHP Safe Mode option


Restart the Apache Service.


Check the phpinfo and voila, safe mode is gone.

Redhat Linux EL5 & Plesk

I'm using Redhat Linux EL5 and using Plesk 8.3

Normally you can enter plesk admin panel at https://127.0.0.1:8443. Well what if your machine IP is 192.168.1.2 and you wnat to access it remotely ?

https://192.168.1.2:8443 amd yadaa you can't enter the page.

The solution is, to turn of the IPTABLES ( for teporary measure )


/sbin/iptables stop


Now you can enter Plesk Management System

CakePHP Plesk Open Base Dir problem

I've created http://spot.timeoutkl.com to test my Cake PHP 1.2 installation and the default CakePHP page gives me openbase dir error.

What I did was

1.Edit file and then restart back webservice

[root@localhost spot]# cd conf/
[root@localhost conf]# ls
[root@localhost conf]# cd ..
[root@localhost spot]# cd conf/
[root@localhost conf]# vi vhost.conf
[root@localhost conf]# pwd
/var/www/vhosts/timeoutkl.com/subdomains/spot/conf
[root@localhost conf]# vi vhost.conf
[root@localhost conf]# /usr/local/psa/admin/sbin/websrvmng -v -a
[root@localhost conf]#


What's is inside vhost.conf ?


php_admin_value open_basedir none

Monday, April 14, 2008

Display PHP error on client site

By default, Plesk 8.3 will disable display error on the client's site. So to enable it

1.Edit /etc/php.ini as root
2.Scroll to the bottom add these configurations


; Local Variables:
; tab-width: 4
; End:
error_reporting = E_ALL & ~E_NOTICE
display_errors = On


3. Save the file and restart back httpd

/sbin/service httpd restart