apache - File upload is not working in server but working locally -
i have seen phpinfo file,it has no tmp value set set /tmp
upload_tmp_dir = "/tmp" but still not working. server in amazon ec2.
i have tried putting upload_tmp_dir "/var/www" (with no trailing slash ) ,but didn't work. need set permissions tmp directory ?
print_r($_files); is giving
enter code here array ( [upload_file] => array ( [name] => ps.jpg [type] => image/jpeg [tmp_name] => /tmp/phpbcpdfp [error] => 0 [size] => 193728 ) ) and
is_uploaded_file($_files['upload_file']['tmp_name']) is giving result 1
it permission issue on destination folder.
do sudo chmod -r 777 /destination/folder , try again. should work. if still can't upload file, maybe permission problem on parent directory.
after that, find user (and group) owner of uploaded file.
then set permission back, , change owner of directory : sudo chown -r owner_user.group /destination/folder.
Comments
Post a Comment