Jump to content

changing php ini settings


shane07

Recommended Posts

Hello to all

I have used following codes to change php settings

ini_set('upload_max_filesize','500M');//Also used 524288000 instead of 500M
ini_set('post_max_size','500M');
ini_set('memory_limit','100M');

But this does not work

Also I used htaccess file for this purpose and could not be successful.

I used following in my htaccess file:

php_value upload_max_filesize 500M
php_value post_max_size 500M
php_value memory_limit 100M

Any suggestions? Waiting for the reply

Thank You

Link to comment
https://forums.phpfreaks.com/topic/107289-changing-php-ini-settings/
Share on other sites

'upload_max_filesize' and 'post_max_size' cannot be set using ini_set() statements at all.

 

Your .htaccess statements will work if php is running as an Apache module and the host has permitted php settings to be changed in a .htaccess file and has permitted those specific settings to be changed in a .htaccess file.

 

If php is running as a CGI wrapper, you might be able to do this in a local php.ini with the same restrictions - the host has permitted php settings to be changed in a local php.ini file and has permitted those specific settings to be changed in a local php.ini file.

  • 3 weeks later...

'upload_max_filesize' and 'post_max_size' cannot be set using ini_set() statements at all.

 

Your .htaccess statements will work if php is running as an Apache module and the host has permitted php settings to be changed in a .htaccess file and has permitted those specific settings to be changed in a .htaccess file.

 

If php is running as a CGI wrapper, you might be able to do this in a local php.ini with the same restrictions - the host has permitted php settings to be changed in a local php.ini file and has permitted those specific settings to be changed in a local php.ini file.

Thank you.

Could you tell me how to recognize if php is running as a CGI wrapper or not?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.