Параметры PHP не будут изменены после обновления global.php и 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. 04.07.2017 09:07:17
  2. # 1
Vladimir Accepted Answer
Posts: 108
Joined: 04.07.2017
0
Votes
Undo
Hello Chris,

Could you please create support ticket with us.

We would like to check this problem more closely.
  1. 05.07.2017 10:07:02
  2. # 2
Havri Accepted Answer
Posts: 26
Joined: 30.07.2015
0
Votes
Undo
Hello,

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. 12.07.2017 07:07:54
  2. # 3
Chris Accepted Answer
Posts: 18
Joined: 31.03.2017
0
Votes
Undo
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. 12.07.2017 13:07:57
  2. # 4
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
Hard to say what could be wrong. Really we would better like to check the issue in place.

After running "selectorctl --apply-global-php-ini" all /opt/alt/phpXX/etc/php.ini should be updated with those custom values from your global.
  1. 12.07.2017 13:07:24
  2. # 5
Chris Accepted Answer
Posts: 18
Joined: 31.03.2017
0
Votes
Undo
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 15:07:56
  2. # 6
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
The apply-global does not validate php directives, and PHP also, it just skip it.
  • 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)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.