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

Go Back   LiteSpeed Support Forums > External Applications > PHP > Problem running Gallery under LiteSpeed

Reply
 
Thread Tools Display Modes
  #1  
Old 09-01-2006, 01:29 PM
kchrist kchrist is offline
New Member
 
Join Date: Sep 2006
Location: San Francisco, CA
Posts: 2
Default Problem running Gallery under LiteSpeed

I'm trying to get the Gallery photo gallery (PHP/MySQL) working under LiteSpeed. This same installation works fine when running under Apache, but throws an error when trying to view it via LiteSpeed (which is running simultaneously on a different port).

Apache is running as the user 'www-data', while LiteSpeed is running as 'nobody', but the Gallery data directory and all subdirectories are world-writable. This gallery also works fine under lighttpd. I suspect the problem is with PHP, as LiteSpeed is using it's own PHP module (via lsapi) while Apache and lighttpd are using the system's PHP5 installation. LiteSpeed is running PHP (4) fine otherwise.

Because this is likely a Gallery problem rather than a LiteSpeed problem, I've posted more details in the Gallery support forums. I'm mainly wondering if anyone here has any tips or info regarding the Gallery/LiteSpeed combo.
Reply With Quote
  #2  
Old 09-01-2006, 01:59 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Compile your own lsphp binary using PHP5 might be the fix to your problem.
Reply With Quote
  #3  
Old 09-01-2006, 02:12 PM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
Depending on what the exact "error message" that php threw at you, we can help you pin-point the problem down.

The best way is ensure that your PHP is up to date is as George suggested: compile your own latest and great PHP5 for litespeed. Use our step by setup wiki how-to:

http://www.litespeedtech.com/support/wiki/
Reply With Quote
  #4  
Old 09-01-2006, 02:36 PM
kchrist kchrist is offline
New Member
 
Join Date: Sep 2006
Location: San Francisco, CA
Posts: 2
Ok, I've got a bit of an update. I enabled error logging in the LS php.ini (it was already enabled, but not writing to the web server log, so I had to explicitly specifiy a log file). Once I did, I was able to find the PHP error that Gallery wasn't displaying. It seems the orignal error was caused by the LS PHP module looking in the wrong place for mysql.sock. I corrected that in /opt/lsws/conf/php.ini and am now getting a different Gallery error. Unfortunately, unlike the first one, this one isn't being logged. I've updated the post in the Gallery support forum and am still waiting for any feedback over there.

I think you'll understand when I say that I'd rather avoid compiling a new version of PHP for a single application. I may have to do so eventually in order to get PHP5, but I may just stick with PHP5 via FastCGI (once I have time to figure out how to get that working).

Thanks.
Reply With Quote
  #5  
Old 10-01-2006, 02:53 PM
gboudreau gboudreau is offline
Member
 
Join Date: Oct 2006
Location: Montr
Posts: 49
If you use the URL rewrite module for Gallery 2, here's what you'll need to do to be able to use Litespeed httpd.

Edit /.htaccess

Invert those those lines:

Code:
RewriteCond %{THE_REQUEST} \ /d/([0-9]+)-([0-9]+)/([^\/\?]+)(\?.|\ .)
RewriteCond %{REQUEST_FILENAME} !/main\.php$
to get

Code:
RewriteCond %{REQUEST_FILENAME} !/main\.php$
RewriteCond %{THE_REQUEST} \ /d/([0-9]+)-([0-9]+)/([^\/\?]+)(\?.|\ .)
And also invert those lines:

Code:
RewriteCond %{THE_REQUEST} \ /v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_FILENAME} !/main\.php$
to get

Code:
RewriteCond %{REQUEST_FILENAME} !/main\.php$
RewriteCond %{THE_REQUEST} \ /v/([^?]+)(\?.|\ .)
Also edit modules/rewrite/templates/Htaccess.tpl

Change:

Code:
RewriteCond %{ldelim}THE_REQUEST{rdelim} \ {$Htaccess.rewriteBase}{$rule.pattern}(\?.|\ .)
RewriteCond %{ldelim}REQUEST_FILENAME{rdelim} !{$Htaccess.matchBaseFile}$
into:

Code:
RewriteCond %{ldelim}REQUEST_FILENAME{rdelim} !{$Htaccess.matchBaseFile}$
RewriteCond %{ldelim}THE_REQUEST{rdelim} \ {$Htaccess.rewriteBase}{$rule.pattern}(\?.|\ .)
__________________
- Guillaume Boudreau
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Another Apache / LiteSpeed how-to question ovizii Apache Migration/Compatibility 3 03-30-2007 08:30 AM
Unable to log to STDOUT from Ruby/Rails when running under LiteSpeed dirkbj Ruby/Rails 5 11-15-2006 10:03 AM
Problem installing LiteSpeed 2.2.1 Standard on UNIX perezsy Install/Configuration 17 09-22-2006 09:53 AM
Best configuration for PHP LiteSpeed SAPI jeff Install/Configuration 6 10-19-2005 09:54 AM
1.5RC1 context xing Bug Reports 2 04-28-2004 09:27 AM


All times are GMT -7. The time now is 02:12 PM.



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