All of the sudden I am getting the following when trying to access my gallery pages on my site
Warning: mkdir() failed (No such file or directory) in /usr/xxx/x/x/xxxx/public_html/gallery/classes/gallery/UserDB.php on line 35
Error: Unable to create dir: /usr/xxx/x/x/Xxx/public_html/albums/.users
Fatal error: Call to a member function on a non-object in /usr/xxx/x/x/xxxx/public_html/gallery/classes/Album.php on line 64
Any help anyone could provide would be great. I made sure /albums has been chmod 777, but that shouldn't matter because I haven't made any changes as of late and everything had been working.
Thanks
Posts: 7985
What are you trying to do when this happens?
What version of Gallery, PHP, Apache?
What OS?
Posts: 4
I am just trying to access my gallery home page: http://www.mikemunroe.com/gallery/albums.php
I am running the latest stable gallery release
PHP version 4.2.3
Apache-1.3.27
All running on FreeBSD 4.6-STABLE
Posts: 8194
Are you that the permissions of all files in the album directory are 0777? Also, the directory itself needs to be 0777. Make sure that the .users folder (inside the albums folder) is 0777. Also, something had to change--problems like this don't just just happen. Are you sure there isn't something that happened or you did that you've never done before?
Posts: 4
yes, I agree. Nothing should have changed, I just don't remember doing anything, but I must have done something.
I never had permissiong problems in the past, but it seems I do now. Here is a kicker, I am not allowed to change chmod 777 .users because of the following - Operation not permitted.
Here is a snippet of my album directory with perms
drwxrwxrwx 7 mikemunr mikemunr 512 Oct 10 19:10 .
drwxr-xr-x 15 mikemunr mikemunr 512 Oct 23 21:34 ..
drwxr-xr-x 2 nobody mikemunr 512 Oct 10 19:12 .users
drwxr-xr-x 2 nobody mikemunr 2560 Oct 10 19:10 GlenCove
drwxr-xr-x 2 nobody mikemunr 2048 Oct 10 19:10 Hiking
drwxr-xr-x 2 nobody mikemunr 1536 Oct 10 19:10 NEAR
drwxr-xr-x 2 nobody mikemunr 1536 Oct 10 19:10 SalemWorld
-rw-r--r-- 1 nobody mikemunr 79 Oct 9 12:35 albumdb.dat
-rw-r--r-- 1 nobody mikemunr 80 Oct 9 12:32 albumdb.dat.bak
-rw-r--r-- 1 nobody mikemunr 0 Jul 8 17:15 albumdb.dat.lock
-rw-r--r-- 1 nobody mikemunr 11 Oct 9 12:38 serial.dat
%chmod 777 .users
chmod: .users: Operation not permitted
Posts: 8194
Write a script that looks like this
<?php
exec ("chmod -R 0777 /path/to/albums");
?>
upload as a .php file and run via the web. Replace /path/to/albums with your albums path. This should fix the chmod problem at least...
Posts: 4
Thank you to all that were helping with this. I have been having some issues with my hosting service lately. Long story short, there were two issues:
1) I could not change perms on some of my files because somehow they weren't owned by a user account - notice "nobody" as the owner of some of my files. I had to contact the hosting service to get someone to change those files back to be owned by my user account
2) So, that gets me to thinking about why that occured. I believe those files used to be owned by my account seeing that I didn't have problems accessing the site. Well, I read the error message I was getting a bit more carefully and noticed that it was trying to create the file in another directory than I had previously set in config. Seems that my hosting service moved my files from one machine/partition on a machine without notifying me. After changing the directory location in config and making sure that perms were set, everything seems to be working fine now.
Thanks to those that helped.
Posts: 8194
The reason why is that they were created by the web server, not you..Try using my script and all should go well..