Php_value auto_prepend - causing 500 errors?

I have a project that uses the following in .htaccess:

php_value auto_prepend_file /home/-path-here/prepend.php 

This works fine on my local WAMP server and on another server, and not on this new one.

I have full access to the server.

I think I need to enable php_value something like php.ini or with easyapache?

+4
source share
1 answer

To enable php_value in .htaccess , the AllowOverride directive for this directory must be configured accordingly.

 AllowOverride All 

would do it, but it might be common. Again, I don’t know if there is a more restrictive setting that still allows you to set PHP configuration parameters in .htaccess .

For obvious reasons, AllowOverride cannot be installed in .htaccess itself.

In addition, as Colonel Shrapnel mentioned, PHP must be used as an Apache module in order to be able to change PHP configuration settings through the Apache configuration. Check the Apache error log to see the actual cause.

+5
source

Source: https://habr.com/ru/post/1335262/


All Articles