Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th August 2011, 22:51
wolfric wolfric is offline
Junior Member
 
Join Date: Aug 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default suphp from fastcgi causes 500 error

<code>
[Fri Aug 19 21:45:36 2011] [warn] [client 192.168.1.37] mod_fcgid: stderr: PHP Notice: Undefined variable: page_form in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 497, referer: http://192.168.1.35:8080/index.php
[Fri Aug 19 21:45:36 2011] [warn] [client 192.168.1.37] mod_fcgid: stderr: PHP Notice: Trying to get property of non-object in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 497, referer: http://192.168.1.35:8080/index.php
[Fri Aug 19 21:45:36 2011] [warn] [client 192.168.1.37] mod_fcgid: stderr: PHP Notice: Undefined variable: page_form in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 498, referer: http://192.168.1.35:8080/index.php
[Fri Aug 19 21:45:36 2011] [warn] [client 192.168.1.37] mod_fcgid: stderr: PHP Notice: Trying to get property of non-object in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 498, referer: http://192.168.1.35:8080/index.php
[Fri Aug 19 21:45:36 2011] [warn] [client 192.168.1.37] mod_fcgid: stderr: PHP Notice: Undefined variable: page_form in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 499, referer: http://192.168.1.35:8080/index.php
[Fri Aug 19 21:45:36 2011] [warn] [client 192.168.1.37] mod_fcgid: stderr: PHP Notice: Trying to get property of non-object in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 499, referer: http://192.168.1.35:8080/index.php
[Fri Aug 19 21:45:36 2011] [warn] [client 192.168.1.37] mod_fcgid: stderr: PHP Notice: Undefined variable: page_form in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 500, referer: http://192.168.1.35:8080/index.php
[Fri Aug 19 21:45:36 2011] [warn] [client 192.168.1.37] mod_fcgid: stderr: PHP Notice: Trying to get property of non-object in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 500, referer: http://192.168.1.35:8080/index.php
[Fri Aug 19 21:45:36 2011] [warn] [client 192.168.1.37] mod_fcgid: stderr: PHP Notice: Undefined index: on_after_update in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 140, referer: http://192.168.1.35:8080/index.php
[Fri Aug 19 21:45:36 2011] [warn] [client 192.168.1.37] mod_fcgid: stderr: PHP Notice: Undefined index: sitesn_after_update in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 140, referer: http://192.168.1.35:8080/index.php
[Fri Aug 19 21:45:36 2011] [warn] [client 192.168.1.37] mod_fcgid: stderr: PHP Notice: Undefined index: sites:web_domainn_after_update in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 140, referer: http://192.168.1.35:8080/index.php
[Fri Aug 19 21:45:36 2011] [warn] [client 192.168.1.37] mod_fcgid: stderr: PHP Notice: Undefined index: return_to_url in /usr/local/ispconfig/interface/lib/classes/tform_actions.inc.php on line 142, referer: http://192.168.1.35:8080/index.php
[Fri Aug 19 21:46:02 2011] [notice] caught SIGTERM, shutting down
[Fri Aug 19 21:46:03 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Fri Aug 19 21:46:03 2011] [notice] Digest: generating secret for digest authentication ...
[Fri Aug 19 21:46:03 2011] [notice] Digest: done
[Fri Aug 19 21:46:03 2011] [notice] Apache/2.2.16 (Debian) DAV/2 mod_fcgid/2.3.6 mod_ruby/1.2.6 Ruby/1.8.7(2010-08-16) mod_ssl/2.2.16 OpenSSL/0.9.8o configured -- resuming normal operations


</code>

when i go to sites as admin user, go to fastcars.com (testing website i created), and change the php version from fastcgi to suphp, i get 500 errors and this in /var/log/apache/error.log. I've installed suphp and disabled php5 via a2dismod php5 and restarted apache.
Reply With Quote
Sponsored Links
  #2  
Old 20th August 2011, 15:49
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

Are your PHP scripts owned by the correct suExec user and 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 20th August 2011, 15:59
wolfric wolfric is offline
Junior Member
 
Join Date: Aug 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think so... web1:client1 right?

It's the same as it is when the default files are created.


-rwxr-xr-- 1 web1 client1 1865 Aug 19 21:54 index.php

note, when it's index.php it's a 500 error (even if no php resides in the file) but if it's index.html, it works fine.

It sounds like it can't contact suphp or something.
Reply With Quote
  #4  
Old 21st August 2011, 12:00
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

