Php directives in .htaccess?

I tried to make some changes to php through .htaccess, but no one gave any results. For instance:

php_value memory_limit 256M inside is not activated.

Trying to install SetEnv PHPRC /home/username/public_html/php.inior any similar spell, such as SetEnv PHPRC /home/username/some_path, will not produce any results in phpinfo. I see that it is _SERVER["PHPRC"]really set, but no values ​​are overwritten as above.

My phpinfo looks like this: https://gist.github.com/ylluminate/08efd9a2844723631214

I am wondering if the Apache module is missing, which does not allow working as expected for custom php.ini or phprc. Next This is installing Apache 2.4.4 on VPS, over which I have 100% control (Linode) and using WHM + cPanel.

+5
source share
1 answer

With PHP 5.3, you can use files .user.ini, given that PHP is configured to run through CGI / FastCGI SAPI.
http://php.net/configuration.file.per-user

This is a simple extension of the main one php.iniand allows you to specify parameters equally:

memory_limit = 256M
upload_tmp_dir = /tmp

You can usually put one of them in DOCUMENT_ROOT. But each directory can contain one, so the parameters may vary depending on the script / folder. This means a complete alternative to the Apache / mod_php installation directives .htaccess.

+2
source

All Articles