943,865 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 4473
  • PHP RSS
You are currently viewing page 1 of this multi-page discussion thread
Dec 26th, 2006
0

File Upload Help

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
HailttRedskins is offline Offline
17 posts
since Nov 2006
Dec 26th, 2006
0

Re: File Upload Help

try with the ftp_connect function.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
trafficman is offline Offline
64 posts
since Jun 2005
Dec 26th, 2006
0

Re: File Upload Help

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:
PHP Syntax (Toggle Plain Text)
  1. <html>
  2. <head><title>Submit Your File</title></head>
  3. <link rel="StyleSheet" href="style.css" type="text/css">
  4. <body background="images/site_06.jpg">
  5. <center>
  6. Thank you for chosing to send your files to Flawless Skins<br>Please 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.<br>The max file size allowed to be submitted at one time is 150mb<br><br>
  7. <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;">
  8. <input type="hidden" name="MAX_FILE_SIZE" value="157286400""><br><br>
  9. Choose a file to upload: <input name="uploadedfile" type="file" /><br />
  10. <input type="submit" value="Upload File" />
  11. </form>
  12. <div id="part2" style="display: none;">
  13. <script language="javascript" src="xp_progress.js"></script>
  14. Upload in progress. Please Wait...
  15. <BR><BR>
  16. <script type="text/javascript">
  17. var bar1= createBar(300,15,'grey',1,'black','#EFC151',85,7,3,"");
  18. </script>
  19.  
Reputation Points: 10
Solved Threads: 0
Newbie Poster
HailttRedskins is offline Offline
17 posts
since Nov 2006
Dec 27th, 2006
0

Re: File Upload Help

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
PeppySoft is offline Offline
6 posts
since Dec 2006
Dec 27th, 2006
0

Re: File Upload Help

Click to Expand / Collapse  Quote originally posted by PeppySoft ...
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:
PHP Syntax (Toggle Plain Text)
  1. <IfModule mod_php4.c>
  2. php_value upload_max_filesize 150M
  3. </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
Reputation Points: 13
Solved Threads: 4
Posting Whiz
paradox814 is offline Offline
351 posts
since Oct 2004
Jan 8th, 2007
0

Re: File Upload Help

sorry I made a mistake; there should be some way by splitting your file locally then uploading it.
Let me look into it.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
trafficman is offline Offline
64 posts
since Jun 2005
Jan 8th, 2007
0

Re: File Upload Help

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.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
trafficman is offline Offline
64 posts
since Jun 2005
Jan 8th, 2007
0

Re: File Upload Help

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.
Reputation Points: 13
Solved Threads: 4
Posting Whiz
paradox814 is offline Offline
351 posts
since Oct 2004
Jan 9th, 2007
0

Re: File Upload Help

See the error code in $_FILES['uploadedfile']['error'] and check it against http://www.php.net/manual/en/feature...oad.errors.php to find out what the error is.
Reputation Points: 13
Solved Threads: 2
Junior Poster
php_daemon is offline Offline
138 posts
since Aug 2006
Jan 10th, 2007
0

Re: File Upload Help

Click to Expand / Collapse  Quote originally posted by paradox814 ...
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!
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
trafficman is offline Offline
64 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: i want to integrate gallery 1.5 with my phpbb
Next Thread in PHP Forum Timeline: interagtion between my gallery and phpbb





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC