Current time: 04-26-2024, 12:17 AM Hello There, Guest! (LoginRegister)


Post Reply 
Internal server error 500 with php files
Author Message
shafto Offline


Posts: 4
Joined: Mar 2010
Reputation: 0
Post: #1
Internal server error 500 with php files
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?
03-14-2010 06:42 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: Internal server error 500 with php files
Post the contents of /var/log/apache2/suexec.log and /var/log/apache2/users/your-clients-website-error.log
03-14-2010 10:39 PM
Visit this user's website Find all posts by this user Quote this message in a reply
shafto Offline


Posts: 4
Joined: Mar 2010
Reputation: 0
Post: #3
RE: Internal server error 500 with php files
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...
03-15-2010 05:10 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: Internal server error 500 with php files
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
03-15-2010 05:19 AM
Visit this user's website Find all posts by this user Quote this message in a reply
shafto Offline


Posts: 4
Joined: Mar 2010
Reputation: 0
Post: #5
RE: Internal server error 500 with php files
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
03-15-2010 05:22 AM
Find all posts by this user Quote this message in a reply
kess Offline
Junior Member
*

Posts: 11
Joined: Mar 2010
Reputation: 0
Post: #6
RE: Internal server error 500 with php files
(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.
03-23-2010 05:12 AM
Find all posts by this user Quote this message in a reply
djtech Offline
Newbie
*

Posts: 8
Joined: Mar 2010
Reputation: 0
Post: #7
Question RE: Internal server error 500 with php files
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.
03-24-2010 10:58 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #8
RE: Internal server error 500 with php files
Post the contents of /var/log/apache2/suexec.log
03-24-2010 05:56 PM
Visit this user's website Find all posts by this user Quote this message in a reply
djtech Offline
Newbie
*

Posts: 8
Joined: Mar 2010
Reputation: 0
Post: #9
Wink RE: Internal server error 500 with php files
Very strange. I restarted the server and all is fine now. I must have had some other changes pending. Thanks for the help, though.
03-25-2010 12:45 PM
Find all posts by this user Quote this message in a reply
rethus Offline
Junior Member
*

Posts: 202
Joined: May 2009
Reputation: 3
Post: #10
RE: Internal server error 500 with php files
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.
07-06-2010 10:13 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)