php script not working

Discussion in 'Installation/Configuration' started by ubekhet, Aug 19, 2006.

  1. ubekhet

    ubekhet New Member

    Hello,

    I just have installed ISPConfig, all that's right. But I could'nt working php script in website. I did enable php script in the website configuration i don't understand why not working right.

    Anybody can I help?

    Thanks
     
  2. sjau

    sjau Local Meanie Moderator

    What is the error you get when you call the php script in the browser?
     
  3. ubekhet

    ubekhet New Member

    I don't have or get any error, simply don't interpret php script, it shows php code.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you follow one of the perfect setup guides? Have you installed mod_php?
     
  5. ubekhet

    ubekhet New Member

    Yes, I followed the perfect setup guides. Before of install ISPConfig I could exec php script. Now only I can exec phpmyadmin in my domain. I can understand what happen!
     
  6. falko

    falko Super Moderator Howtoforge Staff

  7. ubekhet

    ubekhet New Member

    I just had seen this thread and either solved my problem.

    Before of installed ISPConfig php script is working at all in my domain, but after that don't working only in phpmyadmin, that why???


    Is possible install the ISPConfig enables PHP globally???
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    This has nothing to do with ISPConfig. I guess you followed one of the perfect setup howtos and these howtos disable PHP beacuse this is nescessary for ISPConfig to work properly.

    Yes, But then you will not be able to control PHP anymore in the ISPConfig generated website.

    The correct solution is:

    1) Leave PHP disbvaled globally.
    2) Create the websites in ISPConfig and check the "PHP" checkbox in the website settings.
    3) Copy your PHP scripts in the webroot directory(s) of the websites that you created in ISPConfig.
     
  9. ubekhet

    ubekhet New Member

    I just have tried the correct soluction and the problem continue having, it not working php script.

    How I have to do enable php globally?

    Thanks
     
  10. falko

    falko Super Moderator Howtoforge Staff

    You created a web site in ISPConfig, enabled PHP for it, copied your PHP scripts to that web site, and PHP isn't working?
    What's in Vhosts_ispconfig.conf?

    I don't recommend to do this because then you won't have control over PHP from ISPconfig. However, if you still want to do it: go to the "Perfect Setup" tutorial you followed, to the Apache section, and undo the steps where PHP is disabled.
     
  11. ubekhet

    ubekhet New Member

    Yes, I created a web site in ISPConfig, enabled PHP for it, copied your PHP scripts to that web site, and PHP isn't working.


    Where is Vhosts_ispconfig.conf?

    Thanks
     
  12. falko

    falko Super Moderator Howtoforge Staff

    Depends on your distribution. Run
    Code:
    updatedb
    locate Vhosts_ispconfig.conf
    to find it.
     
  13. ubekhet

    ubekhet New Member

    I paste here Vhosts_ispconfig.conf


    ###################################
    #
    # ISPConfig vHost Configuration File
    # Version 1.0
    #
    ###################################
    #
    NameVirtualHost myIP:80
    <VirtualHost myIP:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: prueba:80
    ######################################
    #
    #
    <VirtualHost myIP:80>
    ServerName myIP:80
    ServerAdmin webmaster@prueba
    DocumentRoot /var/www/web25/web
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.ht
    m
    ErrorLog /var/www/web25/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
    Alias /error/ "/var/www/web25/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/web25/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web25/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    ######################################
    # Vhost: www.ente:80
    ######################################
    #
    #
    <VirtualHost myIP:80>
    ServerName www.ente:80
    ServerAdmin webmaster@ente
    DocumentRoot /var/www/web26/web
    ServerAlias ente
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.ht
    m
    ErrorLog /var/www/web26/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 On
    php_admin_value open_basedir /var/www/web26/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web26/phptmp/
    php_admin_value session.save_path /var/www/web26/phptmp/
    Alias /error/ "/var/www/web26/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/web26/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web26/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    ######################################
    # Vhost: www.nose:80
    ######################################
    #
    #
    <VirtualHost myIP:80>
    ServerName www.nose:80
    ServerAdmin webmaster@nose
    DocumentRoot /var/www/web31/web
    ServerAlias nose
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.ht
    m
    ScriptAlias /cgi-bin/ /var/www/web31/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web31/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 On
    php_admin_value open_basedir /var/www/web31/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web31/phptmp/
    php_admin_value session.save_path /var/www/web31/phptmp/
    Alias /error/ "/var/www/web31/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/web31/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web31/user/$1/web/$3
    </VirtualHost>


    Thanks
     
  14. falko

    falko Super Moderator Howtoforge Staff

    PHP is enabled for all three web sites. What's in Apache's error log?
     
  15. ubekhet

    ubekhet New Member

    I paste here apache error.log. In this log, haven't any error about php script


    [Mon Aug 21 06:26:12 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec2)
    [Mon Aug 21 06:26:13 2006] [notice] Apache/2.0.55 (Debian) mod_ssl/2.0.55 OpenSSL/0.9.8b mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations[Tue Aug 22 12:54:15 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec2)
    [Tue Aug 22 12:54:16 2006] [notice] Apache/2.0.55 (Debian) mod_ssl/2.0.55 OpenSSL/0.9.8b mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations[Tue Aug 22 12:54:22 2006] [notice] caught SIGTERM, shutting down
    [Tue Aug 22 12:54:23 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec2)
    [Tue Aug 22 12:54:24 2006] [notice] Apache/2.0.55 (Debian) mod_ssl/2.0.55 OpenSSL/0.9.8b mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations[Wed Aug 23 00:32:40 2006] [error] [client 192.168.0.1] File does not exist: /var/www/favicon.ico
    [Wed Aug 23 00:32:45 2006] [error] [client 192.168.0.1] File does not exist: /var/www/phpmyadmin/favicon.ico
    [Wed Aug 23 00:32:46 2006] [error] [client 192.168.0.1] File does not exist: /var/www/phpmyadmin/favicon.ico
    [Wed Aug 23 00:32:46 2006] [error] [client 192.168.0.1] File does not exist: /var/www/phpmyadmin/favicon.ico
    [Wed Aug 23 00:38:38 2006] [error] [client 84.120.210.238] attempt to invoke directory as script: /usr/lib/cgi-bin/, referer: http://www.goldigolino.com.es/[Wed Aug 23 06:24:39 2006] [error] [client 222.62.202.66] File does not exist: /var/www/a1b2c3d4e5f6g7h8i9
    [Wed Aug 23 06:24:41 2006] [error] [client 222.62.202.66] File does not exist: /var/www/adxmlrpc.php
    [Wed Aug 23 06:24:42 2006] [error] [client 222.62.202.66] File does not exist: /var/www/adserver
    [Wed Aug 23 06:24:44 2006] [error] [client 222.62.202.66] File does not exist: /var/www/phpAdsNew
    [Wed Aug 23 12:23:20 2006] [error] [client 192.168.0.2] File does not exist: /var/www/favicon.ico
    [Wed Aug 23 12:53:16 2006] [notice] caught SIGTERM, shutting down
    [Wed Aug 23 12:55:47 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec2)
    [Wed Aug 23 12:55:48 2006] [notice] Apache/2.0.55 (Debian) mod_ssl/2.0.55 OpenSSL/0.9.8b mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations[Wed Aug 23 12:55:54 2006] [notice] caught SIGTERM, shutting down
    [Wed Aug 23 12:55:56 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec2)
    [Wed Aug 23 12:55:57 2006] [notice] Apache/2.0.55 (Debian) mod_ssl/2.0.55 OpenSSL/0.9.8b mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations[Wed Aug 23 13:30:07 2006] [notice] caught SIGTERM, shutting down
    [Wed Aug 23 13:32:09 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec2)
    [Wed Aug 23 13:32:10 2006] [notice] Apache/2.0.55 (Debian) mod_ssl/2.0.55 OpenSSL/0.9.8b mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations[Wed Aug 23 13:32:15 2006] [notice] caught SIGTERM, shutting down
    [Wed Aug 23 13:32:16 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec2)
    [Wed Aug 23 13:32:17 2006] [notice] Apache/2.0.55 (Debian) mod_ssl/2.0.55 OpenSSL/0.9.8b mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations[Wed Aug 23 13:49:12 2006] [notice] caught SIGTERM, shutting down
    [Wed Aug 23 13:51:13 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec2)
    [Wed Aug 23 13:51:14 2006] [notice] Apache/2.0.55 (Debian) mod_ssl/2.0.55 OpenSSL/0.9.8b mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations[Wed Aug 23 13:51:20 2006] [notice] caught SIGTERM, shutting down
    [Wed Aug 23 13:51:21 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec2)
    [Wed Aug 23 13:51:22 2006] [notice] Apache/2.0.55 (Debian) mod_ssl/2.0.55 OpenSSL/0.9.8b mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations[Wed Aug 23 18:26:58 2006] [notice] caught SIGTERM, shutting down
    [Wed Aug 23 18:29:57 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec2)
    [Wed Aug 23 18:30:01 2006] [notice] Apache/2.0.55 (Debian) mod_ssl/2.0.55 OpenSSL/0.9.8b mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations[Wed Aug 23 18:30:04 2006] [notice] caught SIGTERM, shutting down
    [Wed Aug 23 18:30:05 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec2)
    [Wed Aug 23 18:30:08 2006] [notice] Apache/2.0.55 (Debian) mod_ssl/2.0.55 OpenSSL/0.9.8b mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations[Wed Aug 23 18:38:36 2006] [error] [client 88.15.146.21] File does not exist: /var/www/favicon.ico
    [Thu Aug 24 19:28:11 2006] [error] [client 192.168.0.1] File does not exist: /var/www/favicon.ico
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you replaced the domains in your vhsost configuration that you posted here? www.nose is not a valid public domain.
     
  17. ubekhet

    ubekhet New Member

    Yes, I know, the domain www.nose simply is a test.
     
  18. falko

    falko Super Moderator Howtoforge Staff

    Did you change this manually? The ServerName should be an FQDN and not an IP address.
    As far as I can see, you're trying to access the original vhost in /var/www instead of your ISPConfig vhosts (e.g. in /var/www/web25/web):

    Please post Vhosts_ispconfig.conf again (and don't replace anything, I need to see the real data in there) and also the output of
    Code:
    ifconfig
     
  19. ubekhet

    ubekhet New Member

    Yes, I changed manually the ServerName. I paste here Vhost_ispconfig.conf whithout replace anything.

    ###################################
    #
    # ISPConfig vHost Configuration File
    # Version 1.0
    #
    ###################################
    #
    NameVirtualHost 80.32.129.248:80
    <VirtualHost 80.32.129.248:80>
    ServerName localhost
    ServerAdmin root@localhost
    DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: prueba:80
    ######################################
    #
    #
    <VirtualHost 80.32.129.248:80>
    ServerName prueba:80
    ServerAdmin webmaster@prueba
    DocumentRoot /var/www/web25/web
    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 /var/www/web25/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
    Alias /error/ "/var/www/web25/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/web25/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web25/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    ######################################
    # Vhost: www.ente:80
    ######################################
    #
    #
    <VirtualHost 80.32.129.248:80>
    ServerName www.ente:80
    ServerAdmin webmaster@ente
    DocumentRoot /var/www/web26/web
    ServerAlias ente
    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 /var/www/web26/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 On
    php_admin_value open_basedir /var/www/web26/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web26/phptmp/
    php_admin_value session.save_path /var/www/web26/phptmp/
    Alias /error/ "/var/www/web26/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/web26/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web26/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    ######################################
    # Vhost: www.nose:80
    ######################################
    #
    #
    <VirtualHost 80.32.129.248:80>
    ServerName www.nose:80
    ServerAdmin webmaster@nose
    DocumentRoot /var/www/web31/web
    ServerAlias nose
    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/web31/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web31/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 On
    php_admin_value open_basedir /var/www/web31/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web31/phptmp/
    php_admin_value session.save_path /var/www/web31/phptmp/
    Alias /error/ "/var/www/web31/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/web31/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web31/user/$1/web/$3
    </VirtualHost>


    Thanks
     
  20. falko

    falko Super Moderator Howtoforge Staff

    And what's the output of
    Code:
    ifconfig
    ?
     

Share This Page