Skip to content Skip to sidebar Skip to footer

Unable To Upload An Image Using Gd Library Php

this php file receives data from a html file where an user uploads an image from his computer, as soon as the update button is clicked this php page returns an error in which it is

Solution 1:

From PHP manual here:

http://php.net/manual/en/features.file-upload.post-method.php

Files will, by default, be stored in the server's default temporary directory unless another location has been given with the upload_tmp_dir directive in php.ini. The server's default directory can be changed by setting the environment variable TMPDIR in the environment in which PHP runs. Setting it using putenv() from within a PHP script will not work. This environment variable can also be used to make sure that other operations are working on uploaded files, as well.

Probably your HTTP server hasn't write permission for temp dir or your php.ini has a temp dir configured for a dir where it hasn't write permission. Check them.

Post a Comment for "Unable To Upload An Image Using Gd Library Php"