Can you try
Code:
chmod 755 index.php
?

Did you check the web site's 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
  #5  
Old 21st August 2011, 20:23
wolfric wolfric is offline
Junior Member
 
Join Date: Aug 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Tried 755 and 777 and even with 777 it still comes up with that error.
I've checked in /var/log/apache2/(access.log,error.log,suexec.log and other_vhosts_access.log)

The only thing that shows when i try access the page that's throwing the 500 error, is an access.log entry. I think the error in the first post i made was only when i attempted to change the php option in ispconfig.
Reply With Quote
  #6  
Old 21st August 2011, 20:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

Can you post your /etc/suphp.conf?

Are permissions of all directories up to index.php correct?
__________________
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
  #7  
Old 21st August 2011, 20:50
wolfric wolfric is offline
Junior Member
 
Join Date: Aug 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
[global]
;Path to logfile
logfile=/var/log/suphp/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=www-data

;Path all scripts have to be in
;docroot=/var/www:${HOME}/public_html
dochroot=/var/www

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true

;Send minor error messages to browser
errors_to_browser=false

;PATH environment variable
env_path=/bin:/usr/bin

;Umask to set, specify in octal notation
umask=0022

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100


[handlers]
;Handler for php-scripts
application/x-httpd-suphp="php:/usr/bin/php-cgi"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"
x-httpd-suphp="php:/usr/bin/php-cgi"
Also tried

dochroot=/var/www/clients/${GID}/${UID}/web
and restarted apache and it didn't work either (same message)

when i removed it or changed it back to what it originally was it worked... my bad. i think i saw dochroot=/var/www in a tutorial somewhere. Thanks for the help. Is there any reason why this didn't work though? it should have as far as I can see...

Edit: for chrooting the user in their web directory, should i use
chroot=/var/www/clients/${GID}/${UID}/web
when i tried this, i get a 500 error like before. (this is different to dochroot which was just to get suphp to run - i assume the chroot option really does chroot the user in the directory)

chroot should have been
chroot=/var/www/clients/${GROUPNAME}/${USERNAME}/web however it still doesn't work my path is /var/www/clients/client1/web1/web
id web1
uid=5004(web1) gid=5005(client1) groups=5005(client1),5002(sshusers)


I found new logs in /var/log/ispconfig/



[Mon Aug 22 23:23:03 2011] [error] [client 192.168.1.37] SoftException in Application.cpp:537: Could not execute script "/var/www/clients/client1/web1/web/index.php"
[Mon Aug 22 23:23:03 2011] [error] [client 192.168.1.37] Caused by SystemException in API_Linux.cpp:465: chdir() failed: No such file or directory
[Mon Aug 22 23:23:03 2011] [error] [client 192.168.1.37] Premature end of script headers: index.php

Last edited by wolfric; 23rd August 2011 at 00:29.
Reply With Quote
  #8  
Old 6th April 2013, 03:18
tek tek is offline
Junior Member
 
Join Date: Feb 2012
Location: Silicon Valley
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via ICQ to tek Send a message via AIM to tek Send a message via Yahoo to tek Send a message via Skype™ to tek
 
Default Answering this more for everyone else

You have obviously solved this but anyone running across this with a similar error may not understand whats up so this is for them.

the problem was the directive you were using in the config file.

you changed docroot into dochroot

Apache needs to know where its documents are to be stored or as they call it its Document Root or docroot for short.

In the actual apache.conf or httpd.conf for many rpm based system its usually pulled in by an Include statement that causes apache to parse all your virtual domains and modules that its supposed to load.

Back in your sites-enabled folder inside of /etc/apache/ the master sites config file is the 000-default and to use that for this example it has a directive called
DocumentRoot .... then it has a path statement.

In the config you quoted it has no docroot hence one part of your problem.
Apache needs to know where to find its documents then once it see's them and identifies the .php on the end it finds its handler type calling out the suphp.conf file but it has no docroot or homefolder declared so to speak.
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
Need help setting up domainpop with postfix kameelperdza Installation/Configuration 6 15th June 2009 07:49
cyrus-sasl won't install on my ubuntu9.04 kameelperdza Installation/Configuration 1 13th June 2009 10:28
installing Perl module GD - ran into problems Ovidiu Installation/Configuration 6 19th September 2006 09:32
Apache trouble wont restart Domain coroption main3 Installation/Configuration 1 16th September 2006 12:09
Fresh Install on Debian cksrealm Installation/Configuration 12 22nd February 2006 16:14


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


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