I have been trying to install suPHP on an existing ISP config server with no luck. I followed the information here http://www.howtoforge.com/install-s...tions-for-use-with-ispconfig-2.2.20-and-above but install version 7.2. This is an existing ISPconfig server with luckily not that many clients on it. After the install i added suPHP_Engine on suPHP_UserGroup web9_admin web9 AddHandler x-httpd-php .php .php3 .php4 .php5 suPHP_AddHandler x-httpd-php to the vhost. I removed all incompatible directives and got Apache to restart. but when i view this site in my browser it wants to download the PHP file instead of executing it. I have tried changing the web root folder permissions but this did not help. any one have any ideas?
Working on this some more this is now showing in the logs of the site trying to view a html file. I get a 500 in my browser and this in the log SoftException in Application.cpp:555: Directory /home is not owned by web9_admin /etc/suphp.conf PHP: [global] ;Path to logfile logfile=/var/log/suphp.log ;Loglevel loglevel=info ;User Apache is running as webserver_user=apache ;Path all scripts have to be in docroot=/home/www ;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=php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper ;Handler for CGI-scripts x-suphp-cgi=execute:!self
Do not add the directives that you posted above manually, this is all configured by ispconfig and it may not work if you do this manually. Instead, enable suphp in the config.inc.php file as described in the tutorial and then edit a setting of one of your sites, e.g. quota and save the site, so that ispconfig rewrites the Vhosts_ispconfig.conf file.
For suphp, all directories and files in the "web" directory of a site have to be owned by the owner of the website.
why does it show it as /home though in the error? i woudl figure it would be reporting /home/www/web9 Code: [quote="till, post: 222296"]For suphp, all directories and files in the "web" directory of a site have to be owned by the owner of the website.[/QUOTE] Why is it just showing as the base site being in /home though? [CODE]drwxrwxr-x 10 web9_admin web9 4096 2010-03-16 15:03 . drwxr-xr-x 169 root root 20480 2010-03-16 11:04 .. drwxr-xr-x 2 web9_admin web9 4096 2010-03-17 02:13 backup drwxrwxr-x 2 web9_admin web9 4096 2008-07-09 12:54 cgi-bin -rw------- 1 web9_admin web9 24 2010-03-16 15:03 .forward drwxrwxr-x 3 web9_admin web9 4096 2009-07-21 15:37 ftp -rw-rw-r-- 1 root web9 579 2010-03-16 04:50 .htpasswd drwxr-xr-x 3 web9_admin web9 4096 2010-03-17 01:56 log lrwxrwxrwx 1 root root 38 2010-03-16 15:03 Maildir -> /home/www/web9/user/web9_admin/Maildir drwxrwxrwx 2 web9_admin web9 4096 2008-07-09 12:54 phptmp -rw-r--r-- 1 root root 464 2010-03-16 15:03 .procmailrc lrwxrwxrwx 1 root root 45 2010-03-16 15:03 .spamassassin -> /home/www/web9/user/web9_admin/.spamassassin/ drwxr-xr-x 2 web9_admin web9 4096 2008-07-09 12:54 ssl drwxr-xr-x 23 web9_admin web9 4096 2010-02-24 23:59 user lrwxrwxrwx 1 root root 46 2010-03-16 15:03 .vacation.cache -> /home/www/web9/user/web9_admin/.vacation.cache drwxrwxr-x 12 web9_admin web9 4096 2010-03-17 02:22 web
I did as you said and had ispconfig write in the lines to the vhost but still the same behavior and error
got a little further, now i have a new error Code: [Wed Mar 17 04:35:17 2010] [error] [client ] Premature end of script headers: websites.php [Wed Mar 17 04:35:17 2010] [error] [client ] SecurityException in Application.cpp:496: Handler not found in configuration [Wed Mar 17 04:35:17 2010] [error] [client ] Caused by KeyNotFoundException in Configuration.cpp:234: Handler "application/x-httpd-php" not found
okay, now i am at to where .html pages download and php pages download with a cryptic file name with a .part on the end of it
Code: [global] ;Path to logfile logfile=/var/log/suphp.log ;Loglevel loglevel=warn ;User Apache is running as webserver_user=apache ;Path all scripts have to be in docroot=/home/www ;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=0022 ; Minimum UID min_uid=100 ; Minimum GID min_gid=100 [handlers] ;Handler for php-scripts x-httpd-php='php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper' ;Handler for CGI-scripts x-suphp-cgi='execute:!self' I have tried the last 2 lines without the ' 'also. i have even tried docroot with just /
Can you try this? Code: [handlers] ;Handler for php-scripts x-httpd-php=[COLOR="Red"]"[/COLOR]php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper[COLOR="Red"]"[/COLOR] ;Handler for CGI-scripts x-suphp-cgi=[COLOR="Red"]"[/COLOR]execute:!self[COLOR="Red"]"[/COLOR]
okay php pages seem to be working now, i could have swore i did the double quotes but html files are still downloading. they download with names like dY7JfIQo.php.part
little more, if i change the file type to php instead of html, the pages work. I have tried adding Code: AddType application/x-httpd-php .htm .html to the .htaccess and apache conf but neither help
This this is the only error that stands out on the site. Code: [Mon Mar 22 22:12:01 2010] [error] [client XXX] Failed loading /ioncube/ioncube_loader_lin_5.2_ts.so: /ioncube/ioncube_loader_lin_5.2_ts.so: undefined symbol: ts_allocate_id Vhost for this site with Code: <VirtualHost XXX:80> ServerName www.XXX:80 ServerAdmin webmaster@XXX DocumentRoot /home/www/web9/web ServerAlias XXX DirectoryIndex index.html index.php Alias /cgi-bin/ /home/www/web9/cgi-bin/ AddHandler cgi-script .cgi AddHandler cgi-script .pl ErrorLog /home/www/web9/log/error.log AddType application/x-httpd-php .php .php3 .php4 .php5 .htm .html <Directory /home/www/web9/web> suPHP_Engine on suPHP_UserGroup web9_ttg web9 AddHandler x-httpd-php .php .php3 .php4 .php5 suPHP_AddHandler x-httpd-php SetEnv php_safe_mode Off </Directory> Alias /stats "/home/www/web9/web/webalizer" Alias /error/ "/home/www/web9/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 ^/~([^/]+)(/(.*))? /home/www/web9/user/$1/web/$3 AliasMatch ^/users/([^/]+)(/(.*))? /home/www/web9/user/$1/web/$3 <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] </IfModule> </VirtualHost>
no change it still wants to download the html files. when i go to www.site.com it downloads the cryptic html file, if i type in www.site.com/index.html it will download the actual html file and the application type just says PHP script.