forum.coppermine-gallery.net

Support => Older/other versions => cpg1.3.x Support => Topic started by: gaplayer26 on July 23, 2004, 09:16:44 am

Title: [Fixed] Overcoming 30 Second Timeout - No Acess to PHP.INI
Post by: gaplayer26 on July 23, 2004, 09:16:44 am
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  
Title: Re: Overcoming 30 Second Timeout - No Acess to PHP.INI
Post by: Joachim Müller on July 23, 2004, 10:05:58 am
don't upload so large files, resize them on the client - this is the only recommendation I can give.

GauGau
Title: Re: Overcoming 30 Second Timeout - No Acess to PHP.INI
Post by: gaplayer26 on July 23, 2004, 01:36:56 pm
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.
Title: Re: Overcoming 30 Second Timeout - No Acess to PHP.INI
Post by: Joachim Müller on July 23, 2004, 06:35:23 pm
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
Title: Re: Overcoming 30 Second Timeout - No Acess to PHP.INI
Post by: gaplayer26 on July 24, 2004, 12:52:19 am
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:


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

Thanks for your help...
Title: Re: [Fixed] Overcoming 30 Second Timeout - No Acess to PHP.INI
Post by: Joachim Müller on July 24, 2004, 12:55:31 pm
...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