error when changing from 777 to 755 and reserve in album

stevefu29

Joined: 2005-03-08
Posts: 3
Posted: Tue, 2005-03-08 18:40

Hi
I installed fresh2.0 Gallery fine and played w/ it and got no problem at all . When i changed my photos album (outside of home directory , /home/album) from 777 to 755 then went to my photo url to see photos (www.mydomain/photos). I got an error. So i went back and changed my photos album from 755 to 777 immediately but i stil got the following error when accessing my photos url.
Thanks for any help

Error
Error (ERROR_PLATFORM_FAILURE)
in modules/core/classes/GalleryTemplate.class at line 250 (gallerystatus::error)
in modules/core/classes/GalleryTemplate.class at line 203 (gallerytemplate::_initcompiledtemplatedir)
in main.php at line 318 (gallerytemplate::display)
in main.php at line 46
in main.php at line 39
Smarty Error
Error (ERROR_PLATFORM_FAILURE)
in modules/core/classes/GalleryTemplate.class at line 250 (gallerystatus::error)
in modules/core/classes/GalleryTemplate.class at line 203 (gallerytemplate::_initcompiledtemplatedir)
in main.php at line 505 (gallerytemplate::display)
in main.php at line 61
in main.php at line 39
<Please check the G2 FAQ (sticky topic in this forum) before posting!>
----

Gallery URL (optional):
Gallery version:
Webserver (with version):
Datatabase (with version):
PHP version (eg 4.2.1):
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system:
Web browser/version:
G1 version (for migration bugs):

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-03-08 18:55

- did you change this 777->755 in the site admin view or manually in the filesystem without G2?
- you may try this to fix your problem: browse to gallery/lib/tools/test/
hit FlushTemplate and FlushCache, maybe that fixes the problem.
- do you use G2 beta 1 or a current cvs version or is it older?

 
stevefu29

Joined: 2005-03-08
Posts: 3
Posted: Tue, 2005-03-08 21:21

Hi valiant
i used the 2.0 Beta 1. I went to the server admin and manually change from 777 to 755 (not in gallery admin). I got error then changed it back to 755, still got error.
I followed your instruction. i went to www.mydomain/gallery2/lib/tools/test
Enter my password then i got the following error (and when i went back to mydomain/gallery2/lib/tools/test i couldn't enter my password). /secure_photos is the one i manually changed from 777 to 755. It locates outside of home directory).

thanks

Warning: mkdir(/home/thanhsin/secure_photos/smarty/templates_c/%%755923654): Permission denied in /home/thanhsin/public_html/photos/modules/core/classes/GalleryPlatform.class on line 685
Error (ERROR_PLATFORM_FAILURE) : Unable to mkdir(/home/thanhsin/secure_photos/smarty/templates_c/%%755923654)
in modules/core/classes/GalleryTemplate.class at line 240 (gallerystatus::error)
in modules/core/classes/GalleryTemplate.class at line 181 (gallerytemplate::_initcompiledtemplatedir)
in lib/tools/test/index.php at line 174 (gallerytemplate::fetch)
in lib/tools/test/index.php at line 48
in lib/tools/test/index.php at line 10

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-03-08 23:08

can you check the owner and permissions of g2data, g2data/smarty and g2data/smarty/templates_c and post them here?

 
stevefu29

Joined: 2005-03-08
Posts: 3
Posted: Wed, 2005-03-09 00:56

Here they are

g2data/smarty is 755
g2data/smarty/templates_c is 755

Even i changed them to 777 i still have the same error. My first installation i got same problem.

thanks for your time

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-03-09 09:03

you provided only the permissions not the owner. who's the owner of these dirs?

if you don't know how to get this information...

ls -la in the shell if you have shell access
or make a php script
<?php
exec('ls -la /home/thanhsin/secure_photos/*', $ret);
foreach ($ret as $val) print $ret.'<br>';
?>

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-03-09 16:07

also check that every directory up to your g2data dir has an odd last permission (ie if any has 750 or 754 then this could also cause this error)

 
darkknight
darkknight's picture

Joined: 2003-03-01
Posts: 40
Posted: Mon, 2005-03-21 17:11

I had a similar problem. in beta 1, just after finishing the install and entering gallery...

it seemed gallery failed to create the dir g2data/smarty and g2/data/smarty/templates_c

I created them manuall it starts properly

 
darkknight
darkknight's picture

Joined: 2003-03-01
Posts: 40
Posted: Mon, 2005-03-21 17:13

seems that then it failed to create the g2data/sessions/ directory as well, i couldnt log in!

i created them by hand and it is fine...
the whole dir is owned by www-data, so i dont see why it shouldnt be able to create the dir's. Is there an issue with gallery or a restriction in php about creating dir's? it managed to make the cache/ and thumbnails/ dir just fine !?!

 
darkknight
darkknight's picture

Joined: 2003-03-01
Posts: 40
Posted: Mon, 2005-03-21 17:16

i feel like im spamming the board now.

It seems to happen every time gallery needs to create a dir:

Warning: fopen(/home/g2data/locks/0/6/6): failed to open stream: No such file or directory in /usr/local/apache/htdocs/gallery2/modules/core/classes/GalleryPlatform.class on line 341

Warning: Invalid argument supplied for foreach() in /usr/local/apache/htdocs/gallery2/modules/core/classes/FlockLockSystem.class on line 260

----
Gallery version 2.0-beta-1
PHP version 4.3.10-2 apache2handler
Webserver Apache/2.0.53 (Debian GNU/Linux) mod_python/3.1.3 Python/2.3.5 PHP/4.3.10-2
Database mysql 4.0.22-log
Toolkits ImageMagick, NetPBM
Operating system Linux server 2.4.18 #1 SMP Sat Jul 24 20:16:58 BST 2004 i686

 
darkknight
darkknight's picture

Joined: 2003-03-01
Posts: 40
Posted: Mon, 2005-03-21 17:38

Ok, it works now.

I re-ran the setup without deleting the g2data dir or dropping the database, and this time it has successfully created all the subdirectories (i think)

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2005-03-22 10:40

darkknight, G2 tries to make new directories quite often. So it will probably bomb again on you. However, I think you've got a different issue than the original topic poster so if this does recur, please post it in a new topic and we'll help you sort it out.