Thursday, 22 March 2012

php_value giving Server 500 Error

I noticed on some server setups I could not do the following inside a .htacess file:
php_value upload_max_filesize 250M
php_value post_max_size 250M
I was getting an error 500 Internal Server Error with the above code in the .htaccess file.
What to do to correct this is create a file called php.ini and save it in the same location as your .htaccess file and enter the following code instead:
upload_max_filesize = “250M”
post_max_size = “250M”

One thing to note with this 'hack' is that the php.ini settings do not filter down through sub directories, and only affect scripts in the primary directory - This has caught me out a few times!

No comments:

Post a Comment

Your Source Code Is Now an AI Data-Boundary Decision

On 21 September, Belgian security company Aikido released an open-weight model designed for cybersecurity work that can run locally, without...