Jump to content

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.)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.