Setting global php.ini limits
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Rudy
  2. 27.05.2020
  3.  Subscribe via email
Hi,

I have set all of the domain to be handled by cloudlinux PHP selector.

How can I now set the global PHP.ini limits in order to avoid abuse of the resources?

I thought I could do via MultiPHP INI Editor, whose resources by default are set at the minimum, but they are actually ignored.

Any help please?
Rate this post:
  1. 27.05.2020 12:05:00
  2. # 1
Sergey Khristich Accepted Answer
Posts: 375
Joined: 20.05.2019
0
Votes
Undo
Hello Rudy,
Thank you for reaching out! You can also through MultiPHP Manager, while choosing the appropriate Alt-PHP.
This information in our documentation will be useful here https://docs.cloudlinux.com/cloudlinux_os_components/#configuring-global-php-ini-options-for-all-alt-php-versions
Let me know if you have any questions.
Hope to hear from you soon.
Attachments (1)
Marketing Manager
  1. 27.05.2020 15:05:12
  2. # 2
Rudi Accepted Answer
Posts: 0
Joined: 04.07.2020
0
Votes
Undo
Hello Sergey,
Thank you for your kind reply.

I think I must be really confused.

If I select any alt-php in MultiPHP manager I will go then an error in LVE that asks me to select eaphp to get cloudlinux php selector working.

So I have selected ea-php73 for instance. According to the link you provided I have checked and there is not php.ini in /usr/local/lib

"When /usr/local/lib/php.ini file does not exist, error_log and date.timezone options will be taken from the php.ini file for system default PHP version selected in MultiPHP Manager."

Therefore I assume it should take the changes of ea-php73 in multiPHP INI.

The thing is that the setting in ea-php73 are, for instance, upload_max_filesize=2MB, but if a cpanel user set alt-php 64MB or over the limits.

Also all of memory limits are set by default = 256 MB, when this value is not even actually set anywhere.
  1. 27.05.2020 17:05:05
  2. # 3
Sergey Khristich Accepted Answer
Posts: 375
Joined: 20.05.2019
0
Votes
Undo
Hello,
I apologize for the misunderstanding. You need to change the values in the MultiPHP INI Editor for alt-PHP and not set Alt-PHP as a PHP for the user in the manager.
Thank you.
Marketing Manager
  1. 27.05.2020 17:05:28
  2. # 4
Rudi Accepted Answer
Posts: 0
Joined: 04.07.2020
0
Votes
Undo
Hi Sergey,

No need to apologise, thank you for your help instead.

I did set the global limits in MultiPHP.INI for alt-php but these are ignored as if a cpanel user set higher values than those that I set, the system accept them and are applied to the account.
  1. 28.05.2020 11:05:08
  2. # 5
Sergey Khristich Accepted Answer
Posts: 375
Joined: 20.05.2019
0
Votes
Undo
Hello Rudi,
Thanks for following up! You can set the limits that are necessary for php.ini, but higher than the LVE limits cannot be set. For example, if you set memory_limit 1024, but LVE PMEM is 512 when it reaches 513Mb, the process stops OOM and does not reach memory_limit in php.ini.
And if the client has such a need, then the client can do this through global.ini
https://docs.cloudlinux.com/cloudlinux_os_components/#configuring-global-php-ini-options-for-all-alt-php-versions,
but this will be for all versions. The options specified in global.ini will be registered in all alt-PHP and they cannot be overwritten by any other settings.
Thanks.
Marketing Manager
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
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.