mysql - PHP File upload fails after some time -
i facing problem uploading files, getting errors after time. uploading files , inserting details database image name date etc.
what happens till no of uploaded file 27 works when try upload more 27 file start showing errors like
warning: move_uploaded_file(../../images/2015/05/imvsa/kexk.jpg): failed open stream: no such file or directory
warning: move_uploaded_file(): unable move 'd:\wamp\tmp\php3635.tmp' '../../images/2015/05/imvsa/kexk.jpg'
my php.ini
max_execution_time = 1440 max_input_time = 1440 post_max_size = 1024m upload_max_filesize = 1024m max_file_uploads = 10000 session.save_path = "d:/wamp/tmp" session.gc_maxlifetime = 7200 memory_limit = 512m
if truncate database table starts working uptill row 27 , again starts fail.
my script
if($_files['image']['size']<5242880&&getimagesize($_files['image'])!=false) { if(!is_dir('../../images/2015/05/')) { $mkdir = mkdir('../../images/2015/05/', 0777, true); } $info = pathinfo($_files['image']['name']); $image = $_files['image']['name']; $ext = $info['extension']; $temp_file = $_files['image']['tmp_name']; $img_target ='../../images/2015/05/'.$image.'.'.$ext; $upload = move_uploaded_file($temp_file, $img_target); } // , insert in database
please see , suggest possible way make work, going uploading hundreds of image in day max size of 5mb. thanks
try this:
if(!is_dir('../../images/2015/05/imvsa/')){ $mkdir = mkdir('../../images/2015/05/imvsa/', 0777, true); }
Comments
Post a Comment