[Fixed] Overcoming 30 Second Timeout - No Acess to PHP.INI [Fixed] Overcoming 30 Second Timeout - No Acess to PHP.INI
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

[Fixed] Overcoming 30 Second Timeout - No Acess to PHP.INI

Started by gaplayer26, July 23, 2004, 09:16:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gaplayer26

Hello,

I am receiving the following error when uploading large pictures:

"PHP Fatal error: Maximum execution time of 30 seconds exceeded in...."

I have searched forums and found the workaround or fix is to change the default values in php.ini from 30 seconds to 60 (or higher, depending on your setup...).

My problem is that I am using a shared hosting solution and my host will not give me access to the php.ini file and will not change the values either....

Is there a workaround or fix without having access to the php.ini file ?   ???

Thank you...

Garth  

Joachim Müller

don't upload so large files, resize them on the client - this is the only recommendation I can give.

GauGau

gaplayer26

OK, thanks for the reply.  Are there any checks I can perform before the user attempts to upload?  Or will setting the file size restrictions in the contorl panel suffice?

Thanks again.

Joachim Müller

there's nothing you can do to prevent the user seing this message if he uploads to large files. The filesize can't be checked by PHP before upload, as PHP has no rights on the user's machine. Just find out a safe file size and output a warning to the users like "don't upload files larger than XX KB, or you'll experience errors"...

GauGau

gaplayer26

Thanks - I managed to find a solution without having access to the global PHP.INI file.

My Coppermine install is running on a Windows server.  For reference, to work around the problem, I had to create a custom PHP.INI (copied from a default php install - filename:php.ini-dist) file and place it in the root of my domain - this overrides the system PHP.INI...

I made the following changes to my custom PHP.INI:

  • cgi.force_redirect = 0
  • max_execution_time = 90     ; Maximum execution time of each script, in seconds, 0 disables
  • max_input_time = 90            ; Maximum amount of time each script may spend parsing request data, 0 disables

Note:  I don't know what I'm doing!  I do not know PHP, but the above worked for me...   ::)

Thanks for your help...

Joachim Müller

...hehe, be glad that the people who run your webserver don't seem to know what they're doing. Usually, you can't override this if you're webhosted, but apparently on your webserver you can. ;D

GauGau