Apache2 Not parsing PHP4

Discussion in 'Installation/Configuration' started by yazari, Jul 13, 2007.

  1. yazari

    yazari New Member

    Hello everybody,

    everything was working fine tile i decided to install eaccelerator for php4.

    it's installation was correct but when i tried to restart apache2 it gives me a syntaxe error - file : Vhosts_ispconfig.conf

    the concerned line is :

    Code:
    php_admin_flag safe_mode On
    now i beleive that PHP4 is no longer loaded or not installed.

    i tried to remove that line and hope apache2 is working but not parsing php files.. (it gives me the source code)

    i hardly worked to fix php .... no results.
    i installed php5 and it's php module for apache2..... no results.

    The question Now is how to get php4 back to work ??

    here's my vhosts_ispconfig.conf file :


    Code:
    ###################################
    #
    # ISPConfig vHost Configuration File
    #         Version 1.0
    #
    ###################################
    #
    NameVirtualHost ip:80
    <VirtualHost ip:80>
      ServerName localhost
      ServerAdmin root@localhost
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: www.xxx.com:80
    ######################################
    #
    #
    <VirtualHost IP:80>
    ServerName www.xxx.com:80
    ServerAdmin [email protected]
    DocumentRoot /home/www/web4/web
    ServerAlias XXX.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
    ScriptAlias  /cgi-bin/ /home/www/web4/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /home/www/web4/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 /home/www/web4/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /home/www/web4/phptmp/
    php_admin_value session.save_path /home/www/web4/phptmp/
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    Alias /error/ "/home/www/web4/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/web4/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /home/www/web4/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    

    tried this also :

    Code:
    arobas-01:~# apt-get --reinstall install php4
    Lecture des listes de paquets... Fait
    Construction de l'arbre des dépendances... Fait
    0 mis à jour, 0 nouvellement installés, 1 réinstallés, 0 à enlever et 262 non mis à jour.
    Il est nécessaire de prendre 0o/1162o dans les archives.
    Après dépaquetage, 0o d'espace disque supplémentaires seront utilisés.
    Souhaitez-vous continuer ? [O/n] o
    (Lecture de la base de données... 33502 fichiers et répertoires déjà installés.)
    Préparation du remplacement de php4 6:4.4.4-8+etch4 (en utilisant .../php4_6%3a4.4.4-8+etch4_all.deb) ...
    Dépaquetage de la mise à jour de php4 ...
    Paramétrage de php4 (4.4.4-8+etch4) ...
    
    arobas-01:~# apt-get --reinstall install php4-common
    Lecture des listes de paquets... Fait
    Construction de l'arbre des dépendances... Fait
    0 mis à jour, 0 nouvellement installés, 1 réinstallés, 0 à enlever et 262 non mis à jour.
    Il est nécessaire de prendre 0o/206ko dans les archives.
    Après dépaquetage, 0o d'espace disque supplémentaires seront utilisés.
    Souhaitez-vous continuer ? [O/n] o
    (Lecture de la base de données... 33502 fichiers et répertoires déjà installés.)
    Préparation du remplacement de php4-common 6:4.4.4-8+etch4 (en utilisant .../php4-common_6%3a4.4.4-8+etch4_i386.deb) ...
    Dépaquetage de la mise à jour de php4-common ...
    Paramétrage de php4-common (4.4.4-8+etch4) ...
    arobas-01:~# a2enmod php4
    Module php4 installed; run /etc/init.d/apache2 force-reload to enable.
    arobas-01:~# /etc/init.d/apache2 force-reload
    Forcing reload of web server (apache2)...apache2: Syntax error on line 116 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/php4.load: Cannot load /usr/lib/apache2/modules/libphp4.so into server: /usr/lib/apache2/modules/libphp4.so: cannot open shared object file: No such file or directory
     failed!
    
    
     
    Last edited: Jul 13, 2007
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to either disable safemode in allw ebsites which is pretty insecure or remove eaccelerator.
     

Share This Page