danf

Active Member
Apr 10, 2006
26
0
151
Is there any way to turn on suPHP using .htaccess, or some other way to do it on a site-by-site basis? I would like to test this functionality before turning it on for all users.

Thanks.
 

casey

Well-Known Member
Jan 17, 2003
2,288
0
191
You can install two instances of PHP. One php4 and one php5 (one CGI and one apache module). I forgot how it's done, but you should be able to use the apache conf file to assign different users to different instances of PHP.
 

danf

Active Member
Apr 10, 2006
26
0
151
You can install two instances of PHP. One php4 and one php5 (one CGI and one apache module). I forgot how it's done, but you should be able to use the apache conf file to assign different users to different instances of PHP.
Thanks, but I don't want to install PHP 4. It's never been installed on this server, and it is now end-of-lifed.

I was hoping to be able to do something like this in a user's .htaccess:

suPHP_Engine on

This didn't work, but I did find something that did work. I used a .conf files for a virtual host and added these lines:

suPHP_Engine on
AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
suPHP_AddHandler application/x-httpd-php5

I then ran this:

/scripts/ensure_vhost_includes --user=username

It seemed to work fine.