Hi, I am recieving these two errors when attempting to upload an image file to my server:

Warning: move_uploaded_file(images/) [function.move-uploaded-file]: failed to open stream: Is a directory in }[I removed the path, this is not part of the error] on line 13

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/php2bBihw' to 'images/' in [i removed the path again for security reasons] on line 13

I'm using 000webhost as a free user, and I checked the permissions on the forder, and they are at the correct settings. So I'm not exactly sure what's wrong. If you need my php script that I used to upload, or the path to the file (which I doubt will be necessary), then I can provide them. Thank you for you assistance and time!

Recommended Answers

All 2 Replies

You need to ask the 000webhost what is the limit file size for upload. By default, the limit is somethere below 32MB. If your file size is more than the default value, the upload will just eventually terminate without warning or notification.

try saving this as filesize.php


 $thisMax = ini_get('upload_max_filesize');

 echo $thisMax;


that should give you the max upload file size limit setting of your server. Because of the nature of your hosting account, I doubt it we can do anything to increase the max size.

Thanks! My max file size is 2 MB. However, an image that I tried to upload is less than 2 MB of memory

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.