LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > LSWS 4.1 does not obey Plesk 10.2 PHP clause

Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2011, 02:41 AM
priestjim priestjim is offline
Senior Member
 
Join Date: Mar 2009
Location: Athens, Greece
Posts: 60
Default LSWS 4.1 does not obey Plesk 10.2 PHP clause

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
__________________
Web hosting, Domain Names, VPS and Dedicated Servers in one of the most secure, reliable, fast and low-cost web hosting services in the European market.

:: dnHost Interactive Agency :: Supporting and providing Litespeed Web Server in all shared hosting and VPS servers since 2008 ::
Reply With Quote
  #2  
Old 05-18-2011, 06:03 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,218
why need php cgi ?
how about comment "AddHandler php-script .php", and use default lsphp?
Reply With Quote
  #3  
Old 05-18-2011, 06:06 AM
priestjim priestjim is offline
Senior Member
 
Join Date: Mar 2009
Location: Athens, Greece
Posts: 60
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>
__________________
Web hosting, Domain Names, VPS and Dedicated Servers in one of the most secure, reliable, fast and low-cost web hosting services in the European market.

:: dnHost Interactive Agency :: Supporting and providing Litespeed Web Server in all shared hosting and VPS servers since 2008 ::
Reply With Quote
  #4  
Old 05-18-2011, 06:10 AM
priestjim priestjim is offline
Senior Member
 
Join Date: Mar 2009
Location: Athens, Greece
Posts: 60
Quote:
Originally Posted by NiteWave View Post
why need php cgi ?
how about comment "AddHandler php-script .php", and use default lsphp?
In Plesk 10.2, I don't get the option to enable mod_php! It's just PHP fastcgi and that's it!
__________________
Web hosting, Domain Names, VPS and Dedicated Servers in one of the most secure, reliable, fast and low-cost web hosting services in the European market.

:: dnHost Interactive Agency :: Supporting and providing Litespeed Web Server in all shared hosting and VPS servers since 2008 ::
Reply With Quote
  #5  
Old 05-19-2011, 02:01 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,586
another option is to ignore mod_php5 sapi_apache2 configurations.
http://www.litespeedtech.com/docs/we...IgnoredModules

that matches apache behavior under Plesk.
Reply With Quote
  #6  
Old 10-31-2011, 06:55 AM
[QT]bender [QT]bender is offline
Member
 
Join Date: May 2008
Posts: 16
Quote:
Originally Posted by priestjim View Post
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>
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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:04 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.