optikalefx Posted December 24, 2009 Share Posted December 24, 2009 Anyone had any success using FTP to upload a file say 90m? im using ftp_put and it returns false. BUT the file DOES upload just fine. I even downloaded and tested it, its the full file. But ftp_put still returns false. Now with a 20m file it returns true. I have all my php.ini vars for time and size set up really really high, and same problem. I still feel like its a timeout problem but it shouldn't be anymore... i have these set default_socket_timeout = 1000 upload_max_filesize = 1024M post_max_size = 1024M max_execution_time = 1000 max_input_time = 1000 memory_limit = 1024M The file is 91m and takes about 6 minutes. I'm using ajax to do the ftp, and im using another ajax function to check the size against the ftp size, after it reaches 100% it takes about 1 minute to return false from the ajax call. Thats why it feels like it's timing out. I don't know. Thanks Link to comment https://forums.phpfreaks.com/topic/186225-php-ftp-cant-upload-big-files/ Share on other sites More sharing options...
Deoctor Posted December 24, 2009 Share Posted December 24, 2009 Anyone had any success using FTP to upload a file say 90m? im using ftp_put and it returns false. BUT the file DOES upload just fine. I even downloaded and tested it, its the full file. But ftp_put still returns false. Now with a 20m file it returns true. I have all my php.ini vars for time and size set up really really high, and same problem. I still feel like its a timeout problem but it shouldn't be anymore... i have these set default_socket_timeout = 1000 upload_max_filesize = 1024M post_max_size = 1024M max_execution_time = 1000 max_input_time = 1000 memory_limit = 1024M The file is 91m and takes about 6 minutes. I'm using ajax to do the ftp, and im using another ajax function to check the size against the ftp size, after it reaches 100% it takes about 1 minute to return false from the ajax call. Thats why it feels like it's timing out. I don't know. Thanks as ur saying i dont think the time out is a problem.. Link to comment https://forums.phpfreaks.com/topic/186225-php-ftp-cant-upload-big-files/#findComment-983502 Share on other sites More sharing options...
optikalefx Posted December 24, 2009 Author Share Posted December 24, 2009 I found this constant ftp_set_option($conn_id, FTP_TIMEOUT_SEC, 600); but even setting that hight seems to freeze the script at the end instead of failing the put. Link to comment https://forums.phpfreaks.com/topic/186225-php-ftp-cant-upload-big-files/#findComment-983506 Share on other sites More sharing options...
Deoctor Posted December 24, 2009 Share Posted December 24, 2009 use this line when u are uploading i mean in the form.. <td><input type="hidden" name="MAX_FILE_SIZE" value="100000000" /></td><tr></tr> Link to comment https://forums.phpfreaks.com/topic/186225-php-ftp-cant-upload-big-files/#findComment-983515 Share on other sites More sharing options...
optikalefx Posted December 24, 2009 Author Share Posted December 24, 2009 use this line when u are uploading i mean in the form.. <td><input type="hidden" name="MAX_FILE_SIZE" value="100000000" /></td><tr></tr> There is no problem with the form processing. I have that value increased in the php.ini file. It has something to do with the size of the file in ftp_put Try using ftp_put with a 90m file and see what it returns. Link to comment https://forums.phpfreaks.com/topic/186225-php-ftp-cant-upload-big-files/#findComment-983519 Share on other sites More sharing options...
optikalefx Posted December 26, 2009 Author Share Posted December 26, 2009 Any one can offer some help on this? I even tried curl and it still has the same problem. The upload is successful but the ftp_put returns false. when i use curl the upload is successful but curl_errno($ch); returns an error. I have all the my php.ini settings up high, i can't figure out what to do. Is there another way to get large files onto an FTP server on the web? Link to comment https://forums.phpfreaks.com/topic/186225-php-ftp-cant-upload-big-files/#findComment-984133 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.