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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > litespeed, fastcgi apache incompatibility

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-02-2012, 09:13 PM
accassar accassar is offline
Member
 
Join Date: Feb 2012
Posts: 31
Default litespeed, fastcgi apache incompatibility

Hi Guys,

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:

SERVER_SOFTWAREApache
SERVER_NAMEtest.com
SERVER_ADDR1.2.3.4
SERVER_PORT80
REMOTE_ADDR1.2.3.4
DOCUMENT_ROOT/my/document/root
SERVER_ADMINtest@test.com
SCRIPT_FILENAME/bin/php5 <- from apache config
REMOTE_PORT53960
REDIRECT_URL/index.php/category/library
GATEWAY_INTERFACECGI/1.1
SERVER_PROTOCOLHTTP/1.1
REQUEST_METHODGET
REQUEST_URI/category/library
SCRIPT_NAME/fcgi-bin/php5ac <- from apache config
PATH_INFO/index.php/category/library
PATH_TRANSLATED/my/document/root/index.php/category/library

Request method from LSWS:

GATEWAY_INTERFACECGI/1.1
SERVER_SOFTWARELiteSpeed
SERVER_PROTOCOLHTTP/1.1
REQUEST_METHODGET
SCRIPT_FILENAME/my/document/root
QUERY_STRING
SCRIPT_NAME/index.php/category/library
DOCUMENT_ROOT/my/document/root
REMOTE_ADDR1.2.3.4
REMOTE_PORT50424
SERVER_ADDR1.2.3.4
SERVER_NAMEtest.com
SERVER_ADMIN
SERVER_PORT8088
REQUEST_URI/category/library
PATH_TRANSLATED/my/document/root/category/library
PATH_INFO/category/library
Reply With Quote
 

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 06:51 AM.



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