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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 12th July 2007, 09:30
patatra patatra is offline
Junior Member
 
Join Date: Jul 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Internal error 500 with suphp

Hi

I'm trying to setup a test server (it's new for me )
So i followed guide installation for Debian Etch and all was ok.

Yesterday i tried to install Joomla, but got some problems with permissions.

I searched solutions here, and found i had to use suphp. So i followed this guide : http://www.howtoforge.com/suphp_debian_etch_ispconfig

I uploaded again Joomla on my test site, and get internal error 500...

All directory uploaded are 755 and all files are 664.

suphp.log show
Quote:
[Thu Jul 12 09:00:09 2007] [info] Executing "/var/www/web2/web/index.php" as UID 10002, GID 10002
[Thu Jul 12 09:00:11 2007] [info] Executing "/var/www/web2/web/index.php" as UID 10002, GID 10002
[Thu Jul 12 09:00:11 2007] [info] Executing "/var/www/web2/web/index.php" as UID 10002, GID 10002
apache error.log show
Quote:
[Thu Jul 12 09:00:09 2007] [error] [client 192.168.1.2] SoftException in Application.cpp:478: Could not execute script "/var/www/web2/web/index.php"
[Thu Jul 12 09:00:09 2007] [error] [client 192.168.1.2] Caused by SystemException in API_Linux.cpp:427: execve() for program "php:/usr/bin/php5-cgi" failed: No such file or directory
[Thu Jul 12 09:00:09 2007] [error] [client 192.168.1.2] Premature end of script headers: index.php
[Thu Jul 12 09:00:09 2007] [error] [client 192.168.1.2] File does not exist: /var/www/web2/web/error/internalServerError.html
[Thu Jul 12 09:00:11 2007] [error] [client 192.168.1.2] SoftException in Application.cpp:478: Could not execute script "/var/www/web2/web/index.php"
[Thu Jul 12 09:00:11 2007] [error] [client 192.168.1.2] Caused by SystemException in API_Linux.cpp:427: execve() for program "php:/usr/bin/php5-cgi" failed: No such file or directory
[Thu Jul 12 09:00:11 2007] [error] [client 192.168.1.2] Premature end of script headers: index.php
[Thu Jul 12 09:00:11 2007] [error] [client 192.168.1.2] File does not exist: /var/www/web2/web/error/internalServerError.html
[Thu Jul 12 09:00:11 2007] [error] [client 192.168.1.2] SoftException in Application.cpp:478: Could not execute script "/var/www/web2/web/index.php"
[Thu Jul 12 09:00:11 2007] [error] [client 192.168.1.2] Caused by SystemException in API_Linux.cpp:427: execve() for program "php:/usr/bin/php5-cgi" failed: No such file or directory
[Thu Jul 12 09:00:11 2007] [error] [client 192.168.1.2] Premature end of script headers: index.php
[Thu Jul 12 09:00:11 2007] [error] [client 192.168.1.2] File does not exist: /var/www/web2/web/error/internalServerError.html
suphp.conf
Quote:
[global]
;Path to logfile
logfile=/var/log/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=www-data

;Path all scripts have to be in
docroot=/

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

; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
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=0077

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100


[handlers]
;Handler for php-scripts
x-httpd-php=phphp:/usr/bin/php5-cgi

;Handler for CGI-scripts
x-suphp-cgi=execute:!self
Vhosts_ispconfig.conf seems to be ok
Quote:
######################################
# Vhost: www.sitetest1.com:80
######################################
#
#
<VirtualHost 192.168.1.4:80>
ServerName www.sitetest1.com:80
ServerAdmin webmaster@sitetest1.com
DocumentRoot /var/www/web2/web
ServerAlias sitetest1.com
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias /cgi-bin/ /var/www/web2/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web2/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
suPHP_Engine on
suPHP_UserGroup web2_admin web2
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/var/www/web2/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web2/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web2/user/$1/web/$3
</VirtualHost>
/etc/apache2/httpd.conf
Quote:
LoadModule suphp_module /usr/lib/apache2/modules/mod_suphp.so

Last edited by patatra; 12th July 2007 at 09:37.
Reply With Quote
Sponsored Links
  #2  
