Multiple Galleries

DavidBer

Joined: 2002-09-10
Posts: 3
Posted: Tue, 2002-09-10 06:50

Hello,

I am trying to run multiple galleries (i.e. foo.com, boo.com, xyz.net) on a single box. I have an install of 1.25 on this box and someone saw it, and of course, wants to have their own copy! (I can’t blame them!). So I did a 1.3.1 install, everything seemed fine, there was a safe mode issue, so I put in a httpd.conf setting per the faq, did the install, everything was running fine. They went and put in a bunch of images. Then they went back later in the day. They went to the main page, and was greeted with the config wizard! There was a safe mode restriction (script whose uid is 0 is not allowed to access ./config.php owned by uid 10036) then got a failed opening config.php. But this is the cool part! “gallery needs reconfiguration Your gallery configuration was created using the config wizard from an older version of Gallery. It is out of date.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2002-09-10 17:48

I admit, you've got me confused so let me see if I can sum up your problem. You've got two separate copies of Gallery, each with their own albums directory. Each of them is pointed to by a separate vhost configuration in Apache. The problem occasionally when you go to the main Gallery page you get a safe mode problem followed by a "can't open config.php" error?

The above sounds to me like your vhost configuration is incomplete and you're accessing the Gallery via a URL which triggers a different set of parameters in httpd.conf (like, "www.foo.com" and "foo.com" have different settings in httpd.conf)

 
DavidBer

Joined: 2002-09-10
Posts: 3
Posted: Tue, 2002-09-10 18:39
Quote:
I admit, you've got me confused so let me see if I can sum up your problem. You've got two separate copies of Gallery, each with their own albums directory. Each of them is pointed to by a separate vhost configuration in Apache. The problem occasionally when you go to the main Gallery page you get a safe mode problem followed by a "can't open config.php" error?

The above sounds to me like your vhost configuration is incomplete and you're accessing the Gallery via a URL which triggers a different set of parameters in httpd.conf (like, "www.foo.com" and "foo.com" have different settings in httpd.conf)

Yes, after sleeping, I feel better. You are correct. One box, multi domains.

cat vhost.conf
<Directory /usr/local/psa/home/vhosts/foo.com/httpdocs>
php_admin_value open_basedir /usr/local/psa/home/vhosts/foo.com/httpdocs
</Directory>
php_admin_value safe_mode off

that is the vhost for foo.com, and for abc.com, it's the same except the directory pointing.

Seeing that the foo.com was a 1.25 and working fine, I went ahead and nuked the abc.com completely. rm -rf'd the gallery and albums dir. I decided to start fresh, did a 1.3.1 install, went through the config. Everything was fine, secured the install and went into the gallery.

Now I get different error messages:
Warning: SAFE MODE Restriction in effect. The script whose uid is 0 is not allowed to access /usr/local/psa/home/vhosts/abc.com/httpdocs/members/albums/.users/userdb.dat owned by uid 2525 in /usr/local/psa/home/vhosts/abc.com/httpdocs/members/gallery/platform/fs_unix.php on line 53

Warning: fopen("/usr/local/psa/home/vhosts/abc.com/httpdocs/members/albums/.users/userdb.dat", "r") - Inappropriate ioctl for device in /usr/local/psa/home/vhosts/abc.com/httpdocs/members/gallery/platform/fs_unix.php on line 53

Fatal error: Call to undefined function: geteverybody() in /usr/local/psa/home/vhosts/abc.com/httpdocs/members/gallery/init.php on line 205

I guess I am completely confused as the first install worked beautifully (like the app!) and now this.... I didn't do anything different that I will admit (/duck)

dave

:roll: :roll: :roll:

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2002-09-11 02:37
Quote:
Warning: SAFE MODE Restriction in effect. The script whose uid is 0 is not allowed to access /usr/local/psa/home/vhosts/abc.com/httpdocs/members/albums/.users/userdb.dat owned by uid 2525 in /usr/local/psa/home/vhosts/abc.com/httpdocs/members/gallery/platform/fs_unix.php on line 53

I believe that this is purely an Apache/PHP configuration issue. PHP doesn't lie about Safe Mode, so something is causing your directive in vhost.conf not to get executed. Without debugging your entire setup, it's hard to tell exactly what is going wrong. One thing you can do is to copy setup/phpinfo.php into your gallery directory. Then any time you go to a URL that gives you an open_basedir or safe_mode error, edit the URL to go to phpinfo.php (instead of albums.php, view_album.php, etc) and look at what settings are actually active for PHP.

 
DavidBer

Joined: 2002-09-10
Posts: 3
Posted: Thu, 2002-09-12 01:03

Thanks very much!

It was a php safe mode error. The diags helped a lot!

Keep up the great work, we love this program!!!!

dave

 
hovercrew

Joined: 2002-09-26
Posts: 12
Posted: Thu, 2002-09-26 15:27

Hello folks,

Just a quick and dirty question about multiple installations of the "gallery" on the same host.

Currently I have a working copy of the gallery at "team-raptor.com/gallery/" with an album directory named "/albums". I use this inside a "frame.htm" page on my Windows Box at hovercrew.com. The user when at hovercrew, clicks on "gallery" it loads the "gallery" from the linux box (team-raptor.com). and displays the page within a frame page on the hovercrew page.

Would it be possiable to install another copy of the "gallery" on this same host say installed to "photogallery", and point the albums directory to "/photoalbums"? So in this example: "team-raptor.com/photogallery/" would be the second install of the "Gallery".

The owner of "team-raptor.com" wants his copy to run off of "team-raptor.com/photogallery/".

My buddy and I share the vhosted server account. After he viewed my install of "Gallery", he wants one!

Please advise, if this will work, and if any config problems will occur.

Thanks in Advance!

Jeff Galford

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2002-09-28 03:30

You can have as many galleries as you want installed on your server, as long as you put them in different directories and use different albums directories. The only gotcha is that the first time you run the config wizard for each new gallery it'll start with a default albums directory (and URL) that won't be the one that you want to use. If you pay close attention to what goes into page 2 of the config wizard you'll be ok. I myself have 5 galleries on the same vhost on my webserver.

 
cxms64

Joined: 2009-09-20
Posts: 1
Posted: Sun, 2009-09-20 00:46

Isn't there two ways to run multiple galleries?

1. Complete separate gallery installs
2. Having one main install and some sort of smaller installs for each gallery?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-09-20 03:43

7 years let a few days later.

1. yes.
2. G2 has multisite: http://codex.gallery2.org/Gallery2:Multisite

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team