[SOLVED] STEP 4 - Can't get throught! Help.

Continental

Joined: 2004-06-14
Posts: 243
Posted: Mon, 2004-11-08 12:00

Step 4: storage setup. I make the directory like:
/pub/home/mypath/g2data (or)
/pub/home/mypath/mydomain/gallery/g2data

then, make
chmod 777 g2data (as in readme.html)

and the installer create only "albums" subfolder inside and that's all.

I can't go up to step 5, coz necessary directories are not created properly.

Help, please.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2004-11-08 15:48

please post your config:
OS (windows, linux, ...?)
webserver (iis, apache?)
mysql version
php version

and post the error if it shows an error.

ps: never ever post your email address, or maybe you like spam, who knows :)

 
Continental

Joined: 2004-06-14
Posts: 243
Posted: Tue, 2004-11-09 04:58

FreeBSD 4.x.
- HTTP Apache 1.3.20rusPL30;
- MySQL Ver 9.35 Distrib 3.23.54 (3.32.34); (it's AFTER step 4)
- Perl 5;
- PHP 4.x.

the more information about provider's systems please refer here:
http://v6test.valuehost.ru/phpinfo.php

 
Continental

Joined: 2004-06-14
Posts: 243
Posted: Wed, 2004-11-10 16:32

Hi there,

can I still hope to wait for the answer?
I'd like to install G2, but I can't!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2004-11-10 17:45

not enough info to debug.
PM me ssh info to access your server and I can take a look.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2004-11-13 18:26

Continental,
Your system has an unusual setuid setup.. when G2 creates directories they automatically are created with your userid as the owner and the setuid bit set, even though PHP is running as some other userid. This would be fine, except some PHP functions don't recognize setuid and fail.. for example, is_writable. What you're seeing is G2 create the albums dir and then check to make sure the newly created directory is writable, and PHP says it isn't. I have modified your StorageSetupStep.class so it creates dirs with 775 permissions instead of 755 so is_writable with return true.. try going through the installer now and see if it works.. I'm not sure if you'll hit other problems further on.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sat, 2004-11-13 18:31

Question for G2 developers: should StorageSetupStep do umask(0) before creating the directories? Also the UI needs to handle the error code from dir creation.. any failure now refreshes the page with no error message.

 
Continental

Joined: 2004-06-14
Posts: 243
Posted: Tue, 2004-11-16 18:08

Hi,

Step 4 went successfull after changing the rights in the StorageSetupStep.class file, however I faces the other problems:

1) the first one: at the STEP before installing core modules:

Warning: mkdir(/g2data/cache/module/core): Permission denied in /gallery/modules/core/classes/GalleryPlatform.class on line 660
Warning: mkdir(g2data/cache/module/core/0): No such file or directory in /gallery/modules/core/classes/GalleryPlatform.class on line 660
Warning: mkdir(/g2data/cache/module/core/0/0): No such file or directory in /gallery/modules/core/classes/GalleryPlatform.class on line 660
Warning: fopen (g2data/cache/module/core/0/0/0.inc): failed to open stream: No such file or directory in /gallery/modules/core/classes/GalleryPlatform.class on line 318
Warning: flock(): supplied argument is not a valid stream resource in /gallery/modules/core/classes/GalleryPlatform.class on line 336

2) the second one: on running /gallery/main.php
a) Gallery could not write to /g2data/smarty/templates_c/%%47487394/
b) I make 777 on this , and the following text left:

Error (ERROR_PLATFORM_FAILURE)
in modules/core/classes/GalleryTemplate.class at line 238 (gallerystatus::error)
in modules/core/classes/GalleryTemplate.class at line 191 (gallerytemplate::_initcompiledtemplatedir)
in main.php at line 382 (gallerytemplate::display)
in main.php at line 47
in main.php at line 40

What's next to do?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2004-11-17 19:04

I don't know what changes are required in G2 to support setuid-directories. If you can create a g2data dir that does NOT have setuid (when you do "dir" in ftp you should see drwxrwxrwx and NOT drwsrwxrwx) then G2 should work correctly. I wasn't able to create such a directory on your system, however.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2004-11-17 19:31

ah! I managed to create a g2data dir without setuid.. I created the directory in /var/tmp where it wouldn't automatically get the setuid bit set, then moved it into your home dir.
Try running the installer using {your-home-dir}/g2data as the g2data path.. I think it should work now.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2004-11-18 03:45
mindless wrote:
Question for G2 developers: should StorageSetupStep do umask(0) before creating the directories? Also the UI needs to handle the error code from dir creation.. any failure now refreshes the page with no error message.

I fixed the umask, good idea.

I was unable to reproduce the lack of error from dir creation. I might have fixed this in an earlier pass through that code, though. Can you still reproduce it?

 
erwanp

Joined: 2004-11-18
Posts: 4
Posted: Thu, 2004-11-18 15:20

I get this error too : no error but no link to go through step 4.

what's the solution ?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2004-11-18 16:31

bharat, try grep -r creation_error install I only see the place where the error code is set; nowhere does it show a message based on that flag. Also, do you want G2 to support setuid directories? man chmod to see more info on this.. the OS must support it and the filesystem must be mounted with a certain flag.

erwanp, when you do dir (in ftp) or ls -al (shell) do you see drws on each directory or drwx ? If you see drws then you have the same setup as Continental.. try doing

mkdir /var/tmp/g2data
chmod 777 /var/tmp/g2data
mv /var/tmp/g2data YOUR_HOME_DIR

Then do dir or ls -al to make sure this g2data directory has drwx; if so, give the path to that directory to the G2 installer. If you only have ftp access you'll have to put the above commands in a php file:

<?php
system("mkdir /var/tmp/g2data; chmod 777 /var/tmp/g2data; mv /var/tmp/g2data YOUR_HOME_DIR"); ?>
Done. 
 
erwanp

Joined: 2004-11-18
Posts: 4
Posted: Fri, 2004-11-19 09:29

thanks for your answer. The problem actually came from the fact that the uploaded G2 folders had already been used in a local install, and g2data was already full of folders, so I deleted them and it works.