PHP doesn't work

Discussion in 'Installation/Configuration' started by personxx, Jun 5, 2007.

  1. personxx

    personxx New Member

    My sites doesn't seem to be loading php pages.

    When I inspect the Vhosts_ispconfig.conf I notice that the PHP entries are there...

    What else could be wrong?



    Contents of /etc/apache2/vhosts/Vhosts_ispconfig.conf
    ######################################
    # Vhost: www.dark.local:80
    ######################################
    #
    #
    <VirtualHost 192.168.1.253:80>
    ServerName www.dark.local:80
    ServerAdmin [email protected]l
    DocumentRoot /srv/www/web2/web
    ServerAlias dark.local
    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
    ErrorLog /srv/www/web2/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    <Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php3>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php4>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    <Files *.php5>
    SetOutputFilter PHP
    SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode Off
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    Alias /error/ "/srv/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
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /srv/www/web2/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /srv/www/web2/user/$1/web/$3
    </VirtualHost>
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Is mod_php installed and loaded in your apache webserver? What happens if you open a php webpage and which exact URL do you use? You must ipen the webpsage by its domain and not by the main domain of the server or the IP address of the server.
     
  3. personxx

    personxx New Member

    Using the domain created for the site

    Hi there

    I created a customer and then added a site for the customer.
    Since I'm testing this server I added the domain "dark.local"

    At my work station I changed resolv.conf to point at the my ispconfig server.

    I then use firefox and type www.dark.local in the address bar... And it shows the test page.

    I then added a user for the site with admin priviledges using the ispconfig controlpanel....

    I used ftp to transfer a index.php file containing the following code

    <?php
    phpinfo();
    ?>

    I then type the same address again in Firefox but this time it asks me If I want to download the php file. And pops up a "Save as" window.

    I wil make sure about mod php...

    Where would ispconfig store this information?

    /etc/apache2/httpd.conf?

    Regards Julz
     
  4. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    ls -la /etc/apache2/mods-available
    and
    Code:
    ls -la /etc/apache2/mods-enabled
    ?
    Any errors in Apache's error log?
     
  5. personxx

    personxx New Member

    More Info

    "ls -la /etc/apache2/mods-available"
    This directory does not exist /etc/apache2/

    "ls -la /etc/apache2/mods-enabled"
    This directory does not exist /etc/apache2/

    /var/log/apache2/error_log
    Shows the following errors:
    [error][client ::1] Directory index forbidden by Options directive: /srv/www/htdocs
    [error] (9)Bad file descriptor: apr_socket_accept: (client socket)

    This is getting very frustrating I guess installing on OpenSuse was a big mistake...

    What platform would be recommended to get a working ispconfig server...

    Regards Julz
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Please have a look at the apache error log of the website, the log is in the log directory inside the website root directory.

    My personal favorit is Debian or Ubuntu server.
     
  7. personxx

    personxx New Member

    Ubuntu Server

    I have noticed in the forum that a few users has the same problem with OpenSuse 10.2...

    So I am going to give Ubuntu Server a try...

    Hopefully with more success...
     

Share This Page