apache linux OS Plesk servers

Redhat, Plesk, named, and chroot oh my!

Well once again I performed my updates via Redhat up2date, and once again I lost all name services on a server.  This time I thought I would post my fix, since it was the same as last time.

There was an update issued by RHN this evening which updated the bind-chroot rpm. As part of it’s post install script it will attempt to relocate any zone files that may be located outside of the chroot into a chrooted directory in /var/named/chroot.

Since PSA implements a chroot for named outside of this package the nameserver files will be relocated to a path like…


This will of course break named’s ability to startup.

simply remove the bind-chroot rpm and re-link the /etc/named.conf file to the right location.

rpm -e bind-chroot
ln -sf /var/named/run-root/etc/named.conf /etc/named.conf
/sbin/service named restart

You should be good to go at that point.


Plesk backup problem

I had a problem backing up domains on a server and received the following error message:

Error: Unable to create backup session: Specified file is not accessible

Finally i solved this problem!!!! it was all about wrong permission in some folders!

check that the folders ‘/var/lib/psa/dumps’ and ‘/var/lib/psa/dumps/tmp’ are chmod to 777

apache linux OS php Plesk programming Quick Tips servers

PHP failing to upload images on a Plesk managed server

I recently upgraded a few of my Linux servers from Plesk 7.5 to 8.2. Everything seemed to be fine, however calls started coming in about PHP forms not uploading images correctly.

My team and I were troubleshooting this problem for a few days trying to narrow down the problem. We looked at folder permissions, script permissions, database connectivity, and almost anything else we could think of. Then we stumbled across the error message given by PHP (who would have thought to look at the error message?) that said function move_uploaded_file will not work in safe_mode.

Now looking at the PHP info the main php.ini was set with safe_mode off. However, I found that the httpd.conf for the individual domains on a Plesk managed server carries a declaration for PHP safe_mode, and it was turned on. Upon further investigation I found that in the Plesk interface for the domain there is a checkbox beside the PHP setting that allows safe_mode to be turned on and off.

Mission accomplished!

apache php Plesk programming Quick Tips

Apache parse PHP from within files using ‘.html’ extension

Recently I had someone that needed to move their site to a new server. The site was entirely created with the files using the .html extension, but had embeded inside.

I simply cleared this up by adding the following line to the httpd.conf, and after a reboot of Apache i was set to go.

AddType application/x-httpd-php .html

If you were to need this type of action for files using the .htm extension you would do the same thing, but replace the .html to .htm in the line.

Plesk Quick Tips servers

Restarting Plesk base services

I recently had the need to restart Plesk on a server. Everything on the server was running just fine, but Plesk was not responding.

After some searching I found these handy lines that allowed me to get Plesk back up and running.

# /etc/rc.d/init.d/psa stopall
# /etc/rc.d/init.d/psa start

Note: Must be run as root, or su.