05-02-2012, 09:13 PM
Join Date: Feb 2012
litespeed, fastcgi apache incompatibility
I've found the reason for the rewrite issues with litespeed and PHP running under fastcgi.
The issue is that fastcgi sends different variables over the fastcgi connection then apache - which results in PHP not interpreting PATH_INFO correctly.
If you compare the output from the fastcgi variables below, especially the path_translated and path_info as that is what the PHP fastcgi handlers care about, you will see the obvious error. All the complaints on the forums about PHP saying 'file not found' for this style of URL can be explained in the differences below.
Is there any chance if LSWS being updated? I don't really want to change the fastcgi code in PHP to work with LSWS if I can help it, and I haven't checked if LSAPI works correctly or not - but for this particular use case (and I imagine many others where there is a migration from webserverX -> litespeed) this is the best option forward.
FastCGI request from Apache:
SCRIPT_FILENAME/bin/php5 <- from apache config
SCRIPT_NAME/fcgi-bin/php5ac <- from apache config
Request method from LSWS: