?
Solved

php upload file

Posted on 2006-11-14
10
Medium Priority
?
193 Views
Last Modified: 2008-07-03
I am trying to upload large files 22 meg.
I can do it with small files.
I found something that said put these lines at the top of my script:
ini_set("upload_max_filesize","50M"); //maximum of 50 MB
ini_set("max_execution_time",0); //Unlimited timeout

It did not work.  My page loads for a while, then it says can't find server.
0
Comment
Question by:jackjohnson44
  • 5
  • 2
  • 2
  • +1
10 Comments
 
LVL 11

Expert Comment

by:ch2
ID: 17940576
Related Configurations Note:  See also the file_uploads, upload_max_filesize, upload_tmp_dir, post_max_size and max_input_time directives in php.ini  

http://es2.php.net/features.file-upload

0
 
LVL 11

Expert Comment

by:ch2
ID: 17940603
Try to change

upload_max_filesize = 22M
0
 

Author Comment

by:jackjohnson44
ID: 17940613
I changed the settings above and it did not help.
This article confuses me, I did not see a solution.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:ch2
ID: 17940616
sorry, try this

post_max_size = 22M
0
 
LVL 11

Expert Comment

by:ch2
ID: 17940639
So you have to change the time-out of your webserver i guess.
0
 
LVL 2

Expert Comment

by:_delas
ID: 17941633
ini_set ("post_max_size", "22M");
ini_set ("max_input_time", nums_of_secs);

also memory_limit can influence the file limit dimension
0
 

Author Comment

by:jackjohnson44
ID: 17941647
if I set max input time to 0, will it be unlimited like max execution time?
0
 
LVL 2

Expert Comment

by:_delas
ID: 17941665
0
 
LVL 14

Expert Comment

by:Aamir Saeed
ID: 17942306
if you want that your script dont give the error of maximum execution error and so then you can use
set_time_limit(0);
0
 
LVL 11

Accepted Solution

by:
ch2 earned 1500 total points
ID: 17942758
You can change those settings but if your script runs more time than the set in Timeout option in httpd.conf will stop uploading and throw a connection timeout (can't find the server).
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month15 days, 9 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question