I think, I have a pretty great solution for each people here. This solution should make everybody happy.
This my idea
When an user setup is server he get few possibilites.
At setup time
Option :
[1] - PHP4 (mod_php) only
[2] - PHP5 (mod_php) only
[3] - PHP4 (mod_php) / PHP5 (suPHP)
[4] - PHP4 (suPHP) / PHP5 (mod_php)
[5] - PHP4 (suPHP) / PHP5 (suPHP)
We can imagine to use it with a paramaters when we launch setup.sh.
If no paramaters has been set, it install default PHP4 ? ...
At user account creation time
Before to propose options, the system check which option can be used.
Then, why not to create an option called "php_type" {1|2|3|4|5} that would appear in the creation form in directadmin and API system ?
Option :
[1] - Offer PHP4 only
[2] - Offer PHP5 only
[3] - Offer PHP4 (mod_php) / PHP5 (suPHP)
[4] - Offer PHP4 (suPHP) / PHP5 (mod_php)
[5] - Offer PHP4 (suPHP) / PHP5 (suPHP)
HTTPD configuration files
Option 1 - httpd.conf
Normal virtualhost. All is unchanged.
Option 2 - httpd.conf
Normal virtualhost. All is unchanged.
Option 3 - httpd.conf
Normal virtualhost with this :
# Handle PHP5 with suPHP
AddHandler x-httpd-php5 .php5
# suPHP with PHP5
<Location />
suPHP_Engine on
suPHP_ConfigPath /usr/local/etc/php5/cgi/
suPHP_AddHandler x-httpd-php5
</Location>
Option 4 - httpd.conf
Normal virtualhost with this :
# Handle PHP4 with suPHP
AddHandler x-httpd-php .php
# suPHP with PHP4
<Location />
suPHP_Engine on
suPHP_ConfigPath /usr/local/etc/php4/cgi/
suPHP_AddHandler x-httpd-php4
</Location>
Option 5 - httpd.conf
All is changed.
# Handle PHP4+5 with suPHP
AddHandler x-httpd-php .php
AddHandler x-httpd-php5 .php5
# suPHP with PHP5
<Location />
suPHP_Engine on
suPHP_ConfigPath /usr/local/etc/php5/cgi/
suPHP_AddHandler x-httpd-php
suPHP_AddHandler x-httpd-php5
</Location>
----
I just would like to correct something.
empowering said:
You cannot run both PHP with mod_php. You can only run ONE php version with mod_php, the other one has to ne handled by mod_suphp.
---
Enjoy