Increase PHP memory limit for just one account

webguy

Verified User
Joined
Apr 13, 2005
Messages
41
Location
Best, Netherlands
Hi all,

I wonder if it is possible to increase the php memory limit for just one single account, NOT for the whole server.
I have read that this is sometimes possible through a php.ini in the root of the website or trough a modification in the .htaccess site. Is this also possible on DA servers?
 
Add to user httpd.conf:
php_admin_value memory_limit your_value
 
Connect to Directadmin at Admin level -> Custom HTTPD Configurations -> choose your Domain -> Go to either PHP-FPM page or Apache if you don't have PHP-FPM and update settings.
 
Failed: Please help

I try to add

php_admin_value memory_limit in php-fpm httpd;conf customization (Part 1). It shows this in contents httpd.conf (Section 2);

<VirtualHost xxxxx:8080 127.0.0.1:8080 >
php_admin_value memory_limit 512M
ServerName www.xxxx
...
</VirtualHost>

with some errors in configuration check (Third section):

AH00526: Syntax error on line 21 of /usr/local/directadmin/data/users/xxxxx/httpd.conf:
Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration

Please help.

Thanks
 
I'm using php-fpm with php 5.6.

I'm follow the instrution of zEItEr. Anyway, I don't see any php-page in this Custom HTTPD Configurations.

Please advice where it is.

Thanks
 
If you're using php-fpm, it should be on the right under the 'user' section. You should see something like:

youruser (php-fpm 5.6)

If you click on (php-fpm 5.6), you can add your custom configuration.
 
Thank

I'm using nginx_apache so it has theses:

domain.com (nginx proxy) | user (php-fpm 5.6)

And add with 2 options:

1. IN top section : Httpd.conf Customization for I add -> php_admin_value memory_limit 512M -> save -> Errors: -> clear and try the 2nd.

1. I click on domain -> Additional CUSTOM tokens add codes in [CUSTOM2] as mentioned in "https://help.directadmin.com/item.php?id=636" and then add -> php_admin_value memory_limit 512M -> save -> errors:


I'm also using custom nginx config for webmail.domain... to roundcube. But I dont create custom apache as only nginx is working.

Where I should go then.

Thanks
 
Try adding the following under CUSTOM2:

php_admin_value[memory_limit] = 512M
 
Get this error:

AH00526: Syntax error on line 33 of /usr/local/directadmin/data/users/user/httpd.conf:
Invalid command 'php_admin_value[memory_limit]', perhaps misspelled or defined by a module not included in the server configuration


php_admin_flag & php_value give the same errors.

Thanks
 
Last edited:
Add it under the php-fpm configuration, not the http config file, so here (replace YOURIPADDRESS and YOURUSER):

YOURIPADDRESS:2222/CMD_CUSTOM_HTTPD?user=YOURUSER&php-fpm=5.6
 
As your advice :

https://hostname.domain.com:2222/CMD_CUSTOM_HTTPD/?user=xxx&php-fpm=5.6

get this result:

The request you've made cannot be executed because it does not exist in your authority level

in Custome HTTP page I can click on domain name only (xxx nginx) and can't click on the right columns, username.

The error get from the direct entry into the url of the browser.

Can I create or add the details manually in the configuration file without using DA Control panel?

Or, this is a bug?

Thanks
 
Last edited:
You can edit the following file using ssh:

/usr/local/directadmin/data/users/YOURUSER/php/php-fpm56.conf.custom2
 
Back
Top