embeding of G2 beta3 appears to be broken

bushi - May 23, 2005 - 02:23
Project:Gallery
Version:4.6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

In trying to get Gallery2 beta 3 to work with drupal 4.6 and the gallery module I run across two errors depending on the pathing I try and use to tell the module where gallery2 is.

if I give it the ugly long path:
/home/httpd/vhosts/walkerpad.com/httpdocs/testsite/gallery2/

Clicking on the gallery link returns nothing and bellow is loged.

details
Type php
Date Sunday, May 22, 2005 - 18:48
User admin
Location /testsite//?q=gallery
Message _gallery_init(): open_basedir restriction in effect. File(/httpdocs/testsite/gallery2//embed.php) is not within the allowed path(s): (/home/httpd/vhosts/walkerpad.com/httpdocs:/) in /home/httpd/vhosts/walkerpad.com/httpdocs/testsite/modules/gallery.module on line 235.
Severity error
Hostname 67.112.26.94

If I feed it the reltive path:
/httpdocs/testsite/gallery2/

warning: _gallery_init(): open_basedir restriction in effect. File(/httpdocs/testsite/gallery2//embed.php) is not within the allowed path(s): (/home/httpd/vhosts/walkerpad.com/httpdocs:/) in /home/httpd/vhosts/walkerpad.com/httpdocs/testsite/modules/gallery.module on line 235.

warning: _gallery_init(/httpdocs/testsite/gallery2//embed.php): failed to open stream: Operation not permitted in /home/httpd/vhosts/walkerpad.com/httpdocs/testsite/modules/gallery.module on line 235.

warning: _gallery_init(): Failed opening '/httpdocs/testsite/gallery2//embed.php' for inclusion (include_path='.:/usr/share/pear') in /home/httpd/vhosts/walkerpad.com/httpdocs/testsite/modules/gallery.module on line 235.

Fatal error: Undefined class name 'galleryembed' in /home/httpd/vhosts/walkerpad.com/httpdocs/testsite/modules/gallery.module on line 251

In either case it's not working and I can't identify anything that I might be doing wrong. Gallery works perfectly through direct access.

#1

japester - May 24, 2005 - 02:04

/httpdocs/testsite/gallery2/ is still not a relative path.

if your testsite root is '/httpdocs/testsite',
and drupal lives in '/httpdocs/testsite/drupal/'

then you need '../gallery2/' *only* as your relative path.

#2

bushi - May 24, 2005 - 16:57

Yes...

the drupal files live at /testsite and gallery2 lives at /testsite/gallery2 but that probable shouldn't matter, gallery 2 should be able to live anywhere.
So given that though I"m not sure what you are saying regarding the patthing.

#3

bushi - May 24, 2005 - 23:53

Just to be clear /gallery2/ returns the same error as the second stated case so do all variations.

#4

kiz_0987 - May 25, 2005 - 00:25

I do have beta 3 and embedded drupal working without issue. Did you upgrade to beta3 (so it used to work in beta2)? Does Gallery2 work on it's own (non-embedded)? Did G2 give any warnings on install?

Looking through Google on "open_basedir restriction in effect" (and the gallery forums at http://gallery.menalto.com/modules.php?op=modload&name=PNphpBB2&file=ind...) this seems either related to php/apache setup or just not finding the dir properly.

Have you tried "./gallery2" as your relative path -- that way it really is relative? Note this is "./gallery2", not "../gallery2".

#5

bushi - May 25, 2005 - 17:13

WHen I try that the gallery module resolves the emblemed link to http://www.walkerpad.com/testsite//?q=gallery
and the page error is the same as the first error (generic this page can't be displayed). Again only happening with it being embedded. http://www.walkerpad.com/testsite/gallery2/main.php works just dandy.

#6

walkah - May 25, 2005 - 19:53

it's important to note that the path in admin/settings/gallery needs to be the path relative to your drupal installation.

sounds to me like "gallery2/" should work for you..

#7

bushi - May 25, 2005 - 20:14

Yep, but it dosn't allways returns this page can't be displayed.

#8

bwynants - May 25, 2005 - 20:56

I have it running also except for fuls screen slideshow, that does not work and for the regular slideshow I had to do the javascript patch....
http://drupal.org/node/21880

#9

kiz_0987 - May 25, 2005 - 21:57

Full screen slideshow will not work in any embedded gallery2 right now (not just Drupal). Gallery Remote is needed and that does not work in embedded apps (although someone noted in a thread here that they could get it to work, but I've not been able too, nor have any of the Gallery 2 Forum guys it seems).

Bushi - please post your exact settings for gallery2 and drupal, and we can take a look. What is your $base_url? (you can find this in drupal subdir sites/default/settings.php) You seem to have an extra '/' at the end of your urls. Try removing it in $base_url.

#10

bushi - May 25, 2005 - 22:57

I adjusted the bas url (removed the end / off of /testsite/ and that fixed the // but sadly not the problem it's self (same can't display page error).

$db_url = 'mysql://x:x@localhost/drugal';
$db_prefix = '';

$base_url = 'http://www.walkerpad.com/testsite';

/**
* PHP settings:
*
* To see what PHP settings are possible, including whether they can
* be set at runtime (ie., when ini_set() occurs), read the PHP
* documentation at http://www.php.net/manual/en/ini.php#ini.list
* and take a look at the .htaccess file to see which non-runtime
* settings are used there. Settings defined here should not be
* duplicated there so as to avoid conflict issues.
*/
ini_set('arg_separator.output', '&');
ini_set('magic_quotes_runtime', 0);
ini_set('magic_quotes_sybase', 0);
ini_set('session.cache_expire', 200000);
ini_set('session.cache_limiter', 'none');
ini_set('session.cookie_lifetime', 2000000);
ini_set('session.gc_maxlifetime', 200000);
ini_set('session.save_handler', 'user');
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid', 0);

/**
* Variable overrides:
*
* To override specific entries in the 'variable' table for this site,
* set them here. You usually don't need to use this feature. This is
* useful in a configuration file for a vhost or directory, rather than
* the default settings.php. Any configuration setting from the 'variable'
* table can be given a new value.
*/
//$conf = array(
// 'site_name' => 'My Drupal site',
// 'theme_default' => 'pushbutton',
// 'anonymous' => 'Visitor'

#11

kiz_0987 - May 25, 2005 - 23:16

Hmm, I'm not sure what is not working here. If you are comfortable with it could you give me access to your drupal setup so that I can take a look at how you have configured things? If you'd like to take that route you can e-mail me the login info by clicking on my user name and clicking "contact".

#12

alexandreracine - September 24, 2005 - 01:15
Status:active» closed

Since there is no more activity here and version 2 of Gallery is officially out, please download it and use it.
Also use cvs version of the gallery.module file. Walkah updated it a couple of days ago.
Closed.

 
 

Drupal is a registered trademark of Dries Buytaert.