Am using following code to upload a file to ftp server.
----------------------------
$login = @ftp_login($conn, $ftpUser, $ftpPass) or die ("Login details failed !");
$putFile = @ftp_put($conn, $_FILES[file1][name],$_FILES[file1][tmp_name], FTP_BINARY);
----------------------------
Ftp works fine for smaller file size but errors out on file size bigger than 800K. I get this error:
The POST method does not allow the data transmitted, or the data volume exceeds the capacity limit
I checked php.ini and these settings seems ok .
post_max_size = 8M
upload_max_filesize = 50M
Can somebody tell me what is wrong? Thanks in advance for your time.
Ftp_put not uploading file size bigger than 1M
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Thanks for your reply.
The html code is like this...(no file size specified)
----------------------------------------
<BODY>
<form method="post" action="do_uploadFTP.php"; enctype="multipart/form-data">
<p><strong>File to Upload:</strong><br>
<input type="file" name="file1" size=40></p>
<p><input type="submit" name="submit" value="Upload File"></p>
#echo phpinfo() ;
</BODY>
----------------------------------------
Apperently, it is a server error. I see this in Apache error log:
------------------------------
[Thu Jan 15 13:54:34 2004] [error] [client 66.207.130.10] Requested content-length of 1270730 is larger than the configured limit of 524288.
------------------------
What settings should be changed and where? We are using Plesk (which uses Apache) for managing web sites.
Thanks a lot.
The html code is like this...(no file size specified)
----------------------------------------
<BODY>
<form method="post" action="do_uploadFTP.php"; enctype="multipart/form-data">
<p><strong>File to Upload:</strong><br>
<input type="file" name="file1" size=40></p>
<p><input type="submit" name="submit" value="Upload File"></p>
#echo phpinfo() ;
</BODY>
----------------------------------------
Apperently, it is a server error. I see this in Apache error log:
------------------------------
[Thu Jan 15 13:54:34 2004] [error] [client 66.207.130.10] Requested content-length of 1270730 is larger than the configured limit of 524288.
------------------------
What settings should be changed and where? We are using Plesk (which uses Apache) for managing web sites.
Thanks a lot.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Definitely sounds like Apache has been configured to not accept file uploads bigger than 512kB. Depending how much control you have over your Apache installation (you may find it easier to speak directly with your host) this is the directive you'd probably need to adjust:
http://httpd.apache.org/docs/mod/core.h ... equestbody
Mac
http://httpd.apache.org/docs/mod/core.h ... equestbody
Mac
Thanks for pointing me out to right direction.
First, I could not find LimitRequestBody directive in httpd.conf file. Upon doing further searching, I found this directive in php.conf.
I changed the LimitRequestBody and now I can upload files of larger size.
Thanks a lot "twigletmac". Greatly appreciate your timely help.
- Happy user of this forum
First, I could not find LimitRequestBody directive in httpd.conf file. Upon doing further searching, I found this directive in php.conf.
I changed the LimitRequestBody and now I can upload files of larger size.
Thanks a lot "twigletmac". Greatly appreciate your timely help.
- Happy user of this forum