Forum Moderators: coopster

Message Too Old, No Replies

max timeout - php.ini & .htaccess

huh-elp!

         

mcjohnson

11:45 am on Jul 3, 2006 (gmt 0)

10+ Year Member



Hello all,

I am trying to lengthen the PHP timeout on a site of mine so that when uploading photos, my client can have 60 seconds rather than 30. I can't do it in the PHP script I am using as its encrypted, so I need to try to do it site-wide.

My hosting provider advises me that it can be done using a php.ini directive - but this host also says that anything with a php prefix must sit OUTSIDE the .htaccess file and be pointed to same.

This is where it all begins to look like greek to me. Is there a simple way to configure the PHP settings on the server so that I have a full 6 seconds (or more) to upload files? If so, any thoughts would be appreciated. When it comes to .htaccess and php.ini I am a newbie.

Many thanks,

Pat

FalseDawn

2:30 pm on Jul 3, 2006 (gmt 0)

10+ Year Member



Sounds like your host is running PHPSuExec, which doesn't allow certain PHP settings to be changed in the .htaccess file.

create a file in notepad called php.ini, add the following line:

max_input_time=600

upload this file to the directory your script is running in using FTP.

You *might* need to ask for apache to be restarted - not sure about that.

Also look at the "max_execution_time" directive - you may need to increase that, too.

See:
[us3.php.net...]

Edit: It's not clear whether you have a shared account, or if this is a dedicated machine - if the latter, and you have full root access, you should add the line to your existing php.ini file.