php scripts cause mod_fcgid error

6 posts / 0 new
Last post
#1 Thu, 11/22/2007 - 18:43

php scripts cause mod_fcgid error


I got virtualmin installed and running, hooray!

But I tried to create an index.php page in my root directory and it caused an Internal Server Error. Additionally, I receive exactly the same error if I try to install MediaWiki.

Let's start with what shows up in the logs... [code:1] [Thu Nov 22 20:24:23 2007] [notice] mod_fcgid: call /home/users/sample2/public_html/config/index.php with wrapper /home/users/sample2/fcgi-bin/php5.fcgi [Thu Nov 22 20:24:23 2007] [notice] mod_fcgid: server /home/users/sample2/public_html/config/index.php(22508) started [Thu Nov 22 20:24:26 2007] [notice] mod_fcgid: process /home/users/sample2/public_html/config/index.php(22508) exit(communication error), terminated by calling exit(), return code: 114 [Thu Nov 22 20:24:26 2007] [notice] mod_fcgid: process /home/users/sample2/public_html/config/index.php(22506) exit(server exited), terminated by calling exit(), return code: 114 [/code:1]

And here's what the installer has to say... [code:1] Found in cache ..

Now installing MediaWiki version 1.9.3 ..

  MediaWiki post-install configuration failed : HTTP/1.1 500 Internal Server Error

.. failed! See the error message above for the reason why. [/code:1]

If I go into Server Configuration -> Website Options and change "PHP Script Execution Mode" to mod_php and also install MediaWiki in a subdirectory, it installs successfully. However, I have to do both... installing it in the root directory or without using mod_php causes the same fcgid error (??!!).

I'm using Ubuntu 6.06 and all the packages/versions installed by virtualmin's installer(today).

Er... help?<br><br>Post edited by: kato, at: 2007/11/22 20:42

Thu, 11/22/2007 - 20:57

I've tried several other installs; all of them work fine (MediaWiki is the only to fail with this error), but no php script installed in the root directory will run, no matter the source or content. Even this won't run...

[code:1]&lt;?php phpinfo(); ?&gt;[/code:1]

Fri, 12/28/2007 - 09:54 (Reply to #2)

Anyone have any ideas? I still see this problem. I have to use mod_php or they won't run at all...

Fri, 12/28/2007 - 09:55 (Reply to #3)

I had the same problem with Joomla now... it seems to only happen when they are in the root folder.

Fri, 12/28/2007 - 11:54 (Reply to #4)

I finally noticed these errors in /var/log/apache2/suexec.log, they look interesting; one appears each time I refresh the page and get a 500 error...

[2007-12-28 13:52:43]: uid: (1008/newzephyr) gid: (1010/1010) cmd: php5.fcgi
[2007-12-28 13:52:43]: command not in docroot (/home/users/newzephyr/fcgi-bin/php5.fcgi)

Fri, 12/28/2007 - 12:42 (Reply to #5)

I was able to solve this, but not by simply running

[code:1]apt-get install apache[/code:1]

To bring suexec up to speed (as suggested in other posts).

I actually had to uninstall apache and then run again. Afterwards, I had the following joy:
root@zephyr:/home/web# /usr/lib/apache2/suexec2 -V
-D AP_DOC_ROOT=&quot;/home&quot;
-D AP_HTTPD_USER=&quot;www-data&quot;
-D AP_LOG_EXEC=&quot;/var/log/apache2/suexec.log&quot;
-D AP_SAFE_PATH=&quot;/usr/local/bin:/usr/bin:/bin&quot;
-D AP_USERDIR_SUFFIX=&quot;public_html&quot;

And my php scripts are up and running spiffy!

Topic locked