Problem uploading a large file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
krishnik
Forum Newbie
Posts: 9
Joined: Tue Dec 08, 2009 5:57 am

Problem uploading a large file

Post by krishnik »

Hi,
I was trying to upload files larger than 12MB and it returns a 500 internal server error. There is no issues in uploading files upto 11mb in size. As i'm using a shared hosting I cannot access or change the php.ini file.I got following resutls when i executed phpinfo()

max_input_time -1 -1
max_execution_time 90 90
memory_limit 20M 20M
post_max_size 50M 50M
upload_max_filesize 50M 50M

I tried using the ini_set('max_execution_time',600); to exetend the script execution time. But its not working, Every time i upload file larger than 12mb the script executes some time and returns "500 internal server error".

Please help me as this is very urgent

Thanks in advance
Nikhil
incubi
Forum Contributor
Posts: 119
Joined: Mon Dec 07, 2009 1:47 pm

Re: Problem uploading a large file

Post by incubi »

Hi

If your ISP allows htaccess you could try this

http://www.whenpenguinsattack.com/2006/ ... de-phpini/

http://forums.devshed.com/php-developme ... l?p=588028

But if phpinfo said upload_max_filesize 50M 50M and you can't get past 12M
I'm not sure override is the issue.

incubi
krishnik
Forum Newbie
Posts: 9
Joined: Tue Dec 08, 2009 5:57 am

Re: Problem uploading a large file

Post by krishnik »

Thank you for the reply. Yes i have tried the .htaccess. As they don't allow me to upload .htaccess file, i had to upload the file with a different name and rename it. But as soon as i rename the file the linux server considers it as a hidden file and hides it.
I got the same result even after trying the .htaccess file.

Can you tell me why i'm getting a "500 Internal server error" is it b'coz of issues with code

Ok now i'm getting connection reset. does this mean that the script is not executing long enough.....?
I tried placing the .htaccess at the web root and also in the directory where the scripts executes.
Sorry for my bad english.............


Thanks
krishnik
Forum Newbie
Posts: 9
Joined: Tue Dec 08, 2009 5:57 am

Re: Problem uploading a large file

Post by krishnik »

Server returns a "500 Internal server error" when i used a .htaccess file. If i remove the file the server returns "Connection was reset" error.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Problem uploading a large file

Post by jackpf »

Maybe the server admins have set up a timeout for security purposes.

Might want to ask your host provider.
krishnik
Forum Newbie
Posts: 9
Joined: Tue Dec 08, 2009 5:57 am

Re: Problem uploading a large file

Post by krishnik »

@jackpf

Thank you jackpf..
Post Reply