suPHP on Fedora 9

Discussion in 'Installation/Configuration' started by lifeisboost, Mar 16, 2010.

  1. lifeisboost

    lifeisboost New Member

    I have been trying to install suPHP on an existing ISP config server with no luck. I followed the information here

    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?
    Last edited: Mar 17, 2010
  2. lifeisboost

    lifeisboost New Member

    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


    Path to logfile


    ;User Apache is running as

    ;Path all scripts have to be in

    ;Path to chroot() to before executing script

    Security options

    ;Check wheter script is within DOCUMENT_ROOT

    ;Send minor error messages to browser

    ;PATH environment variable

    ;Umask to setspecify in octal notation

    Minimum UID

    Minimum GID

    Handler for php-scripts

    ;Handler for CGI-scripts
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    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 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.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    For suphp, all directories and files in the "web" directory of a site have to be owned by the owner of the website.
  5. lifeisboost

    lifeisboost New Member

    why does it show it as /home though in the error? i woudl figure it would be reporting /home/www/web9

    [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
  6. lifeisboost

    lifeisboost New Member

    I did as you said and had ispconfig write in the lines to the vhost but still the same behavior and error
  7. lifeisboost

    lifeisboost New Member

    got a little further, now i have a new error

    [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
  8. lifeisboost

    lifeisboost New Member

    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
  9. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/suphp.conf?
  10. lifeisboost

    lifeisboost New Member

    ;Path to logfile
    ;User Apache is running as
    ;Path all scripts have to be in
    ;Path to chroot() to before executing script
    ; Security options
    ;Check wheter script is within DOCUMENT_ROOT
    ;Send minor error messages to browser
    ;PATH environment variable
    ;Umask to set, specify in octal notation
    ; Minimum UID
    ; Minimum GID
    ;Handler for php-scripts
    ;Handler for CGI-scripts

    I have tried the last 2 lines without the ' 'also. i have even tried docroot with just /
  11. falko

    falko Super Moderator ISPConfig Developer

    Can you try this?

    ;Handler for php-scripts
    ;Handler for CGI-scripts
  12. lifeisboost

    lifeisboost New Member

    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

  13. lifeisboost

    lifeisboost New Member

    little more, if i change the file type to php instead of html, the pages work. I have tried adding
    AddType application/x-httpd-php .htm .html
    to the .htaccess and apache conf but neither help
  14. falko

    falko Super Moderator ISPConfig Developer

    Any errors in the error log now? Can you post the vhost configuration of that vhost?
  15. lifeisboost

    lifeisboost New Member

    This this is the only error that stands out on the site.

    [Mon Mar 22 22:12:01 2010] [error] [client XXX] Failed loading /ioncube/  /ioncube/ undefined symbol: ts_allocate_id
    Vhost for this site with

    <VirtualHost XXX:80>
    ServerName www.XXX:80
    ServerAdmin [email protected]
    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
    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]
  16. falko

    falko Super Moderator ISPConfig Developer

    Can you disable the IonCobe Loader in your php.ini, restart Apache and see if it works then?
  17. lifeisboost

    lifeisboost New Member

    no change it still wants to download the html files. when i go to it downloads the cryptic html file, if i type in it will download the actual html file and the application type just says PHP script.

Share This Page