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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > litespeed, chmod conf file to 600

Reply
 
Thread Tools Display Modes
  #1  
Old 06-16-2009, 08:15 AM
Markovic Markovic is offline
Member
 
Join Date: Jun 2009
Posts: 12
Default litespeed, chmod conf file to 600

Hello,

I installed lsws without apache conf file(httpd.conf). Then I created a new virtual host in "suEXEC" Template. I added a new user via SSH and made home dir for him and chowned his home dir + all his files to hisusername:hisusername. His home dir(/home/user/) is chmoded to 755 and his /public_html to 711. It worked fine but after that I installed phpbb3 forum and when I tried to chmod config.php to 600 I got an error on the forum:

Fatal error: require() [function.require]: Failed opening required './config.php' (include_path='.:/usr/local/lib/php') in /home/username/public_html/common.php on line 127

When I was using lsws with apache conf file and I had configured suEXEC + suPHP for apache I was able to chmod config file to 600 and it worked fine. I have no idea what could be the problem now.

It works fine when I chmod config.php to 755 but for security reasons I would need a way to configure it to 600.

It's really important for me and I really hope I will get a solution here. George? Others?

Thanks
Best Regards
Reply With Quote
  #2  
Old 06-16-2009, 08:23 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
I think PHP is not in suEXEC mode.
double check the PHP command path in the suEXEC template, make sure it uses the right PHP binary.
Reply With Quote
  #3  
Old 06-16-2009, 09:05 AM
Markovic Markovic is offline
Member
 
Join Date: Jun 2009
Posts: 12
Quote:
Originally Posted by mistwang View Post
I think PHP is not in suEXEC mode.
double check the PHP command path in the suEXEC template, make sure it uses the right PHP binary.
Virtual host is in suEXEC Template, I'm 100% sure. How to check PHP command path and PHP binary?

I installed php 5.2.9 with LSAPI and suhosin patch + sendmail patch from this paper
http://nix101.com/2007/09/22/setting...for-litespeed/
Reply With Quote
  #4  
Old 06-16-2009, 07:26 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Just check the external app configuration in the suEXEC vhost template.
Reply With Quote
  #5  
Old 06-16-2009, 11:05 PM
Markovic Markovic is offline
Member
 
Join Date: Jun 2009
Posts: 12
EX. APP
LSAPI App
$VH_NAME_lsphp
uds://tmp/lshttpd/$VH_NAME_lsphp.sock

SCRIPT HANDLER
Suffix: php5
Type: LiteSpeed API
Name: [VHost Level]: $VH_NAME_lsphp

Does it look ok?
Reply With Quote
  #6  
Old 06-17-2009, 12:34 AM
Markovic Markovic is offline
Member
 
Join Date: Jun 2009
Posts: 12
Environment is empty, if could be the problem maybe?

And note, I'm using lsws 3.3.24, I haven't updated yet. Litespeed is running as nobody:nobody
If you need any other info let me know, I really need to get it fixed

Last edited by Markovic; 06-17-2009 at 12:42 AM..
Reply With Quote
  #7  
Old 06-17-2009, 04:50 AM
auser auser is offline
Senior Member
 
Join Date: Mar 2009
Posts: 119
Quote:
Originally Posted by Markovic View Post
SCRIPT HANDLER
Suffix: php5
Type: LiteSpeed API
Name: [VHost Level]: $VH_NAME_lsphp
this is for .php5, how about .php ?
Reply With Quote
  #8  
Old 06-17-2009, 06:22 AM
Markovic Markovic is offline
Member
 
Join Date: Jun 2009
Posts: 12
Quote:
Originally Posted by auser View Post
this is for .php5, how about .php ?
Yes, by default there was .php but I changed to .php5 because with .php the server recognizes as php version 4. phpinfo shows I'm running 5.2.9, php -v too but php shell shows I'm running php version 4 and phpmyadmin is not working, guess what, error like it's not compatible with php4 :O

For .php there was:
SCRIPT HANDLER
Suffix: php
Type: LiteSpeed API
Name: [VHost Level]: $VH_NAME_lsphp

Also, I asked about it at WHT forum and I got interesting reply.
I have a couple of lsws5 processes running as nobody:nobody, but with suEXEC they should be running as user:user, isn't it?

Thanks
Reply With Quote
  #9  
Old 06-17-2009, 06:41 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
the command parameter points to a PHP4 binary, you should set it
something like $SERVER_ROOT/fcgi-bin/lsphp5 ,
http://www.litespeedtech.com/docs/we...ps/#extAppPath
Reply With Quote
  #10  
Old 06-17-2009, 06:42 AM
auser auser is offline
Senior Member
 
Join Date: Mar 2009
Posts: 119
Quote:
Originally Posted by Markovic View Post
Yes, by default there was .php but I changed to .php5 because with .php the server recognizes as php version 4. phpinfo shows I'm running 5.2.9, php -v too but php shell shows I'm running php version 4 and phpmyadmin is not working, guess what, error like it's not compatible with php4 :O

For .php there was:
SCRIPT HANDLER
Suffix: php
Type: LiteSpeed API
Name: [VHost Level]: $VH_NAME_lsphp
at the user's phpbb3 forum root, put phpinfo.php, check php version, 4 or 5.2.9?

Quote:
Originally Posted by Markovic View Post
Also, I asked about it at WHT forum and I got interesting reply.
I have a couple of lsws5 processes running as nobody:nobody, but with suEXEC they should be running as user:user, isn't it?
yes, should be.
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 07:39 AM.



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