Reputation: 3439
It seems that I cannot upload and create files in my Arch Linux Lamp Setup. When I check my desired folder permissions , I get :
ls -ldh thumbnails/
drwxrwxrwx 5 ytsejam http 4.0K Jun 13 12:33 thumbnails/
I check my apache user by php whoami() result is "http" and /etc/group have those entries
http:x:33:ytsejam
users:x:100:http
wheel:x:10:root,ytsejam.
I cant see any error on /var/log/httpd/error_log
or access_log.
Here is error when I upload the file
ErrorException
file_put_contents(/home/ytsejam/public_html/projemiz/public/uploads/img/posts/thumbnails/213/thumb-flam1.jpg): failed to open stream: No such file or directory
When I create the folder manually I can get success on upload. It is a permissions error but I don't know how to fix it. Any Help?
Upvotes: 0
Views: 1062
Reputation: 490
It is not possible to create directories (folders) with file_put_contents
.
See PHP, Creating a folder when I run file_put_contents()
Upvotes: 1