Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th January 2012, 21:07
czaczawik czaczawik is offline
Junior Member
 
Join Date: Jan 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default *.php = ERROR 500

Hi
Im just start with ISPC and VPS and have (propably) easy question.
I was add client and site for him. Site works fine but only with html files. When i put on server even simple php file ( phpinfo(); ) then i got error:

Code:
ERROR 500 - Internal Server Error!
The following error occurred:
The requested URL caused an internal server error.
If you get this message repeatedly please contact the webmaster.
in /var/log/apache2/suexec.log i found

Code:
[2012-01-24 17:41:04]: uid: (5004/web1) gid: (5005/client1) cmd: .php-fcgi-starter
[2012-01-24 17:41:04]: (13)Permission denied: exec failed (.php-fcgi-starter)
Please, help for noob. Tell me like for child what to do
Reply With Quote
Sponsored Links
  #2  
Old 25th January 2012, 18:06
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Your PHP file is probably owned by the wrong user and/or group.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 25th January 2012, 18:17
czaczawik czaczawik is offline
Junior Member
 
Join Date: Jan 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

/var/www/php-fcgi-scripts/web1/*.php-fcgi-starter

Code:
File:  .php-fcgi-starter
Owner: web1/client1
Mode: -rwxr-xr-r (755)
Code:
$1
#!/bin/sh
PHPRC="/etc/php5/cgi/"
export PHPRC
PHP_DOCUMENT_ROOT="/var/www/clients/client1/web1"
export PHP_DOCUMENT_ROOT
# The variable PHP_FCGI_CHILDREN is onyl useful for lighty or nginx as apache
# mod_fcgi will control the number of childs themself and never use the additional processes.
# PHP_FCGI_CHILDREN=8
# export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php-cgi \
-d open_basedir="/var/www/clients/client1/web1/web:/var/www/clients/client1/web1/tmp:/var/www/szalpal.pl/web:/srv/www/szalpal.pl/web:/usr/share/php5:$
-d upload_tmp_dir=/var/www/clients/client1/web1/tmp \
-d session.save_path=/var/www/clients/client1/web1/tmp \
im still dont know what to do
Reply With Quote
  #4  
Old 25th January 2012, 19:29
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,794
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

Falko meant the php files in the web directory, not the starter script
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 5th March 2012, 17:01
maumar maumar is offline
Senior Member
 
Join Date: May 2009
Location: San Costanzo (PU - Italy)
Posts: 136
Thanks: 8
Thanked 11 Times in 11 Posts
Send a message via MSN to maumar Send a message via Skype™ to maumar
Default

I have the same issue

how should access rigths on web dir?
chmod 755? or chmod 750? or what?

many many thnx
Reply With Quote
  #6  
Old 5th March 2012, 17:22
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,794
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

A 500 error can have many different reasons. Please post the exact error message that you get in the error.log fileof the website.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
bowlAltetle (25th March 2014)
  #7  
Old 5th March 2012, 17:24
maumar maumar is offline
Senior Member
 
Join Date: May 2009
Location: San Costanzo (PU - Italy)
Posts: 136
Thanks: 8
Thanked 11 Times in 11 Posts
Send a message via MSN to maumar Send a message via Skype™ to maumar
Default

reading here:
http://www.howtoforge.com/how-to-set...n-ubuntu-10.10

i see that:
Code:
chmod 755 /var/www/php-fcgi-scripts/web1/php-fcgi-starter
chmod 755 /var/www/php-fcgi-scripts/web2/php-fcgi-starter
chown -R web1:web1 /var/www/php-fcgi-scripts/web1
chown -R web2:web2 /var/www/php-fcgi-scripts/web2
so, i argue they must be 755
Reply With Quote
  #8  
Old 7th March 2012, 18:23
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

What about the error log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
bowlAltetle (25th March 2014)
  #9  
Old 7th March 2012, 19:19
maumar maumar is offline
Senior Member
 
Join Date: May 2009
Location: San Costanzo (PU - Italy)
Posts: 136
Thanks: 8
Thanked 11 Times in 11 Posts
Send a message via MSN to maumar Send a message via Skype™ to maumar
Default

the erro log reports the usual
Code:
[Mon Mar 05 17:15:37 2012] [error] [client x.x.x.x] Premature end of script headers: index.php
and suexec.log
Code:
[2012-03-05 17:15:37]: uid: (xxxx/zzzzz) gid: (zzz/zzzz) cmd: .php-fcgi-starter
[2012-03-05 17:15:37]: (13)Permission denied: exec failed (.php-fcgi-starter)
i solved reverting to apache mod-php;
the server was attacked the day before and they installed many perl scripts, maybe that cleaning massively something was wiped off, sadly
thnx for help
Reply With Quote
  #10  
Old 25th March 2012, 15:12
maumar maumar is offline
Senior Member
 
Join Date: May 2009
Location: San Costanzo (PU - Italy)
Posts: 136
Thanks: 8
Thanked 11 Times in 11 Posts
Send a message via MSN to maumar Send a message via Skype™ to maumar
 
Default

Ok, now I have logs
debian squeeze and ispconfig 3.0.4.3
domain is obscured with xxx.xx

this is suexec.log
Code:
[2012-03-25 13:00:49]: uid: (1006/web5) gid: (1014/client34) cmd: .php-fcgi-starter
[2012-03-25 13:00:49]: (13)Permission denied: exec failed (.php-fcgi-starter)
these are the rights i setupped:
Code:
/var/www/clients/client34/web5 # ls -la    
total 104
drwxr-x--x 6 web5 client34  4096 Mar 25 00:46 .
drwxr-xr-x 7 root root      4096 Mar 15 17:42 ..
-rw------- 1 web5 client34    14 Mar 12 17:29 .ftpquota
-rwxr-xr-x 1 root root        40 Oct 23 14:31 .htpasswd_stats
lrwxrwxrwx 1 root root        16 Mar 25 00:46 backup -> /var/backup/web5
drwxr-x--x 2 web5 client34  4096 Oct 17 18:07 cgi-bin
lrwxrwxrwx 1 web5 client34    40 Oct 17 18:07 log -> /var/log/ispconfig/httpd/xxx.xx
drwxr-x--x 2 web5 client34  4096 Oct 17 18:07 ssl
drwxrwxrwx 2 web5 client34 77824 Mar 25 12:04 tmp
drwxr-x--- 8 web5 client34  4096 Mar 12 17:29 web
then
Code:
chown -R web5:client34 ./web
chmod -R 750 ./web
error_log
Code:
[Sun Mar 25 14:01:52 2012] [warn] [client 79.33.66.85] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sun Mar 25 14:01:52 2012] [error] [client 79.33.66.85] Premature end of script headers: index.php

this is /var/www/php-fcgi-scripts/web5/.php-fcgi-starter
Code:
ls -la  /var/www/php-fcgi-scripts/web5/.php-fcgi-starter
-rwxr-xr-x 1 web5 client34 768 Mar 25 14:00 /var/www/php-fcgi-scripts/web5/.php-fcgi-starter

cat /var/www/php-fcgi-scripts/web5/.php-fcgi-starter
#!/bin/sh
PHPRC="/etc/php5/cgi/"
export PHPRC
PHP_DOCUMENT_ROOT="/var/www/clients/client34/web5"
export PHP_DOCUMENT_ROOT
# The variable PHP_FCGI_CHILDREN is onyl useful for lighty or nginx as apache 
# mod_fcgi will control the number of childs themself and never use the additional processes.
# PHP_FCGI_CHILDREN=8
# export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php-cgi \
 -d open_basedir="/var/www/clients/client34/web5/web:/var/www/clients/client34/web5/tmp:/var/www/xxx.xx/web:/srv/www/xxx.xx/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin" \
-d upload_tmp_dir=/var/www/clients/client34/web5/tmp \
-d session.save_path=/var/www/clients/client34/web5/tmp \
 $1
/var/www/php-fcgi-scripts/web5/.php-fcgi-starter (END)
this is index.php
Code:
 ls -la web/index.php 
-rwxr-x--- 1 web5 client34 397 Mar 12 17:12 web/index.php
with chmod 755 still the same error:
Code:
/var/www/clients/client34/web5 # chmod -R 755 web/
[2012-03-25 14:32:51]: uid: (1006/web5) gid: (1014/client34) cmd: .php-fcgi-starter
[2012-03-25 14:32:51]: (13)Permission denied: exec failed (.php-fcgi-starter)
[2012-03-25 14:36:18]: uid: (1006/web5) gid: (1014/client34) cmd: .php-fcgi-starter
[2012-03-25 14:36:18]: (13)Permission denied: exec failed (.php-fcgi-starter)

Question is:
what are the correct rights?

Last edited by maumar; 25th March 2012 at 15:37.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
.php Page Refresh dinesh.4126 Programming/Scripts 8 9th September 2009 11:16
How to add blinking effect in .php dinesh.4126 Programming/Scripts 5 27th August 2009 16:03
Shared IP message stirfry Installation/Configuration 15 5th November 2008 19:51
Getting .php as source MarcoV HOWTO-Related Questions 6 17th November 2005 15:23


All times are GMT +2. The time now is 14:27.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.