guest_

Registered
Oct 3, 2006
2
0
151
My friend asked me to help him with his WHM. And I have a question about phpsuexec. As far as I understood this is module from cPanel.net? Is it possible to see a documentation on it and sources?

Actually I have only one important question regarding phpsuexec: is it possible to use different php.ini for different VirtualHosts with this module or not?

And if it's impossible what you can suggest if I extremely need different PHP settings for different VirtualHosts? suPHP maybe? Our software is Apache is 1.3.x and PHP 4.x

Thank you.
 

sparek-3

Well-Known Member
Aug 10, 2002
1,983
218
343
cPanel Access Level
Root Administrator
I think phpsuexec lets you use a customized php.ini file in directories that contain the executed PHP script. This only works with PHP4, I think this feature was taken out of PHP5, although I think its being added back in future PHP5 releases.

The problem with this is that php.ini files are only read directory by directory instead of for the entire VirtualHost. This means, that if you place a customized php.ini file in the public_html directory then it is only read by PHP scripts that are executed in the public_html directory. PHP scripts in public_html/scripts would read the server-wide php.ini file unless another customized php.ini file is located in that directory.

suPHP is a solution, it allows you to apply customized php.ini files for each VirtualHost. However, it is not supported by cPanel (atleast not with Apache 1.3, I don't think). I did write a guide for getting suPHP to work on cPanel servers with Apache 1.3:

http://www.spareknet.org/howtos/suphp.php

I don't recommend the guide, unless you feel comfortable working in a Linux environment and know how to make configuration adjustments.
 

MaraBlue

Well-Known Member
May 3, 2005
334
2
168
Carmichael, CA
cPanel Access Level
Root Administrator
guest_ said:
My friend asked me to help him with his WHM. And I have a question about phpsuexec. As far as I understood this is module from cPanel.net?
No. It's an Apache module.

Is it possible to see a documentation on it and sources?

Actually I have only one important question regarding phpsuexec: is it possible to use different php.ini for different VirtualHosts with this module or not?

And if it's impossible what you can suggest if I extremely need different PHP settings for different VirtualHosts? suPHP maybe? Our software is Apache is 1.3.x and PHP 4.x

Thank you.
I'm fighting the urge to suggest Google, here...I really, truly am. Normally it annoys me to no end when people get "uppity" in this or any forum and point a poster to Google, but in this case, it's clear you haven't even attempted a search.

Here's an easy-to-read article on PHPSUexec. I found it on Google ;-)

http://codylindley.com/Misc/74/server-security-issues--phpsuexec--textpattern