Old 12th July 2007, 10:44
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,216 Times in 4,089 Posts
Default

It seems that you do not have a php5 CGI version isnatlled. Please run:

apt-get install php5-cgi
__________________
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:
christianherzog (23rd October 2007)
  #3  
Old 12th July 2007, 12:10
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 261
Thanked 147 Times in 128 Posts
Default

This type of error could sometimes also happen when you have a "bad" .htaccess file.
As test, remove the .htaccess, and see if you still get the error.
__________________
Never execute code written on a Friday or a Monday.
Reply With Quote
  #4  
Old 12th July 2007, 17:59
patatra patatra is offline
Junior Member
 
Join Date: Jul 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till
It seems that you do not have a php5 CGI version isnatlled. Please run:

apt-get install php5-cgi
No, i checked this when i read the error log.
It's already installed (apt-get say it's most recent version).
There is a php5-cgi executable file in /usr/bin/

Last edited by patatra; 12th July 2007 at 18:06.
Reply With Quote
  #5  
Old 12th July 2007, 18:02
patatra patatra is offline
Junior Member
 
Join Date: Jul 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by edge
This type of error could sometimes also happen when you have a "bad" .htaccess file.
As test, remove the .htaccess, and see if you still get the error.
I don't writed .htaccess for this site. Or there is one by default ? (but it's not in the /web/ directory)
Reply With Quote
  #6  
Old 12th July 2007, 21:49
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

Pl ease have a look here: http://www.howtoforge.com/forums/sho...chown+webadmin

(Using the chown command helped for me at that time)
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005

Last edited by Hans; 12th July 2007 at 21:51.
Reply With Quote
  #7  
Old 12th July 2007, 22:48
patatra patatra is offline
Junior Member
 
Join Date: Jul 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I changed directory to /var/www/web2
chown -R -v -f web2_admin:web2 web/*
...
(long list scroll)
...
chmod 755 web

... and always internal error 500, with the same error in the log
Reply With Quote
  #8  
Old 13th July 2007, 07:38
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

Are you very sure that you don't have any .htaccess file within your web?

Please post the content of your vhost of that website here.
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005
Reply With Quote
  #9  
Old 13th July 2007, 08:53
patatra patatra is offline
Junior Member
 
Join Date: Jul 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Hans
Are you very sure that you don't have any .htaccess file within your web?


Quote:
Originally Posted by Hans
Please post the content of your vhost of that website here.
/etc/apache2/vhosts/Vhosts_ispconfig.conf is:
Code:
###################################
#
# ISPConfig vHost Configuration File
#         Version 1.0
#
###################################
#
NameVirtualHost 192.168.1.4:80
<VirtualHost 192.168.1.4:80>
  ServerName localhost
  ServerAdmin root@localhost
  DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
######################################
# Vhost: www.sitetest1.com:80
######################################
#
#
<VirtualHost 192.168.1.4:80>
ServerName www.sitetest1.com:80
ServerAdmin webmaster@sitetest1.com
DocumentRoot /var/www/web2/web
ServerAlias sitetest1.com
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias  /cgi-bin/ /var/www/web2/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web2/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
suPHP_Engine on
suPHP_UserGroup web2_admin web2
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/var/www/web2/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web2/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web2/user/$1/web/$3
</VirtualHost>
#
#
#
Reply With Quote
  #10  
Old 13th July 2007, 10:09
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
 
Default

You don't have a configuration.php file within your Joomla webspace but a default configuration.php-dist.

Please have a look here how to setup Joomla: http://www.howtoforge.com/joomla_ispconfig step 6.

Because you want to use suPHP, forget the chown -R -v -f www-data:www-data web/* part within the howto.
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005
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
suPHP file permission catalyst General 14 7th March 2010 01:16
suPHP -couldn't create child process error tipsy HOWTO-Related Questions 10 26th November 2007 00:56
suPHP 500 Internal Server Error mattbrown Installation/Configuration 17 29th November 2006 16:23
suPHP and mod_vhost_alias Wiesemarc HOWTO-Related Questions 0 6th November 2006 16:45
OpenSuSE 10 suphp and apache2? doom4 Installation/Configuration 1 19th September 2006 15:19


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


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