Advanced search  

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]

Pages: [1]   Go Down

Author Topic: [Fixed] Overcoming 30 Second Timeout - No Acess to PHP.INI  (Read 4626 times)

0 Members and 1 Guest are viewing this topic.

gaplayer26

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
[Fixed] Overcoming 30 Second Timeout - No Acess to PHP.INI
« 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  
« Last Edit: July 24, 2004, 12:54:10 am by gaplayer26 »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Overcoming 30 Second Timeout - No Acess to PHP.INI
« Reply #1 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
Logged

gaplayer26

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Overcoming 30 Second Timeout - No Acess to PHP.INI
« Reply #2 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Overcoming 30 Second Timeout - No Acess to PHP.INI
« Reply #3 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
Logged

gaplayer26

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Overcoming 30 Second Timeout - No Acess to PHP.INI
« Reply #4 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:

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [Fixed] Overcoming 30 Second Timeout - No Acess to PHP.INI
« Reply #5 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
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.