ispCP - Board - Support
Internal server error 500 with php files - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Usage (/forum-34.html)
+--- Thread: Internal server error 500 with php files (/thread-10002.html)

Pages: 1 2


Internal server error 500 with php files - shafto - 03-14-2010 06:42 PM

Hello!
Installed ispCP 1.0.4 on Debian Lenny. Control panel works fine, but when user request php file appers error 500, but with static files everything is fine. I'm not too familiar with fcgi but think problem in it. Any ideas?


RE: Internal server error 500 with php files - kilburn - 03-14-2010 10:39 PM

Post the contents of /var/log/apache2/suexec.log and /var/log/apache2/users/your-clients-website-error.log


RE: Internal server error 500 with php files - shafto - 03-15-2010 05:10 AM

suexec.log

[2010-03-14 18:43:16]: uid: (2003/vu2003) gid: (2003/vu2003) cmd: php5-fcgi-starter
[2010-03-14 18:43:16]: directory is writable by others: (/var/www/fcgi/atf-team.spb.ru)

root@agooga:/var/www/fcgi# ls -l /var/www/fcgi/
total 8
drwxrwxrwx 3 root root 4096 Mar 14 07:46 atf-team.spb.ru
drwxr-xr-x 3 vu2000 vu2000 4096 Mar 12 14:13 master


root@agooga:/var/www/fcgi# tail -f /var/log/apache2/users/atf-team.spb.ru-error.log
[Sun Mar 14 18:43:03 2010] [error] [client 91.215.122.202] File does not exist: /var/www/virtual/atf-team.spb.ru/htdocs/favicon.ico
[Sun Mar 14 18:43:06 2010] [notice] mod_fcgid: call /var/www/virtual/atf-team.spb.ru/htdocs/index.php with wrapper /var/www/fcgi/atf-team.spb.ru/php5-fcgi-starter
[Sun Mar 14 18:43:07 2010] [notice] mod_fcgid: call /var/www/virtual/atf-team.spb.ru/htdocs/index.php with wrapper /var/www/fcgi/atf-team.spb.ru/php5-fcgi-starter
[Sun Mar 14 18:43:10 2010] [notice] mod_fcgid: process /var/www/virtual/atf-team.spb.ru/htdocs/index.php(8704) exit(communication error), terminated by calling exit(), return code: 116
[Sun Mar 14 18:43:10 2010] [notice] mod_fcgid: process /var/www/virtual/atf-team.spb.ru/htdocs/index.php(8703) exit(communication error), terminated by calling exit(), return code: 116
[Sun Mar 14 18:43:16 2010] [notice] mod_fcgid: call /var/www/virtual/atf-team.spb.ru/htdocs/index.php with wrapper /var/www/fcgi/atf-team.spb.ru/php5-fcgi-starter
[Sun Mar 14 18:43:22 2010] [notice] mod_fcgid: process /var/www/virtual/atf-team.spb.ru/htdocs/index.php(8706) exit(communication error), terminated by calling exit(), return code: 116


I will try to play around access mode...


RE: Internal server error 500 with php files - kilburn - 03-15-2010 05:19 AM

Quote:root@agooga:/var/www/fcgi# ls -l /var/www/fcgi/
total 8
drwxrwxrwx 3 root root 4096 Mar 14 07:46 atf-team.spb.ru
drwxr-xr-x 3 vu2000 vu2000 4096 Mar 12 14:13 master

So you have changed the ownership and permissions of the "atf-team.spb.ru" folder, and that's what's causing the error. Try with:
Code:
chown -R vu2003:vu2003 /var/www/fcgi/atf-team.spb.ru
chmod 755 /var/www/fcgi/atf-team.spb.ru
chmod -R 750 /var/www/fcgi/atf-team.spb.ru/*
chmod 640 /var/www/fcgi/atf-team.spb.ru/php5/php.ini



RE: Internal server error 500 with php files - shafto - 03-15-2010 05:22 AM

Well, thanks for idea! It works now. I have some experiments and in /etc/passwd left few usernames with same home directory.
vu2001:x:2001:2001:virtual-user:/var/www/virtual/atf-team.spb.ru:/bin/false
vu2002:x:2002:2002:virtual-user:/var/www/virtual/atf-team.spb.ru:/bin/false
vu2003:x:2003:2003:virtual-user:/var/www/virtual/atf-team.spb.ru:/bin/false

Remove them, home directory(by rm -fr) and domain in ispCP. Then create it again and it seems work now. Smile


RE: Internal server error 500 with php files - kess - 03-23-2010 05:12 AM

(03-15-2010 05:19 AM)kilburn Wrote:  
Quote:root@agooga:/var/www/fcgi# ls -l /var/www/fcgi/
total 8
drwxrwxrwx 3 root root 4096 Mar 14 07:46 atf-team.spb.ru
drwxr-xr-x 3 vu2000 vu2000 4096 Mar 12 14:13 master

So you have changed the ownership and permissions of the "atf-team.spb.ru" folder, and that's what's causing the error. Try with:
Code:
chown -R vu2003:vu2003 /var/www/fcgi/atf-team.spb.ru
chmod 755 /var/www/fcgi/atf-team.spb.ru
chmod -R 750 /var/www/fcgi/atf-team.spb.ru/*
chmod 640 /var/www/fcgi/atf-team.spb.ru/php5/php.ini

Hi kilburn,
thank you for what you wrote.

Just a little spec: I had exactly the same problem that has been resolved by modifying the rights of that directories as suggested by you. I think that ispcp need a little patch for that, because these directories were automatically created by the system. I didn't change the rights.

Thank you again, bye Kess.


RE: Internal server error 500 with php files - djtech - 03-24-2010 10:58 AM

I have a similar problem where the static html files are fine but I cannot run php files, only my error code is 404 - File Not Found. The file is clearly there. I tried resetting permissions as mentioned here, but it still is not working. Any ideas? Also running Ubuntu, release 9.10.


RE: Internal server error 500 with php files - kilburn - 03-24-2010 05:56 PM

Post the contents of /var/log/apache2/suexec.log


RE: Internal server error 500 with php files - djtech - 03-25-2010 12:45 PM

Very strange. I restarted the server and all is fine now. I must have had some other changes pending. Thanks for the help, though.


RE: Internal server error 500 with php files - rethus - 07-06-2010 10:13 PM

I have nearly a simlar Problem... But my Problem is a little more specialy one.
All files php, and other - works well with http://mydomain.de/file.php.
but if i try to use it with https:// it doesnt work.
I got first an 500 error... after that (if i refresh) i got an "Service Temporarily Unaviable"-Error.

In My error-Log is see
Quote:Tue Jul 06 12:09:20 2010] [notice] mod_fcgid: process /var/www/virtual/mydomain.de/htdocs/contenido/index.php(1910) exit(server exited), terminated by calling exit(), return code: 116

And in suexec.log i found
Quote:[2010-07-06 12:09:14]: directory is writable by others: (/var/www/virtual/mysite.de/htdocs/contenido)

I Posted a request in German Corner, but there - nobody could helped me.