Suhosin and php memory limit PER account

bin_asc

Well-Known Member
Jul 18, 2005
280
0
166
I`m interested in increasing the php memory limit for one of my accounts, but due to suhosin being installed and suPHP, I can`t add a .htaccess php_value setting. Any advice ?
 

darren.nolan

Well-Known Member
Oct 4, 2007
257
0
66
With suPHP you can't use .htaccess files to change things in PHP.

You can however, create a new php.ini file in the directory of the script being run and place the new limit in there. I believe someone will also give you a more controlled example, but editing apache's httpd.conf to call a different php.ini, but with all your current settings (as it appears if a php.ini file is in the directory, everything in your main/primary php.ini is simply ignored).

Might also take note suHosin prevents users from simply giving themselves more memory when they choose to do so.

I can't recall what the default limit is (I think it just doesn't let users change memory limit) - but all requests in php.ini or from executing scripts are silently discarded.

By setting the below, you can say this is the MAX memory that I'll allow accounts to request (not the default)

suhosin.memory_limit 64

Hope this helps.
 

bin_asc

Well-Known Member
Jul 18, 2005
280
0
166
So basically if I set the php memory limit to 40 MB and set suhosin to 64MB it would allow scripts ( or custom php.ini`s ) to raise the memory to the allowed suhosin value.