help about big files upload via html form
Moderator: General Moderators
-
MysticRoad
- Forum Newbie
- Posts: 8
- Joined: Mon Oct 03, 2005 1:46 pm
help about big files upload via html form
hi guys
i have a problem in uploading a big file like .mp3 files (e.g 5 MB)
I'm using a "copy" function but no result it's failure !
Can u help me to do this ?
thx
feyd | posting does not require a size 18 font.
i have a problem in uploading a big file like .mp3 files (e.g 5 MB)
I'm using a "copy" function but no result it's failure !
Can u help me to do this ?
thx
feyd | posting does not require a size 18 font.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
you could easily be hitting the upload/post maximum sizes set for your installation.. check that all the ini config settings listed on the file uploading helper page are set correctly.
http://php.net/features.file-upload
http://php.net/features.file-upload
-
MysticRoad
- Forum Newbie
- Posts: 8
- Joined: Mon Oct 03, 2005 1:46 pm
-
MysticRoad
- Forum Newbie
- Posts: 8
- Joined: Mon Oct 03, 2005 1:46 pm
Code: Select all
<?
$file = 'C:\AppServ\www\aparank\images\upimages\01.mp3';
$remote_file = '01.mp3';
$ftp_server='';
$ftp_user_name='';
$ftp_user_pass='';
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
if (ftp_put($conn_id, $remote_file, $file, FTP_BINARY)) {
print "successfully uploaded $file\n";
} else {
print "There was a problem while uploading $file";
}
ftp_close($conn_id);
?>I want to upload '01.mp3' to my server
can u show me my problems ?
- chrys
- Forum Contributor
- Posts: 118
- Joined: Tue Oct 04, 2005 9:41 am
- Location: West Roxbury, MA (Boston)
What is the output that you get from this code?MysticRoad wrote:this is my sourceCode: Select all
<? $file = 'C:\AppServ\www\aparank\images\upimages\01.mp3'; $remote_file = '01.mp3'; $ftp_server=''; $ftp_user_name=''; $ftp_user_pass=''; $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); if (ftp_put($conn_id, $remote_file, $file, FTP_BINARY)) { print "successfully uploaded $file\n"; } else { print "There was a problem while uploading $file"; } ftp_close($conn_id); ?>
I want to upload '01.mp3' to my server
can u show me my problems ?
-
MysticRoad
- Forum Newbie
- Posts: 8
- Joined: Mon Oct 03, 2005 1:46 pm
Code: Select all
Warning: ftp_put(C:\AppServ\www\aparank\images\upimages\01.mp3) [function.ftp-put]: failed to open stream: No such file or directory in /home/acxxnlkk/public_html/ftp2.php on line 14
There was a problem while uploading C:\AppServ\www\aparank\images\upimages\01.mp3- chrys
- Forum Contributor
- Posts: 118
- Joined: Tue Oct 04, 2005 9:41 am
- Location: West Roxbury, MA (Boston)
Unless the PHP script is running from your local computer... you can't upload anything from your local computer using these FTP functions. The FTP functions are designed to allow the machine that the code is being executed from to upload to another machine. That is why it can't find the file, because it doesn't exist.MysticRoad wrote:Code: Select all
Warning: ftp_put(C:\AppServ\www\aparank\images\upimages\01.mp3) [function.ftp-put]: failed to open stream: No such file or directory in /home/acxxnlkk/public_html/ftp2.php on line 14 There was a problem while uploading C:\AppServ\www\aparank\images\upimages\01.mp3
-
MysticRoad
- Forum Newbie
- Posts: 8
- Joined: Mon Oct 03, 2005 1:46 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
both state that you can change them on a per directory basis.. to using an .htaccess file you should be able to change it.php.ini directives wrote:post_max_size "8M" PHP_INI_PERDIR PHP_INI_SYSTEM in PHP <= 4.2.3. Available since PHP 4.0.3.
------------
upload_max_filesize "2M" PHP_INI_PERDIR PHP_INI_ALL in PHP <= 4.2.3.
http://php.net/configuration.changes
-
MysticRoad
- Forum Newbie
- Posts: 8
- Joined: Mon Oct 03, 2005 1:46 pm
-
MysticRoad
- Forum Newbie
- Posts: 8
- Joined: Mon Oct 03, 2005 1:46 pm
I have try this
in .htaccess file
but its show again upload_max_filesize 2M in phpinfo()
what must I do ?
Code: Select all
<IfModule mod_php5.c>
php_value include_path ".:/usr/local/lib/php"
php_value upload_max_filesize 10M
</IfModule>but its show again upload_max_filesize 2M in phpinfo()
what must I do ?
-
MysticRoad
- Forum Newbie
- Posts: 8
- Joined: Mon Oct 03, 2005 1:46 pm
yes my host has php5 u can see it on http://mysticroad.com/info.php
what code must I write ?
what code must I write ?
I found this little applet a while ago for handling multiple uploads at the same time, it pretty cool http://jupload.biz/en_2.html