Archive for December, 2009

Plesk Admin Password

Linux: cat /etc/psa/.psa.shadow Windows: Open a command prompt and type: “C:\Program Files\Parallels\Plesk\admin\bin\plesksrvclient.exe” -get

Plesk unlock admin account

mysql -uadmin -p$(cat /etc/psa/.psa.shadow) -Dpsa -e “delete from lockout where login=’admin’”

Plesk 9 Backup Utility Broken

After an upgrade to Plesk 9 you cannot schedule backups and get the following error: Unable to update scheduled backup information: MySQL query failed: Unknown column ‘backup_time’ in ‘field list’ Just run the following and it will reinstall them and correct the database: yum erase psa-backup-manager psa-migration-manager yum install psa-backup-manager psa-migration-manager service psa restart

Plesk 9 Greylisting

Plesk 9 introduced greylisting  – yay! or not. To disable it: /usr/local/psa/bin/grey_listing –update-server -status off

PHP sends mail as anonymous@servername

The from address is not enforced.  This can cause some PHP formmail script emails to be treated as spam.  Fix: 1) add a -f(sender address) parameter: mail($to, $subject, $message, $headers, ‘-fsomeone@somewhere.com’); 2) add a Return-Path header: mail($to, $subject, $message, ‘Return-Path: someone@somewhere.com\r\nFrom: someone@somewhere.com’); Qmail is *meant* to check for the from address field in Sender, From, […]

PHP IMAP SSL error

if you are getting a certificate error when using the PHP IMAP function, add the /notls flag: ie: $mbox = imap_open (“{localhost:995/pop3/notls}”, “user_id”, “password”);

PHP file manager not working after upgrading to PHP 5.2

posix is not included with php 5.2 and above do a yum install php-process

osCommerce broken after PHP/MySQL 5upgrade

osCommerce doesn’t seem to be very compatible with MySQL 5 and will most likely generate a load of errors from its SQL statements. Upgrading to the latest version is recommended and should fix this.  For heavily modified versions this may not be posible and will require some hacking to fix: add () to from tables […]

openssl unable to write random state

openssl genrsa -out test.pem 1024 -rand $HOME/httpdocs/cert/.rnd Generating RSA private key, 1024 bit long modulus …………………….++++++ …………………..++++++ unable to write ‘random state’ e is 65537 (0x10001) Causing non-random keys to be generated This is because openssl tries to create a .rnd file in the users home directory by default to create the random file.  The […]

Plesk PHP open_basedir changes

To make a change to PHP for a site in Plesk, such as opening open_basedir, edit /var/www/vhosts/$domain/conf/vhost.conf. You would then add : <Directory /var/www/vhosts/domain.com/httpdocs> php_admin_value open_basedir “/var/www/vhosts/domain.com/httpdocs:/tmp:/THE_PATH_PHP_SCRIPT_TRIES_TO_ACCESS_TO” </Directory> After that, you will need to rebuild the apache configuration with the following command: /usr/local/psa/admin/sbin/websrvmng -v -a