
|
View Full Version : suEXEC and PHPsuEXEC
DChang 01-28-2004, 01:21 PM Is it recommended to install and enable suEXEC and PHPsuEXEC?
I basically just want to prevent 'nobody' to send out mail, that each account will send from a specific address. Is that the right way to do it?
I heard it may cause problems to some scripts.
Is there an alternative?
Thanks!
sysadm 01-28-2004, 02:04 PM Originally posted by DChang
Is it recommended to install and enable suEXEC and PHPsuEXEC?
I basically just want to prevent 'nobody' to send out mail, that each account will send from a specific address. Is that the right way to do it?
I heard it may cause problems to some scripts.
Is there an alternative?
'suexec' is not bad. You can use it. Will work for CGI scripts.
About 'phpsuexec' you should think more to decide yourself. It's very, very slow. Of course, it depend on how websites are on the server but in some situations it's higly not recommended. You have to know, that in phpsuexec one system process is running for each php script. Some websites can run tens php scripts per second. So system runs /usr/bin/php binary many, many times.
The next issue are problems with phpsuexec. All you .php scripts should be chown to good user/group. All scripts should have right chmod (exec for owner). Also some php functions are unavailable in phpsuexec. HTTP authentication with PHP also doesn't work. You can use only .htaccess/.htpasswd.
Regards,
sysadm
Faldran 01-28-2004, 02:25 PM Originally posted by sysadm
About 'phpsuexec' you should think more to decide yourself. It's very, very slow. Of course, it depend on how websites are on the server but in some situations it's higly not recommended. You have to know, that in phpsuexec one system process is running for each php script. Some websites can run tens php scripts per second. So system runs /usr/bin/php binary many, many times.
We have installed this on even some of the busy servers we had, and had no increase in load or resource useage.
The next issue are problems with phpsuexec. All you .php scripts should be chown to good user/group. All scripts should have right chmod (exec for owner). Also some php functions are unavailable in phpsuexec. HTTP authentication with PHP also doesn't work. You can use only .htaccess/.htpasswd.
Well, the chmod part should not be a problem, unless you have some clients that think everything should chmod 777.
Yes HTTP, authentication does not work, but can be done with .htaccess as he stated.
Of course you can not set php values in .htaccess, must install php.ini into thier root directory and set them that way.
Only other feature that does not work at this time, is the apache look-back feature. ( this can even be worked around with mod-rewrite )
So you just got to make a few small changes for you/your clients do things.
sysadm 01-28-2004, 03:06 PM Originally posted by Faldran
[B]We have installed this on even some of the busy servers we had, and had no increase in load or resource useage.
It must be not too busy server :). One of my customers (I'm system admin) had server with one heavy load php/mysql website. Server (2.4GHz/1GB) was making about 5 milions SQL queries every day. PHP max executing time was only 10sec. Enabling/disabling phpsuexec was very noticeable.
Regards,
sysadm
cortices 01-28-2004, 03:09 PM Well, sysadm, I'd argue that your situation was the exception and not the rule. You can hardly call PHP suExec "very, very slow" because it slowed down a site like that. With that type of traffic, even the tiniest of slowdowns will be noticeable.
In most situations, the benefits of PHP suExec clearly outway any side effects.
sysadm 01-28-2004, 04:53 PM Originally posted by cortices
In most situations, the benefits of PHP suExec clearly outway any side effects. [/B]
Yes, as I said before it depend on how websites are on the server. Everyone should do investigate and think if phpsuexec will help him or not.
Regards,
sysadm
DChang 01-28-2004, 11:25 PM Well, does it cause issues in running certain scripts?
Steven 01-28-2004, 11:41 PM Well, we have this running on a server atm doing 200 querys a second average, no noticable slow down. altho it does cause increased ram usage at times
Faldran 01-29-2004, 01:40 AM Like they are saying above...
It depends on the sites you have, and the server it self ( processor, RAM, etc ).
I run it on all of our servers, without it causing a problem.
I would have to agree if you got a super busy server, and you add it, you will notice a difference. But on a shared server, I think that having php+suexed is far outweighed by any side effects it may have.
But we all have our choices, best thing is to test it and try it out and see if fits your needs or not.
|