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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > setup php in rails template

Reply
 
Thread Tools Display Modes
  #1  
Old 01-25-2007, 12:05 AM
cswilliams cswilliams is offline
Member
 
Join Date: Jan 2007
Posts: 24
Default setup php in rails template

Hi,
I'm using the provided rails virtual host template and everything is working fine. However, I want to add php support to this so I can run mint on my site. I installed and compiled php per your directions and didn't run into any problems. However, I'm having trouble getting php pages to work on my site now.
First I setup an external application in my virtual host identical the external application that you have in the sample php template. I then was not sure whether to setup an lsapi context called /mint (i keep the mint php files in my rail's app's public folder) or to simply add a script handler for .php files.

I tried both ways and I couldn't get it to work. When I created a context called /mint and then tried to go to any php page in it (I even created a sample php script that just called phpinfo()), I got the following error:
2007-01-24 23:16:31.904 [NOTICE] [127.0.0.1:50066-7#testing:lsapi] [STDERR] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
2007-01-24 23:16:31.904 [NOTICE] [127.0.0.1:50066-7#testing:lsapi] [STDERR] PHP Fatal error: Unknown: Failed opening required 'LS' (include_path='.:/usr/local/php5-lsws/lib/php') in Unknown on line 0

I then tried removing this context and just adding a script handler for php files (using lsapi and linking to the external app I setup). Unfortunately though, any php page I tried to go to just came up as a blank page in my browser and viewing the source revealed the php script itself.

I must also add that I tried using the php template by itself without any rails stuff and got the same behavior (scripts would just load as a blank page and you could see the source of the script if you did view source in the browser)

I'm also using php 5.2.

Any help would be appreciated.

Thanks in advance,
-Chris
Reply With Quote
  #2  
Old 01-25-2007, 12:22 AM
cswilliams cswilliams is offline
Member
 
Join Date: Jan 2007
Posts: 24
Well I got it working finally using the php script handler. An error in my test script was causing it just to output a blank page. doh! Its been awhile since I've worked in php

Anyhow, I am curious though, is there a way to get it to work through a context instead of through a script handler? I get those strange errors when I try to do it that way. No big deal though, just curious.
Thanks again for this great piece of software.
-Chris
Reply With Quote
  #3  
Old 01-25-2007, 08:21 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
You have to use script handler configuration for php, context will not work.
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 11:01 AM.



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