Site that works on Apache but not LiteSpeed - Need assistance

MikeDVB

Well-Known Member
#1
We have a client that their site runs beautifully on Apache but as soon as we flip the switch to LiteSpeed the site simply generates blank pages (no content at all) Below is a snapshot of the error logs – it’s just a bunch of this. Any advice is appreciated because we don’t want to give one of our biggest customers “the boot” so that we can make the change to LiteSpeed. We have two other servers running LiteSpeed with no such issues. I have contacted the administrator of the site to ask them how they are handling /event and /gallery since those folders don’t actually exist but it seems that their index.php is processing them. you can go to theirdomain.com/index.php/event and theirdomain.com/index.php/gallery on Apache and it displays the correct page but in LiteSpeed it doesn't work that way either.

Here is some of the apache error log for the account.
Code:
2009-07-19 15:37:50.301 [NOTICE] [APVH_useracct_Suphp:] stop worker processes
2009-07-19 15:43:29.276 [INFO] [HTAccess] Updating configuration from [/home/useracct/public_html/.htaccess]
2009-07-19 15:43:29.278 [INFO] [APVH_useracct_Suphp:] pid list size: 1
2009-07-19 15:43:29.278 [INFO] [APVH_useracct_Suphp:] add child process pid: 28124
2009-07-19 15:43:46.202 [NOTICE] [APVH_useracct_Suphp:] stop worker processes
[Sun Jul 19 15:46:01 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/gallery, referer: http://www.theirdomain.com/gallery/item.html?id=93
[Sun Jul 19 15:46:01 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/404.shtml, referer: http://www.theirdomain.com/gallery/item.html?id=93
2009-07-19 15:46:22.898 [INFO] [APVH_useracct_Suphp:] pid list size: 1
2009-07-19 15:46:22.898 [INFO] [APVH_useracct_Suphp:] add child process pid: 32149
2009-07-19 15:46:23.098 [INFO] [APVH_useracct_Suphp:] pid list size: 2
2009-07-19 15:46:23.098 [INFO] [APVH_useracct_Suphp:] add child process pid: 32150
2009-07-19 15:46:31.944 [INFO] [86.96.227.86:49878-0#APVH_theirdomain.com] File not found [/home/useracct/public_html/gallery/]
2009-07-19 15:46:31.944 [INFO] [86.96.227.86:49878-0#APVH_theirdomain.com] File not found [/home/useracct/public_html/404.shtml]
2009-07-19 15:46:33.098 [INFO] Pid: 32149 associated with [APVH_useracct_Suphp:]
2009-07-19 15:46:33.098 [INFO] [APVH_useracct_Suphp:] pid list size: 1, pid stop list size: 0
2009-07-19 15:46:40.001 [NOTICE] [APVH_useracct_Suphp:] stop worker processes
[Sun Jul 19 15:46:52 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/gallery, referer: http://www.theirdomain.com/
[Sun Jul 19 15:46:52 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/404.shtml, referer: http://www.theirdomain.com/
[Sun Jul 19 15:46:54 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/gallery, referer: http://www.theirdomain.com/
[Sun Jul 19 15:46:54 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/404.shtml, referer: http://www.theirdomain.com/
[Sun Jul 19 15:46:55 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/gallery, referer: http://www.theirdomain.com/
[Sun Jul 19 15:46:55 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/404.shtml, referer: http://www.theirdomain.com/
[Sun Jul 19 15:46:55 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/gallery, referer: http://www.theirdomain.com/
[Sun Jul 19 15:46:55 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/404.shtml, referer: http://www.theirdomain.com/
[Sun Jul 19 15:46:56 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/gallery, referer: http://www.theirdomain.com/
[Sun Jul 19 15:46:56 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/404.shtml, referer: http://www.theirdomain.com/
[Sun Jul 19 15:46:56 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/gallery, referer: http://www.theirdomain.com/
[Sun Jul 19 15:46:56 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/404.shtml, referer: http://www.theirdomain.com/
[Sun Jul 19 15:46:56 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/gallery, referer: http://www.theirdomain.com/
[Sun Jul 19 15:46:56 2009] [error] [client 86.96.227.86] File does not exist: /home/useracct/public_html/404.shtml, referer: http://www.theirdomain.com/
[Sun Jul 19 15:47:16 2009] [error] [client 122.152.164.5] File does not exist: /home/useracct/public_html/front, referer: http://www.theirdomain.com/event?show=upcoming
[Sun Jul 19 15:47:16 2009] [error] [client 122.152.164.5] File does not exist: /home/useracct/public_html/404.shtml, referer: http://www.theirdomain.com/event?show=upcoming
[Sun Jul 19 15:48:07 2009] [error] [client 122.152.164.5] File does not exist: /home/useracct/public_html/event, referer: http://www.theirdomain.com/
[Sun Jul 19 15:48:07 2009] [error] [client 122.152.164.5] File does not exist: /home/useracct/public_html/404.shtml, referer: http://www.theirdomain.com/
I even tried visiting it as http://www.theirdomain.com/index.php/event and that works on Apache but throws a blank page in LiteSpeed – I am guessing that LiteSpeed is checking for the directory – not finding it – and then immediately throwing up a 404 without trying to process the index or something else strange.

More of the error log:
Code:
2009-07-19 15:57:46.468 [INFO] [HTAccess] Updating configuration from [/home/useracct/public_html/.htaccess]
2009-07-19 15:57:46.469 [INFO] [APVH_useracct_Suphp:] pid list size: 1
2009-07-19 15:57:46.469 [INFO] [APVH_useracct_Suphp:] add child process pid: 15770
2009-07-19 15:57:49.636 [INFO] [98.212.44.73:50406-0#APVH_theirdomain.com] File not found [/home/useracct/public_html/404.shtml]
2009-07-19 15:57:49.689 [INFO] [98.212.44.73:50406-1#APVH_theirdomain.com] File not found [/home/useracct/public_html/404.shtml]
2009-07-19 15:57:55.402 [NOTICE] [APVH_useracct_Suphp:] stop worker processes
Here is the .htaccess for the account:
Code:
RewriteEngine on
 
RewriteRule /letterspacer.gif$ index.php
RewriteRule !\.(js|ico|gif|jpe?g|png|css|swf|mp3|htm|pdf)$|^tinymce/|^lg/ index.php [NC]
RewriteRule ^upload/user/passport index.php$
 
RewriteCond %{HTTP_HOST} ^theirotherdomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.theirotherdomain.com$
RewriteRule ^.*$ "http\:\/\/theirdomain\.com" [R=301,L]
Thank you for any assistance - if anybody from litespeed wants to do some testing or needs anything specific (or for us to try anything specific) just let me know.
 

MikeDVB

Well-Known Member
#5
Not always... I meant have you tried disabling PHP suEXEC?
I ran php suEXEC/suPHP on Apache for quite some time before making the switch to LiteSpeed - I'd venture to say it's not suEXEC causing the issue otherwise it would cause issues with Apache as well.

Out of over 2,000 domains that we host across several servers this is the one and only account that is having any issues.

To be totally honest I'm not sure what in Apache that even allows /index.php/event or /index.php/gallery to work - whatever it is in Apache that makes that work doesn't seem to work in LiteSpeed.

I need to test if this is a problem with magento because I know it also does /index.php/admin etc...
 
Last edited:

mistwang

LiteSpeed Staff
#7
I think there was a PHP error, please try to let PHP output the error to the log file or the web browser. It is not a rewrite rule problem since you access the rewritten URL directly got the same result.

Those rewrite rules in .htaccess does not rewrite URL "/gallery", if gallery directory does not exist, LSWS will return 404, so it looks normal. Cannot tell how it was handle by Apache, at least not by the rewrite rules.
 

MikeDVB

Well-Known Member
#8
I think there was a PHP error, please try to let PHP output the error to the log file or the web browser. It is not a rewrite rule problem since you access the rewritten URL directly got the same result.

Those rewrite rules in .htaccess does not rewrite URL "/gallery", if gallery directory does not exist, LSWS will return 404, so it looks normal. Cannot tell how it was handle by Apache, at least not by the rewrite rules.
I can enable displaying PHP Errors instead of logging them to see if there is in fact a PHP error being tossed up - but what it looks like to me is LSWS is just looking for /gallery and seeing that it doesn't exist and immediately tossing up an error without trying index.php/gallery - but in my eyes I don't know why LSWS (or Apache) would even try index.php/gallery because that would seem to add some overhead and is quite likely somewhere that LiteSpeed is simply faster due to not having this "additional" check.

I'll enable PHP Error Display and see what happens, give me a moment.
 

MikeDVB

Well-Known Member
#9
I see that LiteSpeed is not using their custom php.ini - this is the base issue - is this not something that is supported by LiteSpeed or is this something that needs enabled/configured?
 
Last edited:

MikeDVB

Well-Known Member
#10
I moved all of the php settings over to the .htaccess and the site is working beautifully on LiteSpeed. Yay!

Thanks for your assistance.
 

mistwang

LiteSpeed Staff
#13
I see that LiteSpeed is not using their custom php.ini - this is the base issue - is this not something that is supported by LiteSpeed or is this something that needs enabled/configured?
suphp uses php.ini under user's directory, while LiteSpeed is like mod_php, uses global php.ini + .htaccess .
LiteSpeed can be configured to use php.ini under user's directory, however, I think php.ini + .htaccess is more secure as the server admin can control which PHP feature is allowed, which is not.
 

MikeDVB

Well-Known Member
#14
suphp uses php.ini under user's directory, while LiteSpeed is like mod_php, uses global php.ini + .htaccess .
LiteSpeed can be configured to use php.ini under user's directory, however, I think php.ini + .htaccess is more secure as the server admin can control which PHP feature is allowed, which is not.
Yeah - I prefer to have it in the .htaccess :)

I'll do some more looking around :)
 
Top