Put PHP version choices in server configuration
Open Discussion
This was originally submitted on March 26, 2018 and was lost in the March 28th server failure.
As a web developer, I would like the PHP version choice to be stored somewhere other than the `.htaccess` file. Having it in the `.htaccess` makes a git working tree dirty or can break things when a site is moved between a development server and a live server.
I see two options for this:
- Store the PHP version choice somewhere besides the `.htaccess`. This could be in the server config (although that would require a restart of `httpd` for any change.
- Wrap the config in the `/htaccess` in a cPanel-specific `<if>` directive. For example, create a dummy Apache module and use `<IfModule cpanel_server>` or define an environment variable and use `<IfDefine cPanelMultiPHP>`
Having a dirty git repository can cause a conflict with the new version control feature.
+1 for this. Can there be a configurable cpanel option (both globally and per-vhost) to change between storing the multiPHP PHP version choice in .htaccess and the Apache vhost configuration?
+1 for this. Can there be a configurable cpanel option (both globally and per-vhost) to change between storing the multiPHP PHP version choice in .htaccess and the Apache vhost configuration?
Replies have been locked on this page!