Selectively allow config variables through ini_set?
I'm using Apache, Cloudlinux and mod_lsapi on my servers. I know ini_set is required by some apps that's why I can't disable it globally.
Is there a way to allow ini_set but disallow it on some configurations, for example max_execution_time? Or just a way to override it (again) on execution?
I know php_admin flag on Apache global conf can do this if not using suphp.
Basically, I'm looking into any possible method. Config file or brute overriding on execution time, or if there's a better way to do it?
Thanks!
-
Hello :) Cloud Linux documents mod_lsapi at: CloudLinux Documentation There's a forums thread over on the Cloud Linux support forums with a related question: mod_lsapi not loaded custom php.ini and shows weird behaviour Are you using PHP Selector with Cloud Linux? Thank you. 0 -
EDIT: Sorry, I missed that part, lsapi does allow php_admin flag. Thanks! Hi Michael, Yes, I'm using both lsapi and CL. Thanks for the links but that's not what I'm trying to accomplish. I want to allow users to set limits using ini_set or any other way, but they shouldn't be able to override execution time. I don't think there's a way to do this, is it? 0 -
EDIT: Sorry, I missed that part, lsapi does allow php_admin flag. Thanks!
Does this address your concerns, or are you still unable to prevent users from overriding specific values? Thank you.0 -
Does this address your concerns, or are you still unable to prevent users from overriding specific values? Thank you.
Apache post virtualhost global config did allow this value (wrapped in an IfModule), however it did not work globally. The workaround I found is that you included it in every virtualhost directive instead of globally inserting it. I haven't tested this yet and I still haven't found away to do this automatically instead of appending it for every virtualhost in httpd.conf. Let me know if cPanel has a way for this. Thanks. EDIT: Found this Modify Virtualhost Containers With Include Files - EasyApache - cPanel Documentation and will try it shortly. Sorry, I'm handling multiple tasks :(0 -
EDIT: Finally got it to work. Steps to replicate (tested on indiv virtualhost first, will try global later): 1. Wrap in instead of mod_suphp.c or mod_php5.c 2. Do distiller > How to edit all vhost on cpanel 3. Try using phpinfo() and ini_set, should return false --------- Question: There seems to be no directive in httpd.conf for global /usr/local/apache/conf/userdata/$includename.conf? Should this be added automatically after distiller? 0 -
There seems to be no directive in httpd.conf for global /usr/local/apache/conf/userdata/$includename.conf? Should this be added automatically after distiller?
You do not have to use the Apache distiller when following the guidelines at: Modify Virtualhost Containers With Include Files - EasyApache - cPanel Documentation Simply create the "/usr/local/apache/conf/userdata/$includename.conf" file (changing "$includename" to whatever file name you prefer) and rebuild the Apache configuration file via:/scripts/rebuildhttpdconf
Thank you.0
Please sign in to leave a comment.
Comments
6 comments