Reputation: 4676
I have apache/PHP - WINDOWS server. I have 2 different sites (www.example.com and test.example.com) I have used vhosts to configure my subdomain.
Is it possible to load different php.ini files for each subdomain ? I have a problem with the first site which is coming from using extension for the second site. So I need to enable it for the second ONLY or to disable it for the first only.
Upvotes: 4
Views: 289
Reputation: 316939
Extensions can be enabled programmatically on some SAPIs with
Please read the manual carefully for security implications and forward compatibility issues.
For more options, see
Upvotes: 1
Reputation: 15361
Many settings in the php.ini can be overridden in the .htaccess file, or in the executing script itself. Look at the list: https://www.php.net/manual/en/ini.list.php and refer to the Changeable column for details.
If by "extension" you mean a php extension, then no, you can't have a different php extension on the same server, because php is shared. The only way you would be able to accomplish that would be to have a 2nd apache server running. If this is truly a test site, a separate server would be feasible because you could run it on a separate port, but I wouldn't suggest going that route unless you were highly confident in your skills as a windows sysadmin.
Upvotes: 0
Reputation: 7504
You can't activate php extension from php file. You can only check loading of a specific ext.
Upvotes: 1