Large File Upload Cause Session Timeout

Hi,

I am trying to upload a 90MB file but then end up getting session timeout and end up in the login page.

I have tried to change the .htaccess file with the below additions but it does not seem to work. BTW, I am using a web hosting and the only config file I can change is the .htaccess.
php_value post_max_size 120M
php_value upload_max_filesize 100M
php_value max_execution_time 0
php_value max_input_time 0
php_value session.gc_maxlifetime 86400
php_value session.cookie_lifetime 86400

Open in new window

LVL 33
hongjunAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mespinozaeCommented:
Im pretty sure max_input_time should be "-1" instead of "0" -> http://cr.php.net/ref.info
Same could apply to max_execution_time

Do make sure that the .htaccess file is actually working, some servers do not allow overruling php values from htaccess

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hongjunAuthor Commented:
No help. I am still being thrown back to login page. It seems more like a session thing and not a connection timeout.

hongjun
hongjunAuthor Commented:
It happens after almost 1 hour of upload.
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

hernst42Commented:
Most webservers are configured to drop the connection after 3600 Seconds (AFAIK default in apache) You will need to reconfigure apache to allow longer times. This value can't be influenced by PHP. If your users can't upload the file in that time they might run into such problems.

Are you sure the values are changed via .htaccess recheck phpinfo() for the modified values.
hongjunAuthor Commented:
>> Most webservers are configured to drop the connection after 3600 Seconds
Is it max_execution_time and max_input_time ?

I check phpinfo and I see the below
                                  Local Value      Master Value
max_execution_time -1                      60
max_input_time        -1                      60


A further scan on my phpinfo values and I saw memory_limit is 32MB. Do I need to up this value as well?

Cheers
hongjun
hongjunAuthor Commented:
FYI, I can change .htaccess but not change the apache config file.
hernst42Commented:
>> Most webservers are configured to drop the connection after 3600 Seconds
Is it max_execution_time and max_input_time ?

no those values have nothing to with the values in php .it's an apache thing.

>A further scan on my phpinfo values and I saw memory_limit is 32MB. Do I need to up this value as well?
If you don't load the file into memory that limit should be fine.
hongjunAuthor Commented:
Oh ok.

I am trying http://tomas.epineer.se/tesupload/ and hope it will work.

hongjun
hongjunAuthor Commented:
BTW, I have no access to apache conf file :(
hongjunAuthor Commented:
Hi, I have a new question related to this problem.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_23242144.html

Please help :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.