Possible Duplicate:
User Specific Php.ini When php is ran as a module?


I need to increase some limits for PHP but do not have access to php.ini. The changes I need to make would look like this:

php_value upload_max_filesize 50M
php_value post_max_size 50M php_value
max_execution_time 600 php_value
max_input_time 600

Is it possible to do that in .htaccess? If it is, how?

Thank you.


You should just be able to have a php.ini file in the directory you're working in, and those setting will override the main php.ini file. I think, I'm not 100% sure.

| improve this answer | |
  • Hi, thank you. The server-person already did that and they don't seem to be taken into account. Maybe there's an httpd.conf setting that allows/disallows this kind of configuring? – Francisc Mar 22 '11 at 19:17

Yes it's possible. using php_flag and php_value. Take a look on the official manual about configurations.

But wait, you already got the configs you want, you just need to put them on the .htaccess file!

| improve this answer | |
  • Thank you. I already tried placing that in the .htaccess file and it generates a Server error. – Francisc Mar 22 '11 at 19:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.