Jump to content

Script Ini Settings Aren't Working


refiking

Recommended Posts

I put the following into a script:

 

ini_set('upload_max_filesize', '10M');
ini_set('post_max_size', '10M');
ini_set('memory_limit', '420M');
ini_set('max_execution_time', '300');
ini_set('max_input_time', '300');
phpinfo();
exit();

 

And the only values that changed were the memory_limit and max_execution_time.  How can I change these other values using ini_set?  Please advise...

 

Link to comment
https://forums.phpfreaks.com/topic/196531-script-ini-settings-arent-working/
Share on other sites

That's because the other values cannot be changed in a script. They affect what php does before your script is executed. Per the php.net documentation, they are settable - PHP_INI_PERDIR (or higher.) That means in a local php.ini (when php is running as an CGI application), in a .htaccess file (when php is running as an Apache Module), in the master php.ini (when you have access to it), or in the httpd.conf (Apache only and when you have access to it.)

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.