Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.

All new sites that are set up with suPHP enabled to automatically create a copy of the server php.ini file

Feature Importer shared this idea 13 years ago
Open Discussion

As a Server Administrator, I want all new sites that are set up with suPHP enabled to automatically create a copy of the server php.ini file, so that my clients are able to easily configure PHP settings.


I have noticed that suphp is now enabled by default for new cPanel installations.


As a feature request is it possible for new sites that are set up with suphp enabled to automatically create a copy of the server php.ini in /home/<user>/etc and then add the following like to the .htaccess file for the new site:


suPHP_ConfigPath /home/<user>/etc/php.ini


This would make things very easy for cPanel end users (domain admins) to configure PHP settings as they would only need to download the /etc/php.ini file through FTP make the changes and then re-upload it.


This is a feature that has been migrated over from the cPanel Forums. All previous comments and discussions concerning this feature can be located at:

http://forums.cpanel.net/f145/better-configuration-sites-suphp-enabled-servers-end-users-143381.html

Replies (10)

photo
3

I think you can do this right now with a simple post account creation event hook:


http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/StdHooksEvents

photo
3

I would suggest placing the suPHP_ConfigPath in the httpd.conf vhost instead.

photo
1

It's not a very good idea to let your customers edit the php.ini


They could easily remove the security limitations and let hackers have full control over that site and thus extend to other servers or even attack accounts outside this server.


If you want to you can do it on your own, but I don't think that all servers should have an option to do this.

photo
1

Silent Ninja wrote:

It's not a very good idea to let your customers edit the php.ini

They could easily remove the security limitations and let hackers have full control over that site and thus extend to other servers or even attack accounts outside this server.

If you want to you can do it on your own, but I don't think that all servers should have an option to do this.

Unfortunately most hosts will want/need the option available and making it available in WHM would help a lot of hosts who currently hack together their own custom methods.

photo
2

Eventually I would love to see custom PHP settings handled in a way that allows root to specify what settings can be customized and withing cPanel the site owner can change those options only. Also resellers being able to globally change those permitted settings to apply to all of their sites.

photo
1

Tony Kammerer wrote:

Eventually I would love to see custom PHP settings handled in a way that allows root to specify what settings can be customized and withing cPanel the site owner can change those options only. Also resellers being able to globally change those permitted settings to apply to all of their sites.
Allowing resellers to "globally" change permitted settings would affect all other sites as well. Users would owned by $RESELLER would have to be locked to a specific php.ini file.

photo
1

Chris Borsheim wrote:

Allowing resellers to "globally" change permitted settings would affect all other sites as well. Users would owned by $RESELLER would have to be locked to a specific php.ini file.

Sorry for not being clear, I my ideal, resellers would be able to set what they want as defaults for all of their sites out of the options that root allows to be customized. Each site would have their own php.ini if the reseller has changed the customizable options from default for their sites or if the cPanel account has changed the customizable options.

photo
1

You can put a copy of the php.ini file and any file in the skeleton and it will automatically be copied to every new site when they are created.

photo
1

All these have been discussed over and over.

It is a MUST! Highly appreciated...

AS AUTOMATED AS POSSIBLE ;-)

As easy as possible, as well promptly configured!

What do you think cPanel? When can we get it?

Please, listen to this and related topics.

Really listen to this cPanel.

And also consider making it easier dealing with FCGID.

A must have!

Thanks,

photo
1

On suPHP you can write your own php.ini file and save it to the /public_html/ folder, this file supercedes the root php.ini and applies new settings but ONLY TO THE PHP FILES IN THAT FOLDER ( a bit like how htaccess works with httpd.conf ). This should be more than suitable for what this request is asking for,


I fully agree with other posts that allowing changing of wider php.ini settings is asking for trouble, it's not IF but WHEN that gets abused and compromised. The current php.ini system works well and there is a suitable damage limitation (folder specific) with the relativey minor issue of having to copy PHP.ini files to each associated folder on the account.

Leave a Comment
 
Attach a file