PHP options won't change after updating global.php and php.conf
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Chris
  2. Monday, 03 July 2017
  3.  Subscribe via email
PHP options won't change.

Hi I have done the following...

Copied a new defaults.cfg, global.php and php.conf file into /etc/cl.selector

Then I ran...

/usr/bin/selectorctl --apply-global-php-ini
cagefsctl --rebuild-alt-php-ini
cagefsctl --setup-cl-selector

Customer then tells me upload_max_filesize has defaulted to 2MB, even though I set this in global.php and php.conf. I looked in cpanel and sure enough, none of his configurable options were set to the ones I configured. They can be changed, but are defaulting to a basic php.ini that should have been updated by my changes.

What did I do wrong?
Rate this post:
  1. 12.07.2017 13:07:24
  2. # 1
Chris Accepted Answer
Posts: 18
Joined: 31.03.2017
It was entirely my fault. One of the directives was mis-spelled.

This caused none of the changes to be implemented - but also didn't produce any error. Would be useful for the script to produce some output if the --apply-global-php-ini function fails.
  1. 12.07.2017 07:07:54
  2. # 2
Chris Accepted Answer
Posts: 18
Joined: 31.03.2017
I just enabled PHP 5.2 for a client via lve manager in cpanel and it didn't pick up any of the settings from php.conf. When I login to the user's cpanel and go to change the PHP options, all the standard php.ini defaults are set rather than the ones I have added to the config files.

Before I open a support ticket, is there something I'm missing? Shouldn't the default php.ini for any version I enable be automatically overridden by the settings in global.php and php.conf?

Do I need to do anything else when enabling a new version to force these changes?
  1. 05.07.2017 10:07:02
  2. # 3
Havri Accepted Answer
Posts: 26
Joined: 30.07.2015

Please make sure you have CageFS installed and enabled and the users are inside CageFS. Also, check if you have PHP installed from Cloudlinux repos. You can check that with:

rpm -qa | grep php

Good luck.
  1. 04.07.2017 09:07:17
  2. # 4
Vladimir Accepted Answer
Posts: 108
Joined: 04.07.2017
Hello Chris,

Could you please create support ticket with us.

We would like to check this problem more closely.
  • Page :
  • 1

There are no replies made for this post yet.
Be one of the first to reply to this post!
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.