|
|

04-13-2009, 03:31 PM
|
|
New Member
|
|
Join Date: Apr 2009
Posts: 6
|
|
php.ini and vhosts not loading local php.ini
i compiled with the --config-file-path=../php and phpinfo shows that it is loading the master php.ini from /usr/local/lsws/php/php.ini
rats, pdf file was too big, snipped below. what am I missing?
thanks
Rob
System Linux localhost.localdomain 2.6.18-128.1.6.el5 #1 SMP Wed Apr 1 09:19:18 EDT 2009
i686
Build Date Apr 13 2009 16:53:57
Configure
Command
'./configure' '--prefix=/usr/local/lsws/lsphp5' '--with-mysql' '--with-mysqli' '--with-zlib' '--with-
gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-
sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--with-config-file-
path=../php' '--with-jpeg-dir=/usr/lib' '--with-litespeed'
Server API LiteSpeed
Virtual Directory
Support
disabled
Configuration File
(php.ini) Path
../php
Loaded
Configuration File
/usr/local/lsws/php/php.ini
Last edited by rgranger; 04-13-2009 at 03:34 PM..
|

04-13-2009, 04:05 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
|
That's normal, the executable is /usr/local/lsws/lsphp5, ../php will be /usr/local/lsws/php, if php.ini exists under that directory, it will be used. if do not want that, just remove that configuration option, or change to absolute path.
|

04-13-2009, 04:10 PM
|
|
New Member
|
|
Join Date: Apr 2009
Posts: 6
|
|
Quote:
Originally Posted by mistwang
That's normal, the executable is /usr/local/lsws/lsphp5, ../php will be /usr/local/lsws/php, if php.ini exists under that directory, it will be used. if do not want that, just remove that configuration option, or change to absolute path.
|
I am using vhosts so I want www.rob.com to use for php
doc_root=/home/rob
/home/rob/php/php.ini
and
www.bill.com to use
doc_root=/home/bill
/home/bill/php/php.ini
as they may each have seperate requirements. My first read said that it shoudl be looking under the /home/xxx/php folder for php.ini?
Thanks
Rob
|

04-13-2009, 04:18 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
|
It only possible with vhost configured natively through vhost template. Not with Apache httpd.conf.
You have to add "-c $VH_ROOT/php/php.ini" to the command of PHP suEXEC external application.
|

04-13-2009, 04:22 PM
|
|
New Member
|
|
Join Date: Apr 2009
Posts: 6
|
|
Quote:
Originally Posted by mistwang
It only possible with vhost configured natively through vhost template. Not with Apache httpd.conf.
You have to add "-c $VH_ROOT/php/php.ini" to the command of PHP suEXEC external application.
|
Ok, now I am thinking that I will go back to apache
I am not using httpd.conf file or apache mode, strickly litespeed and vhosts configured though the gui. I don't have and external suphp scripts and am using the default handlers. do I need to setup an external php handler for each vhost?
|

04-13-2009, 04:36 PM
|
|
New Member
|
|
Join Date: Apr 2009
Posts: 6
|
|
Quote:
Originally Posted by rgranger
Ok, now I am thinking that I will go back to apache
I am not using httpd.conf file or apache mode, strickly litespeed and vhosts configured though the gui. I don't have and external suphp scripts and am using the default handlers. do I need to setup an external php handler for each vhost?
|
the command for php5 now has:
$SERVER_ROOT/fcgi-bin/lsphp5 -c $VH_ROOT/php
and when I restart and run phpinfo.
configuration File (php.ini) path = ../php
Loaded Configuration file = (none)
Scan this dir for add... = (none)
Additonal .ini files parsed = (none)
if I hard-code the path for the ini in the external app config, then it appears to work. but that would be dumb to require a different php app for each vhost? I must be missing something right?
|

04-13-2009, 05:25 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,590
|
|
|
You can customize vhost template based on the PHP suexec template.
If you want to use per-user php.ini, you need to create a php app for each user.
Or, you can let user override some php configuration via .htaccess.
|

04-13-2009, 05:43 PM
|
|
New Member
|
|
Join Date: Apr 2009
Posts: 6
|
|
Quote:
Originally Posted by mistwang
You can customize vhost template based on the PHP suexec template.
If you want to use per-user php.ini, you need to create a php app for each user.
Or, you can let user override some php configuration via .htaccess.
|
So, for a site with many vhosts they each would require a new handler, why not just expand the -c $VH_ROOT/php/php.ini? is there something with the architecture that prevents this? Is there a way to copy the handler and then just change the command line? it would save a lot of typing and potential mistakes...
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 11:07 PM.
|
|