P.Z. Low Cost CPanel Web Hosting  

Go Back   P.Z. Low Cost CPanel Web Hosting > Page-Zone Web Hosting Main Forum > General FAQ > General Questions and Comments

General Questions and Comments Post your question or grace us with your knowledge. Posting limited to registered members.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Gallery update problem.
Old
  (#1 (permalink))
evodvo
Registered User
evodvo is on a distinguished road
 
Status: Offline
Posts: 15
Join Date: Apr 2003
Rep Power: 35
Question Gallery update problem. - 08-22-2004, 03:04 PM

All,

It seems that I have successfully installed an updated version of Gallery on my site, but when the individual albums try to upgrade themselves they are stopped by an error:

Warning: unlink(/home/******/public_html/albums/040714_QCI_TJ/serial.83.dat): Permission denied in /home/********/public_html/gallery/platform/fs_unix.php on line 83

Warning: fopen(/home/******/public_html/albums/040714_QCI_TJ/photos.dat.lock): failed to open stream: Permission denied in /home/******/public_html/gallery/platform/fs_unix.php on line 55
Error: Could not open lock file (/home/*******/public_html/albums/040714_QCI_TJ/photos.dat.lock)!
  Send a message via AIM to evodvo  
Reply With Quote
Old
  (#2 (permalink))
evodvo
Registered User
evodvo is on a distinguished road
 
Status: Offline
Posts: 15
Join Date: Apr 2003
Rep Power: 35
08-22-2004, 03:05 PM

And I tried to change the permissions on that lock file, but the server wouldn't allow it.
  Send a message via AIM to evodvo  
Reply With Quote
Old
  (#3 (permalink))
edwurster
green side up, please!
edwurster will become famous soon enoughedwurster will become famous soon enough
 
edwurster's Avatar
 
Status: Offline
Posts: 660
Join Date: May 2003
Location: Voorhees, NJ
Rep Power: 68
08-22-2004, 03:50 PM

Quote:
Originally posted by evodvo
And I tried to change the permissions on that lock file, but the server wouldn't allow it.
Check this thread .

If you make the .htaccess and php.ini changes, I believe you'll be ok.

If you have questions after making those changes, ask in this thread.

The files you are trying to change are owned by user 99 - nobody. Security changes on the server (phpsuexec) want your Gallery script to run as you, instead of user 99. The .htaccess and php.ini changes may fix your problem.

This also explains why you can't change the permissions on the files. User 99 would have to change the permissions.

In the thread I refer to, you'll see other ways around the problem. Would require downloading all the jpg's, uploading again, and so on.


Ed Wurster - sacts92 (old root10)

...CPANEL Docs
......P-Z Server Status
  Send a message via AIM to edwurster  
Reply With Quote
Old
  (#4 (permalink))
evodvo
Registered User
evodvo is on a distinguished road
 
Status: Offline
Posts: 15
Join Date: Apr 2003
Rep Power: 35
08-23-2004, 12:55 PM

Thanks Ed!

But...

My .htaccess doesn't have the lines that are supposed to get commented out.

and

I put a php.ini file in the Gallery directory and the overall albums directory, but the server won't let me put one in one of my main album directories.

Arg.


try http://hoboerotic.com today!
  Send a message via AIM to evodvo  
Reply With Quote
Old
  (#5 (permalink))
edwurster
green side up, please!
edwurster will become famous soon enoughedwurster will become famous soon enough
 
edwurster's Avatar
 
Status: Offline
Posts: 660
Join Date: May 2003
Location: Voorhees, NJ
Rep Power: 68
08-23-2004, 03:11 PM

Quote:
Originally posted by evodvo
My .htaccess doesn't have the lines that are supposed to get commented out.

I put a php.ini file in the Gallery directory and the overall albums directory, but the server won't let me put one in one of my main album directories.

Arg.
-- public_html/Gallery

.htaccess and php.ini go in the Gallery folder.

-- public_html/albums

I don't have .htaccess in my Albums folder.


Ed Wurster - sacts92 (old root10)

...CPANEL Docs
......P-Z Server Status
  Send a message via AIM to edwurster  
Reply With Quote
Old
  (#6 (permalink))
evodvo
Registered User
evodvo is on a distinguished road
 
Status: Offline
Posts: 15
Join Date: Apr 2003
Rep Power: 35
08-23-2004, 05:01 PM

The .htaccess file in my public_html/Gallery folder looks like this:

# BEGIN Gallery section
# (Automatically generated. Do not edit this section)
# Note: still under development, so format may change.
# If you edit this file, make a backup before runnng the Config. Wizard.


Options -Indexes +FollowSymLinks

RewriteEngine On
RewriteBase /gallery/

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/([0-9]+)$ /gallery/view_photo.php?set_albumName=$1&index=$2 [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/([A-Za-z_0-9\-]+)$ /gallery/view_photo.php?set_albumName=$1&id=$2 [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)/$ /gallery/$1 [R]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.\?/]+)$ /gallery/view_album.php?set_albumName=$1 [QSA]

# END Gallery section. Add User changes below this line

The php.ini file in the same folder looks like this:

register_globals = on
post_max_size = 20971520
upload_max_filesize = 20971520
magic_quotes_gpc = off
session.bug_compat_warn = off

I have removed the .htaccess and php.ini from my public_html/albums folder.

Still not working!

Cheers


try http://hoboerotic.com today!
  Send a message via AIM to evodvo  
Reply With Quote
gallery update
Old
  (#7 (permalink))
richof
Registered User
richof is on a distinguished road
 
richof's Avatar
 
Status: Offline
Posts: 65
Join Date: Dec 2002
Location: Rhode Island
Rep Power: 40
gallery update - 08-23-2004, 08:55 PM

I ran into the same problem. My solution was to download the latest tarball for gallery, upload it to my public_html directory, rename the old gallery, install the new gallery, move the albums only from old to new install. This works great without worrying about htaccess and permissions. You must create a blank htaccess and config.php file and gallery takes care of rest. Your albums will automatically update the first time you view them. The only downside to this approach is that you will lose your users list. You define a new admin user on install. This was not a problem for me, but if you have lots of users, you will have to register them again. Good Luck!


Ric Hoffman
Hoffman Web Hosting
http://hoffmanweb.com
  Send a message via Yahoo to richof Send a message via AIM to richof  
Reply With Quote
Old
  (#8 (permalink))
edwurster
green side up, please!
edwurster will become famous soon enoughedwurster will become famous soon enough
 
edwurster's Avatar
 
Status: Offline
Posts: 660
Join Date: May 2003
Location: Voorhees, NJ
Rep Power: 68
08-23-2004, 09:06 PM

Your php.ini is same as mine.

My .htaccess from Gallery folder (edited the domain name before posting here) is:


#Commented out to fix phpsuexec change 8/4/2004
#php_value post_max_size 20971520
#php_value upload_max_filesize 20971520
#php_value magic_quotes_gpc off
#php_flag session.bug_compat_warn off


Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /gallery/
RewriteRule ^([^\.\?/]+)/([0-9]+)$ /gallery/view_photo.php?set_albumName=$1&index=$2 [QSA]
RewriteRule ^([^\.\?/]+)/([A-Za-z_0-9\-]+)$ /gallery/view_photo.php?set_albumName=$1&id=$2 [QSA]
RewriteRule ^([^\.\?/]+)/$ /gallery/$1 [R]
RewriteRule ^([^\.\?/]+)$ /gallery/view_album.php?set_albumName=$1 [QSA]
</IfModule>



RewriteCond %{HTTP_HOST} ^gallery$ [OR]
RewriteCond %{HTTP_HOST} ^www.gallery$
RewriteRule ^(.*)$ http://www.XXXXX.com/gallery/albums.php/ [R=301,L]


Ed Wurster - sacts92 (old root10)

...CPANEL Docs
......P-Z Server Status
  Send a message via AIM to edwurster  
Reply With Quote
still not working!?!?!?
Old
  (#9 (permalink))
evodvo
Registered User
evodvo is on a distinguished road
 
Status: Offline
Posts: 15
Join Date: Apr 2003
Rep Power: 35
still not working!?!?!? - 09-05-2004, 12:32 AM

Can anyone else help me with this problem? I have tried everything I can think of, including everything in this thread, but to no avail. Here is the error that occurs when an album tries to self update (after installing the latest version of gallery, the individual albums update themselves the first time they are viewed):

Warning: unlink(/home/XXXXXXX/public_html/albums/040430awakino/serial.18.dat): Permission denied in /home/XXXXXXXX/public_html/gallery/platform/fs_unix.php on line 83

Warning: fopen(/home/XXXXXXXX/public_html/albums/040430awakino/photos.dat.lock): failed to open stream: Permission denied in /home/XXXXXXXX/public_html/gallery/platform/fs_unix.php on line 55
Error: Could not open lock file (/home/XXXXXXX/public_html/albums/040430awakino/photos.dat.lock)!


thanks for your help, ANYONE?!?!


try http://hoboerotic.com today!
  Send a message via AIM to evodvo  
Reply With Quote
Re: still not working!?!?!?
Old
  (#10 (permalink))
edwurster
green side up, please!
edwurster will become famous soon enoughedwurster will become famous soon enough
 
edwurster's Avatar
 
Status: Offline
Posts: 660
Join Date: May 2003
Location: Voorhees, NJ
Rep Power: 68
Re: still not working!?!?!? - 09-05-2004, 10:05 AM

Quote:
Originally posted by evodvo
Warning: unlink(/home/XXXXXXX/public_html/albums/040430awakino/serial.18.dat): Permission denied in /home/XXXXXXXX/public_html/gallery/platform/fs_unix.php on line 83

Warning: fopen(/home/XXXXXXXX/public_html/albums/040430awakino/photos.dat.lock): failed to open stream: Permission denied in /home/XXXXXXXX/public_html/gallery/platform/fs_unix.php on line 55
Error: Could not open lock file (/home/XXXXXXX/public_html/albums/040430awakino/photos.dat.lock)!
Look at the owner, group and permissions on these files.


Ed Wurster - sacts92 (old root10)

...CPANEL Docs
......P-Z Server Status
  Send a message via AIM to edwurster  
Reply With Quote
Old
  (#11 (permalink))
evodvo
Registered User
evodvo is on a distinguished road
 
Status: Offline
Posts: 15
Join Date: Apr 2003
Rep Power: 35
09-05-2004, 08:41 PM

I have tried to reset the permissions on these files, but the server will not let permit it.

Thanks for your help, though.


try http://hoboerotic.com today!
  Send a message via AIM to evodvo  
Reply With Quote
Old
  (#12 (permalink))
edwurster
green side up, please!
edwurster will become famous soon enoughedwurster will become famous soon enough
 
edwurster's Avatar
 
Status: Offline
Posts: 660
Join Date: May 2003
Location: Voorhees, NJ
Rep Power: 68
09-05-2004, 10:51 PM

Quote:
Originally posted by evodvo
I have tried to reset the permissions on these files, but the server will not let permit it.
Submit ticket to have owner changed to your account login on the albums directory.


Ed Wurster - sacts92 (old root10)

...CPANEL Docs
......P-Z Server Status
  Send a message via AIM to edwurster  
Reply With Quote
Gallery
Old
  (#13 (permalink))
jacorob
Registered User
jacorob is on a distinguished road
 
Status: Offline
Posts: 17
Join Date: Apr 2003
Rep Power: 35
Gallery - 09-06-2004, 12:36 AM

The problem with gallery is that when you use it the files created on the filesystem are set as owned by the user 'nobody' (web server processor) and files are accessed as the user 'nobody'.

Why is this a big deal? Because unless the files are set to allow the nobody user access to it, you'll get an error. In your case it sounds like the 'nobody' user doesn't have the necessary permissions on your files. This would be the case if you copied them to a new location (they'd be set as owned by you), not 'nobody'.

Unfortunately, you're not allowed to change the owner or group to 'nobody' (there's a userid and group named nobody). This only leaves giving the userid the necessary permissions through the global permission. Personally, I hate giving any global write permission, but to my knowledge Page-Zone gives me no other choice.

To fix this:
1. Telnet to the directory just above your root albums directory
2. Run the following commands -
chmod -R o+r 'album directory'
chmod -R o+w 'album directory'

The user nobody should successfully be able to upgrade your albums now. If not, let me know, but you'll need to provide more info for me to help such as what the permissions are set to on the files (and who the owner is, etc).

That's what I had to do to upgrade my gallery from 1.3 to 1.4.

Bob
   
Reply With Quote
Oh..one more thing