Jump to content

ProcessWire doesn't create directories under assets/files


JoshoB
 Share

Recommended Posts

I've been struggling with a website for a client on a scale not experienced before. We managed to get almost everything operational. The only problem now is that when I try to add a new page, the system doesn't make (or is unable to make) a new directory under /site/assets/files/.

This means that when I try to upload images, the bar goes to 100% and then the picture disappears, giving an error: destinationPath is empty or does not exist. But why doesn't ProcessWire create these directories? Permissions are all set to 777 (out of desperation).

The host says they cannot provide support and lay the blame at ProcessWire's feet. Never before have I had this many problems and I assume it's a problem with the server configuration. However, if anyone has any ideas where I can even start to find a solution to this problem, it would be greatly appreciated, as always.

Edit: I created a test.php file and put this on the server. When I run it, it does create a folder, so I'm stumped:

if(!mkdir('delete-this-test-folder')) {
    print_r(error_get_last());
}
Link to comment
Share on other sites

Hi JoshoB,

Do you have enough disk space?

Does the user running the PHP script have execute permission on the parent folders up to /files/ ?

Also setting permissions to 777 can lead to problems with certain security modules. Just make sure that the user of your webserver has write access.

Edit: Where are you putting your test.php file? You could compare the permissions on this folder with the permissions of /site/assets/files

Cheers

Link to comment
Share on other sites

Hi Wanze,

Thanks for your help.

Disk space is not an issue. Where do I check the permissions for the user? Test.php was dropped in the root, by the way -- I cannot get it to run in /assets/files/ (as ProcessWire intercepts it when I call it via the address bar). I know about the security issues with 777, but it cannot be helped. The server is a pain.

Link to comment
Share on other sites

You're welcome.

Where do I check the permissions for the user?

Do you have access to the server via terminal? If so, cd into /site/assets/ and run the command "ls -al". This will show you what user/group the folders belong to along with the permissions. If you don't have terminal access, maybe you can see the permissions and the owner of this folder with your FTP programm. How did you change the permissions?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...