...because we know tech, too!



Help And How To's:

Plesk Update gotcha

By: JP Smith | Published: July 28, 2009
Categories: Tips and Tricks

On the server I use for the sites I host, I use the Plesk control panel. I saw today where there were updates available for my control panel and went ahead then ran them. When they were all complete, I saw that I was using a whole lot less RAM. I was certain that they could not have optimized things that much so, I figured something was wrong. Sure enough, the web server process wasn't running. Since it is is kind of hard to run web sites without an actual web server, I figured I'd better look into it.

I was updating from Plesk version 9.2.1 to version 9.2.2.  Rarely do I come out unscathed on one of these updates so, I was expecting at least one issue.  However, I have never had an issue where I couldn't start the Apache web server so, this one kind of threw me for a loop.

So, I logged in to my server via SSH (a terminal session) and got the following error when trying to start Apache:

Starting http: Syntax error on line XX of /var/www/vhosts/XXXX/conf/httpd.include:
can't get fastcgi file info: dynamic, errno: 2

So, I hit Google and came across this post on the Parallels forum.  A poster suggested to look at a setting in the /etc/psa/psa.conf file. Specifically, it was the value for CGI_PHP_BIN

If you are not familiar with how you can set up php process to be handled, you have 3 options in Plesk.  You can set it up to run as an Apache module.  Some people don't like this because it runs as the user "apache" and requires the privileges that come along with running as the owner of the web server process.  Another option is to run as a CGI script (basically to keep it self containted and running as the site user instead of the web server owner) the other option is FastCGI which also runs as site owner but has performance boosts over normal CGI at the expense of a slight memory hit.

Well, I have a domain that was using FastCGI to handle PHP scripts.  In the prior version of Plesk, this was how the configuration filed told the server to handle this:

CGI_PHP_BIN dynamic

However, the latest version of Plesk delivers a change to this value.  It is now:

CGI_PHP_BIN /usr/bin/php-cgi

So, they error I was getting was because my http.include file was looking for the 'dynamic' parameter vs. the /usr/bin/php-cgi path.

In this case, you have two options to fix this.  The first is that you can go into the http.include file and change references to this dynamic parameter to be the php-cgi path.  However, the cleaner option would be to go to you Plesk control panel, click the "Web Hosting Settings" for your domain and find this setting:

PHP CGI Setting 1

Then, change it to look like this...

PHP CGI Setting 2

...and save your settings.

Next,  change it back to it's previous value...

PHP CGI Setting 1

...and save your settings, again.  What happens when you save is that the value for the CGI_BIN_PATH is read from the /etc/psa/psa.conf file and the corresponding value in the httpd.include file is now updated with the new path.  By doing it this way, you are sure to update this value in all places it is referenced in httpd.include.

The only thing left to do is to restart your web server process.  The Apache process should now start successfully.

I hope this helps.  Good luck!


Afamfam.com RSS Feed

You need to be logged in to post a comment.

If you are already registered, please log in here.

(Not Registered? Create your account here.)