Jump to content

[SOLVED] php.ini file ignored?


Recommended Posts

I've had a problem where a script (lots of DB inserts) was timing out during a test execution.

 

I eventually got around it by using the set_time_limit function in the code, however, I would prefer to do this in the config file.

 

When I change max_execution_time in the file it has no effect.

Phpinfo() gives the php.ini file location as the one I'm using (C:/Program Files/PHP/php.ini), but reports the value for max_execution_time as 30, no matter what I set it to.

 

I've checked to see if there are other config files lying around anywhere but there aren't.

 

Why does it ignore the file? I expect it's something silly/obvious.

 

I'm running PHP 5.2.0, Apache 2.2.3 and MySQL Server 4.1, all sitting on a stand alone test PC.

Link to comment
https://forums.phpfreaks.com/topic/63989-solved-phpini-file-ignored/
Share on other sites

Make sure you restarted your server (eg, Apache, IIS etc). Your server must be restarted in order for the new changes to come through from the php.ini

 

Also make sure there isn't a semi-colon (;) at the start of the line where you define max_execution_time. PHP treats lines with ; at the start of the line as comments and will ignore them. max_execution_time should be located around line 300.

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.