Php ini file not working for DA users

bcx

Verified User
Joined
Dec 11, 2015
Messages
101
Not sure if this has something to do with recent updates: DirectAdmin (update), OpenLiteSpeed (update), and all PHP versions from 8.1 to 8.4 were updated.


Inside DirectAdmin, I created a few users, each with their own website.


Now, the main account (the admin user, for example) has WordPress websites that are correctly picking up the new php.ini settings.


However, the user accounts are not. They did in the past.


For example, a WordPress user website says:
[th]
Max input time​
[/th]​
[td width="509.891px"]-1[/td]
[th]
Upload max filesize​
[/th]​
[td width="509.891px"]2M[/td]
[th]
PHP post max size​
[/th]​
[td width="509.891px"]8M[/td]

I discorved this only today, when i was updating wordpress websites and a few plugins that i could not upload as file size was to big.

Anyone has the same issue, since the update?
 
Instead of php.ini files for each user, you can usually override PHP values like the ones you're trying to set above by creating a .user.ini file in the public_html directory or any subdirectory in the hierarchy that you want the changes to be effected from.

Example .user.ini file: (Adjust to your needs)
Bash:
max_execution_time = 300
max_input_time = 300
max_input_vars = 10000
memory_limit = 512M
post_max_size = 1024M
upload_max_filesize = 1024M
 
Hi, okay. But it worked in the past just fine, what changed. And does user.ini works for openlitespeed?

And do I only insert the tweaks, or should I copy paste the whole php ini file in it with the tweaks.
 
Hi, okay. But it worked in the past just fine, what changed. And does user.ini works for openlitespeed?

And do I only insert the tweaks, or should I copy paste the whole php ini file in it with the tweaks.
the .user.ini file, note the . at the beginning of the filename!, should work with Apache, NGINX and Litespeed/OLS as it's a PHP directive file, not anything to do with the browser settings.

Whatever you had in the php.ini file for the user, you can copy/paste the whole contents to the .user.ini file and it should work fine. The example of syntax I posted above was for the most common settings for WordPress and similar sites. The values would need to be set according to your server and load needs.

I have no idea why it worked and doesn't now, might have something to do with the "php.ini" settings in custombuild. That's where i'd start looking first if you need directives in that file. 😊
 
Can you check the current template of PHP on the user via "Custom Httpd...." admin menu.

If there have some thing like "php_admin_value[memory_limit] = 256G;", then it come from PHP Setting in the user menu.
 
Back
Top