954,591 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

File Upload Help

I got the coding for uploading files to my website throug a simple browse option off a page. I choose the file upload size to be 150mb, but it wont allow anything under 10mb it seems. I am real good friends with my host, he told me something like, it wont upload files that big unless its via FTP, so what I was wondering if there was a script to fix this, or if there was another php upload code that has different coding to get around it.

Any help would be great.

Thanks

HailttRedskins
Newbie Poster
17 posts since Nov 2006
Reputation Points: 10
Solved Threads: 0
Infraction Points: 5
 

try with the ftp_connect function.

trafficman
Junior Poster in Training
64 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

Im not real good with PHP at all, could you possibly help me out, or give me the code on where to enter it?

This is what I have so far:

<html>
<head><title>Submit Your File</title></head>
<link rel="StyleSheet" href="style.css" type="text/css">
<body background="images/site_06.jpg">
<center>
Thank you for chosing to send your files to Flawless SkinsPlease take note that Flawless Skins only allows Images, and Videos to the website.  Any files other than these will not be looked at, instead they will be deleted immediately.The max file size allowed to be submitted at one time is 150mb
<form enctype="multipart/form-data" action="uploader.php" id="form" method="POST"  onsubmit="a=document.getElementById('form').style;a.display='none';b=document.getElementById('part2').style;b.display='inline';" style="display: inline;">
<input type="hidden" name="MAX_FILE_SIZE" value="157286400"">
Choose a file to upload: <input name="uploadedfile" type="file" />
<input type="submit" value="Upload File" />
</form>
<div id="part2" style="display: none;">
<script language="javascript" src="xp_progress.js"></script>
Upload in progress. Please Wait... 
<BR><BR>
<script type="text/javascript">
var bar1= createBar(300,15,'grey',1,'black','#EFC151',85,7,3,"");
</script>
HailttRedskins
Newbie Poster
17 posts since Nov 2006
Reputation Points: 10
Solved Threads: 0
Infraction Points: 5
 

Normally file upload using files will be allowed 2MB in PHP (That is default setting in php.ini file).

Ask your server admin about this limit.

You can use FTP functions to upload can be found at http://in.php.net/ftp .

PeppySoft
Newbie Poster
6 posts since Dec 2006
Reputation Points: 10
Solved Threads: 0
 

Normally file upload using files will be allowed 2MB in PHP (That is default setting in php.ini file).

Ask your server admin about this limit.

You can use FTP functions to upload can be found at http://in.php.net/ftp .

to see your PHP upload size limit, make a file called phpinfo.php
and inside of it, place the following php code:

[php]<? phpinfo() ?>[/php]then access that page from your browser and press Ctrl+F to search for the following: upload_max_filesize

this will tell you the max upload you are allowed on your server

you can try something like this:

<IfModule mod_php4.c>
php_value upload_max_filesize 150M
</IfModule>


in a .htaccess file, from what I read this is not suppose to work according to PHP but it in actuality does, so who knows

paradox814
Posting Whiz
351 posts since Oct 2004
Reputation Points: 13
Solved Threads: 4
 

sorry I made a mistake; there should be some way by splitting your file locally then uploading it.
Let me look into it.

trafficman
Junior Poster in Training
64 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

well there is no way to do without the use of activeX, java applet or some tricking with javascript.
The easiest way would consist on changing the php_value upload_max_filesize variable and the execution time of a script.

trafficman
Junior Poster in Training
64 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 

actually i believe the max execution time of a script wouldn't matter in this case, because uploading a file as far as php cares is not part of the script execution time.

paradox814
Posting Whiz
351 posts since Oct 2004
Reputation Points: 13
Solved Threads: 4
 

See the error code in $_FILES['uploadedfile']['error'] and check it against http://www.php.net/manual/en/features.file-upload.errors.php to find out what the error is.

php_daemon
Junior Poster
140 posts since Aug 2006
Reputation Points: 13
Solved Threads: 2
 
actually i believe the max execution time of a script wouldn't matter in this case, because uploading a file as far as php cares is not part of the script execution time.


I think it is related as your program will wait till the file has been uploaded!

trafficman
Junior Poster in Training
64 posts since Jun 2005
Reputation Points: 10
Solved Threads: 0
 
I think it is related as your program will wait till the file has been uploaded!


No, the file uploading is a part of request and until it's finished the program is not executed.

php_daemon
Junior Poster
140 posts since Aug 2006
Reputation Points: 13
Solved Threads: 2
 

put a copy of your php.ini file in the same folder where your upload script is change the max file size under your file upload. see if that works

Dsiembab
Junior Poster
156 posts since Mar 2007
Reputation Points: 18
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You