![]() |
Running CGI version of PHP
I have a chrooted web hosting solution setup. I am trying to run php as a cgi instead of an apache module so it runs suexec as the chrooted user that owns the domain. So they have control of their own php.ini and uploaded files are owned by the correct user. I am having problems with this however.
I added a "Action" for the .php, .php3... file types and added in User and Group entries for the virtual host but when it tries to load up the file.. it calls up the default document root and then appends on the location of the action. like /var/www/html/usr/bin/php or something. Any one have any experience in setting this sort of thing up? Thanks in advance |
Well, one question aside, how do you manage to get functions like MAIL to work properly ?
Regarding your question you could set some kind of variables on a per virtual host bases like: Quote:
|
I havent gotten to that point yet. Why couldn't you get mail working. Wouldn't you just have to give the user access to sendmail? I'm just worried about getting apache parsing php through cgi... and running the script as the owner of the site. Do you know how to get that running?
|
I'm running PHP as module and using the documentroot, etc restrictions which are nice. Also I have the directory set up pretty strict ...
About getting mail working, when you chroot apache there will not be a sendmail in your chroot ... I think the best solution would be PHP supporting mail servers (IP, SMTP authentification) rather than just that sendmail function ... I think this is an important feature missing! |
Well i have a complete chroot enviroment for the user. Not just a chrooted apache. So the sendmail binary can be accessable by php in a chrooted session. I'm just looking for instructions on how to get php running as a cgi so i can have it run php scripts as a different user.
|
| All times are GMT -5. The time now is 08:56 AM. |