LSWS 4.1 does not obey Plesk 10.2 PHP clause

Discussion in 'Bug Reports' started by priestjim, May 18, 2011.

  1. priestjim

    priestjim Well-Known Member

    Hi all,

    It seems that LSWS 4.1 does not honor the PHP CGI clause that Plesk 10.2 uses to enable PHP support on a domain:

    Code:
    <Files ~ (\.php)>
        SetHandler None
        AddHandler php-script .php
        Options +ExecCGI
        allow from all
    </Files>
    and thus I get:

    Code:
    Forbidden: PHP engine is disable.
    /etc/httpd/conf.d/php5.conf has:

    Code:
    <IfModule prefork.c>
        LoadModule php5_module modules/libphp5.so
    </IfModule>
    <IfModule worker.c>
        LoadModule php5_module modules/libphp5-zts.so
    </IfModule>
    
    AddHandler php5-script .php .php5 .phtml
    AddType text/html .php .php5 .phtml
    
    DirectoryIndex index.php index.php5
    
     
  2. NiteWave

    NiteWave Administrator

    why need php cgi ?
    how about comment "AddHandler php-script .php", and use default lsphp?
     
  3. priestjim

    priestjim Well-Known Member

    Self-reply:

    Parallels disables by default the mod_php engine through the dynamically generate server configuration file in /usr/local/psa/admin/conf/generated and when needed, it activates the PHP fastcgi module, which does not read the php_* flags and hence works. LSWS reads them though and complains that the PHP engine is disabled.

    Temporary workaround: Create a file called zz009_php_engine.conf in /etc/httpd/conf.d and put this inside:

    Code:
    <Directory "/var/www/vhosts">
            <IfModule sapi_apache2.c>
                    php_admin_flag engine on
            </IfModule>
    
            <IfModule mod_php5.c>
                    php_admin_flag engine on
            </IfModule>
    </Directory>
    
     
  4. priestjim

    priestjim Well-Known Member

    In Plesk 10.2, I don't get the option to enable mod_php! It's just PHP fastcgi and that's it!
     
  5. mistwang

    mistwang LiteSpeed Staff

  6. [QT]bender

    [QT]bender Member

    I guess these lines should be added to /etc/httpd/conf.d/zz012_php_engine.conf instead, to make it load after Plesk's configuration files.
     

Share This Page