Solved

php upload file

Posted on 2006-11-14
10
183 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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 500 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do uses indexes to maximize MySQL Searches 14 55
I'm getting too many results in this SELECT statement. How can I fix it? 6 56
Email called spam 5 36
PHP 5.6 and 7.x 4 21
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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 …

839 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