install drupal and integrate gallery2

jillelaine's picture
about this website
Submitted by jillelaine on October 5, 2006 - 5:54am.

i choose drupal for the hOodville website: it's an absolutely stunningly wonderful CMS software package. AND IT'S FREE! http://www.drupal.org

my big project right now is to get gallery2 http://gallery.menalto.com/ installed and integrated into drupal.

what does integration mean? it means that users on the site will log into gallery2 (so they can upload photos etc) when they log into drupal. otherwise, a user would have to log in TWICE: once to the main drupal website, and again to gallery2. ugh, no one wants that.

integration also means that the gallery2 page will display nicely within the template of drupal, so that the same (or similar looking) headers, footers, and navigation bar (hopefully) appear along with the gallery photos.

here is the link to drupal's gallery2 module which does most of the integration: http://drupal.org/project/gallery i've done the first few steps to get gallery2 installed: downloaded the files from their website and uploaded them to the webserver in a prepared directory. i've set the correct permissions on the directories, but i've immediately run into problems with php settings: gallery throws a fatal error on the initial install.

here is the problem:drupal wants session.save_handler=user set in my main php.ini file and gallery2 wants session.save_handler=files. (note: this issue has been solved with the newer versions of drupal)

okay, i've read horror stories of drupal users who screwed up their drupal install by changing the session.save_handler in php.ini to files, so i'll avoid that. the suggested alternative is to create a .htaccess file in the gallery2 directory http://gallery.menalto.com/node/15964? with this line:
php_value session.save_handler "files"
and then add this to the httpd.conf file (apache's config file)
<Directory "path/to/gallery2"> AllowOverride All </Directory>
which will allow the .htaccess file in the gallery2 directory to override the values set in php.ini for the gallery2 directory. we'll see if this works!

--------more information---------

http://gallery.menalto.com/node/24126

http://gallery.menalto.com/forum/62

some info from the first link:
4) Login to G2 as a site administrator:
a) Make sure the registration module is deactivated or not installed

>> done

b) Set the G2 session lifetime to at least twice the lifetime of sessions in the emApp.
This is because a user may visit G2 and then continue to use the emApp but not visit
G2 pages.. a longer G2 session timeout will help ensure their session sticks around
until they do visit a G2 page again. Note that if the G2 session does timeout and
the user returns then a new session will be created with the correct user logged in.
Other data from the old session is lost but the user login is restored.

>> okay, but how to figure out what drupal's session lifetime is?

5) Test the integration
6) Once everything is working you can choose to disable direct access to G2 and only
allow access via the emApp. To do this set the embedOnly flag in your config.php.

so, what is the session lifetime of drupal? this drupal forum page http://drupal.org/node/41754 has this relevant (?) info:
"Your settings.php file should have a line like this:
ini_set('session.cookie_lifetime', 2000000);

PHP docs say:
session.cookie_lifetime integer
session.cookie_lifetime specifies the lifetime of the cookie in seconds which is sent to the browser. The value 0 means "until the browser is closed."

here is what is in my settings.php file
/**
* 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);

hmmm, if session.cookie_lifetime is in seconds, i think 2000000 evaluates to approx 3 weeks?

i wonder if there are settings elsewhere that might conflict with the settings in drupal's settings.php file.

 


( categories: )
Submitted by jillelaine on December 2, 2006 - 7:52am.

installed mplayer which seems to play 'more nice' with videos on gallery2.

Submitted by jillelaine on October 5, 2006 - 5:58am.

installed ffmpeg so we have a streaming media server!
root /# find / -name ffmpeg
/usr/local/bin/ffmpeg
/usr/local/include/ffmpeg
/usr/local/share/doc/ffmpeg
/usr/local/www/websites/hoodville/gallery2/modules/ffmpeg
/usr/local/www/websites/hoodville/gallery2/g2data/cache/module/ffmpeg

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.