First I want to thank you Michael for trying to help us with our problem.
But I'm completely newbie in this domain, and I'm not sure I understand your advice correctly. Maybe you could be more precise please ?
Second, I want to add too that before updating plesk, my site was running with php4, and not php5, mostly because the site was made with a cms, ezpublis 3.9.3, which not support php5.
Maybe you can see another source for our problem with this info ?
And finally, I found this post today :
http://www.1and1faq.com/forums/showthread.php?p=6176
I tried the tip given by this guy, replacing "FCGIWrapper dynamic .php" by "FCGIWrapper /usr/bin/php-cgi .php".
With this I succeed in restarting httpd service with fastcgi enabled for all my site but just like him, I can't run php page anymore because of an error 500.
In /var/log/httpd/error_log I got :
[notice] mod_fcgid: call /var/www/vhosts/xxxxx/httpdocs/index.php with wrapper /usr/bin/php-cgi
[notice] mod_fcgid: server /var/www/vhosts/xxxxx/httpdocs/index.php(2852) started
[notice] mod_fcgid: process /var/www/vhosts/xxxxx/httpdocs/index.php(2852) exit(communication error), terminated by calling exit(), return code: 114
I am having the same problem. Not the dynamic issue, rather after you get FastCGI working, it is not serving pages correctly.
Is this a bug, or a configuration issue. I am ready to just go suPHP. I am on my 4th day in a row trying to figure this out and the Parallels board is nothing be silence. Between having to wait for your posts to be approved and the lack of response, I am really fed up.
My question is simple, and I don't even want the solution plesk, just an answer. Does FastCGI support unique php.ini settings per domain. Either via a php.ini file or .htaccess, or vhost.conf.
Please just let me know so I can at least be working in the right direction. I am perfectly willing to write a how-to for those who come behind me. (Free work for Parallels).
From what I can deduce, Plesk is running an out-dated version of mod_fcgi, it's 1.x and we need 2.x (for passing more than one argument in the vhost.conf file to the FCGIWrapper setting/directive or whatever it's called.
Now I wrote a shell script, which I "think" is working, but now I am getting permission / 500 errors.
Here is what I did to simply test:
in /usr/bin, I made a file called php-cgi.sh
-----BEGIN--------#!/bin/sh
PHPRC="/var/www/vhosts/yourdomain.com/conf"
export PHPRC
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
exec /usr/bin/php-cgi $1
------END---------
I added the $1 to the end of the exec string, but I don't know if that is right or not. Not sure if it is needed.
Then in vhost.conf for yourdomain.com
---------BEGIN-------------
<Directory /var/www/vhosts/yourdomain.com/httpdocs>
<IfModule mod_fcgid.c>
<Files ~ (\.php)>
SetHandler fcgid-script
FCGIWrapper /usr/bin/php-cgi.sh .php
Options +ExecCGI
Order
allow from all
</Files>
</IfModule>
Options -Includes +ExecCGI
</Directory>
-----------END-------------
Notice my FCGIWrapper line is now going to .sh file (my script, which then calls php-cgi binary).
I did this so I can pass my preferred directory for the wrapper to look for my php.ini file via the exporting of the PHPRC variable which points to my conf directory where I have a php.ini for testing.
I tried to call this from the command line within bash
/usr/bin/php-cgi.sh phpinfo.php
and it worked perfect. I also then edited my php.ini that my PHPRC is pointing to and I was able to toggle safe_mode on and off without a problem.
But when I try to run lynx as root and pull that same file, it says 500 Internal Error or whatever. A permissions related issue. This leads me to believe I am doing everything right up to this point, but something else is not jiving.
In other words, even if plesk upgraded their mod_fcgi, I would be arriving here anyway as it appears I have things working by using a shell script to call the php-cgi binary, thus allowing me to set the environment variable to tell fcgi where to pick up the php.ini for domain which called the shell script (whew!).
Plesk - HELP! Come on. This is pathetic. We did our homework. Throw us a dang bone already.