How to make per user custom PHP configuration?

maguxa

Verified User
Joined
Jul 8, 2019
Messages
7
i'm looking how did i do if i want to make custom PHP configuration like change the default time zone per user,

i found the tutorial here,

https://help.directadmin.com/item.php?id=183

and i try to do it but seem not working, since i think this tutorial is for Apache, i have setup DirectAdmin webserver using the openlitespeed, and i think the configuration would be different.
 
I'd suggest checking https://help.directadmin.com/item.php?id=672. OpenLiteSpeed can be customized in "Custom HTTPd Configuration", admin level. CUSTOM4 block is to store php_admin_value/php_admin_flag things :)


can you give me an example, since i not really expect in this, example of implementation like set the default time zone;
Code:
date.timezone = “US/Central”

for example before this, i just create new php.ini and input that code ^ under root directory then it suddenly detect itself and append the default php.ini
 
I'd suggest checking https://help.directadmin.com/item.php?id=672. OpenLiteSpeed can be customized in "Custom HTTPd Configuration", admin level. CUSTOM4 block is to store php_admin_value/php_admin_flag things :)

Is setting user_ini.filename = ".user.ini" still an option in php.in for php56-fpm and php72-fpm to allow users to specify their own PHP changes related to the PHP version assigned to their account?

And if so, where do I stick my "master" changes that will survive DirectAdmin/custombuild updates -- this is VERY important for me to know where this is. I think it was /usr/local/directadmin/plugins/custombuild/configure/ap2? Is there more instructions on how to work in this directory for adding custom changes and tweaks?

For example, I have two specific end-users that have some funky PHP requirements they previously specified in cPanel using .user.ini... I "cleaned" them of old cPanel entries and now I need to use them again.

I'm using Apache2 and fairly out of box setup with custombuild changes (to satisfy WordPress plugins like W3 Total Cache).
 
I'd suggest checking https://help.directadmin.com/item.php?id=672. OpenLiteSpeed can be customized in "Custom HTTPd Configuration", admin level. CUSTOM4 block is to store php_admin_value/php_admin_flag things :)

Hello smtalk,

Can u explain method one with .htaccess, I give In .htaccess one of my website rules like this:

php_value memory_limit 8192M
php_value upload_max_size 8192M
php_value post_max_size 8192M
php_value upload_max_filesize 2048M
php_value max_execution_time 3000
php_value max_input_time 3000

And this is not working. I can do more on admin site maybe? Thanks.
 
Hello smtalk,

Can u explain method one with .htaccess, I give In .htaccess one of my website rules like this:

php_value memory_limit 8192M
php_value upload_max_size 8192M
php_value post_max_size 8192M
php_value upload_max_filesize 2048M
php_value max_execution_time 3000
php_value max_input_time 3000

And this is not working. I can do more on admin site maybe? Thanks.

OpenLiteSpeed supports just RewriteRules in .htaccess.
 
Is setting user_ini.filename = ".user.ini" still an option in php.in for php56-fpm and php72-fpm to allow users to specify their own PHP changes related to the PHP version assigned to their account?

And if so, where do I stick my "master" changes that will survive DirectAdmin/custombuild updates -- this is VERY important for me to know where this is. I think it was /usr/local/directadmin/plugins/custombuild/configure/ap2? Is there more instructions on how to work in this directory for adding custom changes and tweaks?

For example, I have two specific end-users that have some funky PHP requirements they previously specified in cPanel using .user.ini... I "cleaned" them of old cPanel entries and now I need to use them again.

I'm using Apache2 and fairly out of box setup with custombuild changes (to satisfy WordPress plugins like W3 Total Cache).

.user.ini is still an option, might need adjustment from OLS side (would need to give it a try). OLS custom configuration, if you change anything in /usr/local/lsws/conf, should be saved in /usr/local/directadmin/custombuild/custom/openlitespeed/conf. That way you'd be safe from overwrites.
 
I'd suggest checking https://help.directadmin.com/item.php?id=672. OpenLiteSpeed can be customized in "Custom HTTPd Configuration", admin level. CUSTOM4 block is to store php_admin_value/php_admin_flag things :)


i really hope can u give me example, like how to setting and configure it, i dont really expect to it, i try to read that link give i dont think i can do it. i have add the include path and check the path it show on the phpinfo i have put php.ini inside the include path and put the date.timezon = " " but still it seem nothing happen.
 
I'm using Apache still on most of these servers, so I'll stick it in ap2 -- I think I'm getting the hang of this DirectAdmin thing.

Thanks!
 
lol nobody can help to give me example like how to create php.ini or user.ini ?. haha i'm really new to this thing.
 
after like few days understanding this thing, i finally manage to do it lol, here is some of my reference to get the idea how to do it, and to make it default i think just change it directly inside the virtual host template at custom 4 .

my reference;
https://help.directadmin.com/item.php?id=183
https://atlantisthemes.com/fix-upload_max_filesize/
https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:per-user-php-ini
https://forums.cyberpanel.net/discussion/823/how-to-use-your-php-ini-for-each-domain
 
Back
Top