PHP on one site, not another

Discussion in 'Installation/Configuration' started by pineapple, Jun 26, 2009.

  1. pineapple

    pineapple New Member

    OK - I have spent the day reading all of the forum threads I can find on this and haven't been able to fix my problem so I'm now going to trouble you guys, if I may ...

    I have followed the Perfect Server tutorial of Debian 5 and ISPConfig2.

    I then followed the instructions for installing ISPConfig.

    Web, email, DNS, FTP all work wonderfully.

    PHP is problematic - it works on one site but not another. I deleted the site that it didn't work on and recreated it but still no luck.

    I have done the Vhosts_ispconfig.conf renaming and httpd -t and initially it came back "Syntax OK" but now it comes back: "Warning: DocumentRoot [/var/www/sharedip] does not exist". I don't this is an issue - as its a new problem but I am posting it just in case.

    I have also checked my Apache config and the include to Vhosts_sipconfig.conf is at the bottom and php5.conf and php5.load are in the list.

    PHPMyAdmin works and phpinfo.php works on my first site but not the second one. I have enabled and disabled PHP in the site settings and restarted Apache but still no luck.

    I am at a dead end.

    Anyone have any ideas?
     
  2. pineapple

    pineapple New Member

    An update

    I'm still trying to work this out, but in case this helps anybody looking to help: it seems as though when I login with FTP with one account it takes me to /var/www/web1 2, 3 etc but with the other it is /var/www/[domain name]/web/ ...

    PHP scripts work in /var/www/[domain name]/web but not in /var/www/web(1, 2, 3 etc).

    Does this make any sense to anyone?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    If you had to rename a copy of Vhosts_ispconfig.conf with date appended then there is a problem in your apache configuration, otherwise ther werent any copys of vthe file with a date appended.

    Please post the output of:

    ls -la /var/www/sharedip
     
  4. pineapple

    pineapple New Member

    Still trying

    Well, I did the config_date_appended option in case it did anything but no, there were no other copies of it in the directory and at the time suspected I was just flinging mud about.

    ls -la /var/www/sharedip results in:
    ls: cannot access /var/www/sharedip: No such file or directory

    Doesn't look like the response I want, how did that happen?
     
  5. pineapple

    pineapple New Member

    an update

    I haven't managed to solve this yet but I'm wondering: if apache is giving me the warning about the sharedip directory - should I just create it? I'm not sure this is related to the PHP problem though as PHP wasn't working prior to the error. My Vhosts_ispconfig.conf file looks like the one below - PHP works on site1 but not on site2:

    ###################################
    #
    # ISPConfig vHost Configuration File
    # Version 1.0
    #
    ###################################
    #
    NameVirtualHost 202.97.72.143:80
    <VirtualHost 202.97.72.143:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: www.site1.com.au:80
    ######################################
    #
    #
    <VirtualHost 202.97.72.143:80>
    ServerName www.site1.com.au:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web1/web
    ServerAlias site1.com.au
    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
    Alias /cgi-bin/ /var/www/web1/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web1/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_flag safe_mode Off
    Alias /error/ "/var/www/web1/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/web1/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>
    <IfModule mod_dav.c>
    Alias /webdav /var/www/web1/web
    <Location /webdav>
    DAV On
    AuthType Basic
    AuthName "webdav"
    AuthUserFile /var/www/web1/passwd.dav
    Require valid-user
    </Location>
    </IfModule>
    </VirtualHost>
    #
    <IfModule mod_ssl.c>
    <VirtualHost 202.97.72.143:443>
    ServerName www.site1.com.au:443
    ServerAdmin [email protected]
    DocumentRoot /var/www/web1/web
    ServerAlias site1.com.au
    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
    Alias /cgi-bin/ /var/www/web1/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web1/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_flag safe_mode Off
    SSLEngine on
    SSLCertificateFile /var/www/web1/ssl/www.site1.com.au.crt
    SSLCertificateKeyFile /var/www/web1/ssl/www.site1.com.au.key
    Alias /error/ "/var/www/web1/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/web1/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>
    <IfModule mod_dav.c>
    Alias /webdav /var/www/web1/web
    <Location /webdav>
    DAV On
    AuthType Basic
    AuthName "webdav"
    AuthUserFile /var/www/web1/passwd.dav
    Require valid-user
    </Location>
    </IfModule>
    </VirtualHost>
    </IfModule>
    #
    #
    ######################################
    # Vhost: www.site2.com:80
    ######################################
    #
    #
    <VirtualHost 202.97.72.143:80>
    ServerName www.site2.com:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web8/web
    ServerAlias site2.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
    Alias /cgi-bin/ /var/www/web8/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web8/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_flag safe_mode On
    php_admin_value open_basedir /var/www/web8/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web8/phptmp/
    php_admin_value session.save_path /var/www/web8/phptmp/
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    Alias /error/ "/var/www/web8/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/web8/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web8/user/$1/web/$3
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>
    #
    #
    #
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Please create /var/www/sharedip...
    Code:
    mkdir /var/www/sharedip
    ... and restart Apache.
     
  7. pineapple

    pineapple New Member

    No luck

    Thanks Falko - I did that but it made no difference. In frustration/desperation I have just re-installed Lenny, followed the guide step-by-crucial-step, got ISPConfig up and am now about to try adding clients/sites - I'll let you know how it goes ...
     
  8. pineapple

    pineapple New Member

    It works!

    I have rebuilt everything and it now works like a charm!

    Thanks for your help.
     

Share This Page