gallery path settings not saving

richclever

Joined: 2005-01-26
Posts: 4
Posted: Fri, 2008-01-18 11:30

Hi,

I'm trying to embed gallery2 into drupal but whenever I set the paths in manual mode or automatic mode it won't save them. I have set them correctly and when I test locations it comes back as fine but if I go back to them they have dissapeared. Is there anything else I need to do.

i have managed to do it previously on a windows /xampp installation but on ly linux hosting account it doesn't want to stick.

Can anyone help?

 
cvgeldern

Joined: 2008-02-12
Posts: 2
Posted: Tue, 2008-02-12 17:03

same problem here... this is the error i get at step 2 in admin/settings/gallery:

Quote:
Errors in your current Gallery2 location settings:

Array: Everything seemed OK, but the Gallery could still not be initialised. Perhaps a manually entered value is incorrect.

Gallery2 URL or URI:
/rul3z/gallery2/
URL or URI of the G2 standalone location. This can be either the full URL to Gallery2 (e.g. http://www.example.com/gallery2) or the path from docroot to the Gallery2 directory (e.g. /gallery2). If using a URI the protocol/hostname are both optional.
Gallery2 filesystem path:
/usr/local/psa/home/vhosts/example.com/httpdocs/rul3z/gallery2/
The filesystem path of your Gallery2 directory. This can be either an absolute path (e.g. /home/mysite/htdocs/gallery2) or relative to the root directory of your Drupal installation (e.g. ../gallery2).
Embed URI:
/index.php?q=gallery
URI to access G2 via Drupal. Don't worry if you are using clean urls in Drupal and this still ends in 'index.php?q=gallery'. This is needed to get the Gallery2 URL rewrite module to work correctly and will not be visible.

rul3z is the drupal dir, example.com off course is replaced by the real domain.
anything i try, absolute or relative paths, all give the same problem...

 
cvgeldern

Joined: 2008-02-12
Posts: 2
Posted: Thu, 2008-02-14 10:00

Still have this problem, I tried every possible (clean) setup:
- gallery2 inside and outside drupal root (with and without symlink);
- any configuration of paths (absolute and relative paths);
- different software versions of drupal (rc3, rc4, final) and gallery (2.2.x, 2.3.x rev 17469 from svn);
- installation instructions, including all workarounds like disabling url_rewrite (drupal and/or gallery).

If I fill in a wrong path it produces an appropriate error like "Can't find embed.php", so there's something else wrong. Also Drupal and Gallery2 standalone are fully functional, without any problems/errors.

The current versions I have installed are:
- Drupal 6.0 final;
- Gallery2 2.3.x rev 17469;
- Gallery module 6.x-1.x-dev (2008-Feb-11)

So I dived into the code and although I didn't find the problem/solution (yet), I tried to locate the generated error.

The error is generated between lines 892 and 898 of gallery_install.inc. The function _gallery_init obviously returns FALSE.

Quote:
if (!_gallery_init(TRUE, $vars, FALSE)) {
// Gallery install was supposed to be valid, but it still failed. Something is wrong.
$result['gallery_init']['status'] = FALSE;
$result['gallery_init']['info'] = t('Everything seemed OK, but the Gallery could still not be initialized.
Perhaps a manually entered value is incorrect.');
$vars['locations_valid'] = FALSE;
}

Function _gallery_init is located in gallery_base.inc from line 52. There are 3 places where this function explicitly returns FALSE:
- If embed.php is not found (line 109-115);
- If there is feedback/error while initializing (line 118-130) -- this goes way deeper to trace;
- If initialization is unsuccessful by checking existence of certain classes (line 133-139).
It's unclear where something goes wrong, but I think it's not the first one, because it would report it can't find embed.php.

At this moment I don't have more time to investigate this, I already spent too much ours on this while having some other important deadlines ;)
Maybe I can track the problem down next week, but until now this is all the info I've got. If a bug report is needed, I'll be glad to submit one.

BTW, I don't know if this has anything to do with the issue "Auto config. fails to locate embed.php" (http://drupal.org/node/188047)