Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Photo and video Gallery on the web
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
bhayes
n00b
n00b


Joined: 10 Dec 2003
Posts: 6
Location: Tokyo, Japan

PostPosted: Wed Jan 07, 2004 3:09 pm    Post subject: Photo and video Gallery on the web Reply with quote

In setting up my web server to host some photos and movies, I came across Gallery - which is an amazing sourceforge project.

Anyway, I spent some time getting it working - and here is a general how-to for anybody who wants to get it up and running:

It is easy to get... just 'emerge gallery' - it is in the portage tree.

It has a lot of dependancies... the most important being Apache and php - but even after that there are 10 or so imaging programs and the like.

If you have apache & php working, just emerge it - wait for it to finish, and it will have put a directory under your web server's htdocs called 'gallery'.

Go into that directory, and type './configure' - and then browse to "http://IpAddress/gallery/setup/" - and you can set it up.

Once you have finished the setup - type './secure' - and it will secure it and make it work, and from then on you can browse to "http://IpAddress/gallery/" and it will work. From there you can log in as admin and upload photos, create albums, etc.

3 things which were problems for me:
1) On the first page of setup it gives a mammoth error about not finding "configure" or "secure" scripts - ignore it;
2) When you are uploading photos using the "Add Photos" command (later on), if you try and upload more than 2 or 3 it will crash. Instead, SSH to your server and manually place your photos in a temp directory (eg. /tmp/photos/) and then choose option 2: supply a directory
3) In the setup phase it asks for the web address of your gallery. I used my http://bamboosoftware.dynalias.org/gallery/ address - if you use your local LAN address, when you open it up to the web it goes all bad.

Thats it. Cheers.
_________________
Love Life.
Back to top
View user's profile Send private message
zeky
Guru
Guru


Joined: 24 Feb 2003
Posts: 470
Location: Vukojebina, Europe

PostPosted: Wed Jan 07, 2004 3:26 pm    Post subject: Reply with quote

Nice. :wink:
_________________
Beat your dick like it owes you money
Back to top
View user's profile Send private message
RSay
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2003
Posts: 100
Location: Cleveland

PostPosted: Sun Jan 18, 2004 4:03 am    Post subject: Reply with quote

This worked great!

I love this guide because it is ridiculously simple.

I spent one weekend of my life trying to get this gallery running on my redhat machine. I went through dependency hell and then couldn't find recent enough versions of some packages to get things running. I called a friend of mine who knows powerful linux magic and asked for help. He spent two hours of his time building rpms from tar.gzs etc. It didn't work.

He had mentioned Gentoo to me and I said, "How hard would this be in Gentoo?" He spent ten minutes explaining portage to me and I hung up the phone and started installing Gentoo.

I love this distribution. It has taught me a lot about my computer and my gallery looks great. :D
Back to top
View user's profile Send private message
Krigare
Tux's lil' helper
Tux's lil' helper


Joined: 12 Nov 2003
Posts: 92
Location: ::1

PostPosted: Tue Jan 20, 2004 8:06 pm    Post subject: Reply with quote

RSay wrote:
I spent one weekend of my life trying to get this gallery running on my redhat machine. I went through dependency hell and then couldn't find recent enough versions of some packages to get things running.

heh.. exactly as me.. this is again probably why people use gentoo..
_________________
Together we are strong.
Back to top
View user's profile Send private message
tactless
l33t
l33t


Joined: 14 Jul 2002
Posts: 642
Location: Mitzpe Adi, Israel

PostPosted: Wed Jan 21, 2004 5:14 am    Post subject: Reply with quote

I've been using this gallery thing for a few weeks now... love it!
_________________
Tactless

"If it wasn't for fog, the world would run at a really crappy framerate."

Jabber: tactless@amessage.info
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Thu Jan 22, 2004 12:50 am    Post subject: Reply with quote

I just installed it, and it seems to be working, except for one thing.

I use Smoothwall 2.0 as my firewall. It blocks any "call-back" requests, as in, I can't access the website by going out, and coming back in (that I know of).

This means that I can't view my gallery from outside, or at least not easily.

Is there anyway around this (either through gallery, apache, smoothwall, or /etc/hosts)?
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Thu Jan 22, 2004 1:37 am    Post subject: Reply with quote

Erm, quick update.

I have the program working internally, sort of. But not outside of my LAN.

http://wolos.d2g.com:5190/gallery/albums.php

That should work, but it doesn't seem to work for me.

I think part of the problem may infact be my Smoothwall box, as it doesn't allow "IP Spoofing", so I can't see the gallery, or everyone else can't see the gallery. And my friend just confirmed this.

If there is a way to get around using the entire URL for gallery, that'd fix the problem, otherwise I'll have to go and figure out how to screw around with Smoothwall :-\.
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Thu Jan 22, 2004 3:06 am    Post subject: Reply with quote

I swear, this is it for the night...

I was looking through the Gallery docs, and I found a solution.

If you have a firewall like Smoothwall, that does "Anti-Spoofing", the way to fix this is very simple.

Open up ./gallery/config.php in your favorite editor.

Scroll down to the two URLs.

Change them to be relative, from http://www.example.com/gallery to /gallery (you should be able to figure the second one out as well ;)).

Just got it working, and confirmed with a friend, so it's all good :D.
Back to top
View user's profile Send private message
dstutz97
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2003
Posts: 80

PostPosted: Sat Feb 07, 2004 9:58 pm    Post subject: Reply with quote

Ian wrote:
I use Smoothwall 2.0 as my firewall. It blocks any "call-back" requests, as in, I can't access the website by going out, and coming back in (that I know of).

This means that I can't view my gallery from outside, or at least not easily.

Is there anyway around this (either through gallery, apache, smoothwall, or /etc/hosts)?


I've been using ipcop/smoothwall for a while. The way I got around this was adding an alias on my webserver and then adding the ip to /etc/hosts on the smoothwall box. On your gentoo server, edit /etc/conf.d/net and add another IP for your box in the aliases section. At this point running /etc/init.d/net.eth0 restart should hopefully bring up the alias...if not then just reboot. I'm not sure of how to do this.

Then on your smoothwall box add a line to the /etc/hosts with:
ip.you.just.added www.yourdomain.com

and reboot the router (supposedly dnsmasq is supposed to pick up these changes immediately, but it never works on the client-side for me...so reboot if you have to). When it comes back up you should be able to access your internal website via "www.yourdomain.com" and have it be hitting the internal lap IP. If you need more help, lemme know.

Dave
Back to top
View user's profile Send private message
Krigare
Tux's lil' helper
Tux's lil' helper


Joined: 12 Nov 2003
Posts: 92
Location: ::1

PostPosted: Sat Feb 21, 2004 6:34 pm    Post subject: Reply with quote

check out coppermine.sf.net
_________________
Together we are strong.
Back to top
View user's profile Send private message
rmbalfa
Apprentice
Apprentice


Joined: 15 Dec 2003
Posts: 200
Location: Illinois State University/Chicago

PostPosted: Tue Feb 24, 2004 8:23 am    Post subject: Reply with quote

I am still getting this error:

Code:

Fetching Urls...

Warning: parse_url(http:///home/ryan/my digital pictures/Gamma Phi/write-on_2004): Unable to parse url in /var/www/localhost/htdocs/gallery/save_photos.php on line 115
Could not open url: http:///home/ryan/my digital pictures/Gamma Phi/write-on_2004
Processing status...


The directory is: /home/ryan/my digital pictures/Gamma Phi/write-on_2004


I tried this page but it didn't help.
I dont even understand what it is doing.
Back to top
View user's profile Send private message
dstutz97
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2003
Posts: 80

PostPosted: Tue Feb 24, 2004 2:27 pm    Post subject: Reply with quote

rmbalfa wrote:

I tried this page but it didn't help.
I dont even understand what it is doing.


Well, It looks like you are getting that same error as the messages are similar and the parse error is happening on the exact same line of the source code. I might take a guess and ask if you are trying to upload a picture and it is greater than 500k? The gallery documentation says to change the mod_php.conf's LimitRequestBody directive to 0 effectively disabling the limit on uploaded file sizes. You can read up a little more about that directive here: http://httpd.apache.org/docs/mod/core.html#limitrequestbody

I'd suggest doing exactly what your linked Gallery help page suggests, change the # for LimitRequestBody to 0 for unlimited size or a reasonably high # that will work for your environment to allow for the uploading of pictures, movies and zip files containing pictures+movies.
Back to top
View user's profile Send private message
rmbalfa
Apprentice
Apprentice


Joined: 15 Dec 2003
Posts: 200
Location: Illinois State University/Chicago

PostPosted: Tue Feb 24, 2004 11:25 pm    Post subject: Reply with quote

Setting it to 0 did not work. II am running this my my own box right in front of me. I dont want the http://. Maybe that the problem?
Back to top
View user's profile Send private message
rmbalfa
Apprentice
Apprentice


Joined: 15 Dec 2003
Posts: 200
Location: Illinois State University/Chicago

PostPosted: Tue Feb 24, 2004 11:30 pm    Post subject: Reply with quote

This is the problem code:

Code:

      /* If the URI doesn't start with a scheme, prepend 'http://' */
      if (!fs_is_file($url)) {
         if (!ereg("^(http|ftp)", $url)) {
            $url = "http://$url";
         }

         /* Parse URL for name and file type */
         $url_stuff = parse_url($url);
         if (!isset($url_stuff["path"])) {
            $url_stuff["path"]="";
         }
         $name = basename($url_stuff["path"]);

      } else {
         $name = basename($url);


My URI doesn't start with a scheme, but I don't want one. Maybe thats the problem.
Back to top
View user's profile Send private message
dstutz97
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2003
Posts: 80

PostPosted: Wed Feb 25, 2004 5:31 am    Post subject: Reply with quote

Well....gallery is a php app that needs to run on the webserver so you're going to need the http://. I know there's a way to run php stuff standalone (hence php and mod_php packages in portage) but I have no idea if you can do that with gallery. It looks like you might have the paths setup wrong...I'd put it back into config mode and go through and check that stuff again...if all else fails check the gallery mailing list...they can probably give you better help than I.
Back to top
View user's profile Send private message
rmbalfa
Apprentice
Apprentice


Joined: 15 Dec 2003
Posts: 200
Location: Illinois State University/Chicago

PostPosted: Wed Feb 25, 2004 8:53 am    Post subject: Reply with quote

Yes, of course it needs a srever. But the files I am trying to upload are already on that server in my home directory so htto:// is not needed in fact it is wrong for my case. I would need a file:// scheme or something like that as I see it?

I hope that clarifies, it doesn't seem you understood my problem.
Back to top
View user's profile Send private message
Tun
n00b
n00b


Joined: 19 Jan 2004
Posts: 58
Location: Stockport, England

PostPosted: Fri Mar 05, 2004 2:42 pm    Post subject: Reply with quote

cheers for the tips bhayes. ive just emerged gallery and found this thread after forum searching because I wasnt 100% sure what was next. very useful.

interesting photo album too. i feel i must apolgise on behalf of drunken mancunian from new years :) liam gallagher has a lot to answer for. so many idiots from round here think the success of oasis gives them license to act like complete and utter fools (psuedorockstars). the odd gallagher wannabe is funny, most of em are beyond annoying, we're not all like that :)
Back to top
View user's profile Send private message
ultrasonic
n00b
n00b


Joined: 07 Mar 2004
Posts: 55

PostPosted: Fri Mar 12, 2004 7:26 pm    Post subject: Reply with quote

BTW about that configure/secure script "serious warning" (or was it critical?). The reason for that is because configure.sh and secure.sh turn out to be owned by root. You can easily fix it by chown apache scure.sh configure.sh and then su apache and run the configure/secure scripts. No errors or warnings then!
Back to top
View user's profile Send private message
joehni
Apprentice
Apprentice


Joined: 27 Jul 2003
Posts: 175

PostPosted: Thu Apr 01, 2004 6:22 pm    Post subject: Reply with quote

Just to mension another alternative: LinPHA also from sourceforge. Runs for me without major problems and was plain easy to install.

http://linpha.sf.net
Back to top
View user's profile Send private message
ice_cool
n00b
n00b


Joined: 13 Aug 2002
Posts: 42

PostPosted: Thu Apr 01, 2004 11:20 pm    Post subject: Reply with quote

One good alternative is also

app-misc/bins
Back to top
View user's profile Send private message
cortinez
n00b
n00b


Joined: 10 Feb 2004
Posts: 5
Location: San Antonio,Tx

PostPosted: Sun May 02, 2004 7:22 am    Post subject: need some help Reply with quote

1st i emerge apache, then emerged php_mod then last i emerged gallery.
when i went to the gallery directory and i did ./configure which made the site insecure then went to my browser and put my http://ipaddress/gallery/setup and it gave me a page could not be displayed. Do i need to do anything special to the apache2.conf or the DocumentRoot line in that conf file. Need some help thanx
Back to top
View user's profile Send private message
wizard69
Apprentice
Apprentice


Joined: 22 Sep 2003
Posts: 178
Location: Berlin

PostPosted: Sun May 02, 2004 2:43 pm    Post subject: Reply with quote

emerging right now thx for the tip should keep me out of mischief for a while
Back to top
View user's profile Send private message
cortinez
n00b
n00b


Joined: 10 Feb 2004
Posts: 5
Location: San Antonio,Tx

PostPosted: Mon May 03, 2004 4:58 am    Post subject: finally Reply with quote

Thanks hayes for the help got it up and running just trying to do some tweaks and getting some pics uploaded.
Back to top
View user's profile Send private message
wizard69
Apprentice
Apprentice


Joined: 22 Sep 2003
Posts: 178
Location: Berlin

PostPosted: Mon May 03, 2004 12:46 pm    Post subject: Reply with quote

Quote:
Change them to be relative, from http://www.example.com/gallery to /gallery (you should be able to figure the second one out as well ).


i changed the two urls to a relative directory so my config.php reads



Code:
$gallery->app->photoAlbumURL = "/gallery";
$gallery->app->albumDirURL = "/albums";


i can access the gallery from my lan and from the web but when i want to upload pictures from the lan with the admin frontend i allways get an error can't find url http:///gallery/gallery with three slashes which of course does not exist also the hostname ist missing
Back to top
View user's profile Send private message
lamekain
Guru
Guru


Joined: 25 Nov 2003
Posts: 331
Location: Helsinki, Finland

PostPosted: Tue Jan 11, 2005 10:08 pm    Post subject: Reply with quote

If you're installing gallery for Gentoo, remember to use webapp-config to do it the Gentoo way (tm). With webapp-config you can create multiple virtual installations. Webapp-config uses links, so that disk space is saved, and it takes care of you're configs and allows easier upgrading, etc.. for more info see man webapp-config

quick'n'dirty on my server:
Code:
emerge gallery
webapp-config -I -h localhost -d gallery -u USERNAME gallery 1.4.4_p4
cd /var/www/htdocs/gallery
touch /var/www/htdocs/gallery/.htaccess /var/www/htdocs/gallery/config.php
chown apache:apache /var/www/htdocs/gallery/.htaccess /var/www/htdocs/gallery/config.php


This installs gallery into localhost at /var/www/htdocs/gallery and gives USERNAME permissions to change the files. After this point your browser to http://yourserver.com/gallery/setup and proceed.

Note: If your www-document directory is not /var/www then edit /etc/vhosts/webapp-config.
_________________
"Only when the last tree has died, the last river been poisoned,
and the last fish been caught, will we realize we cannot eat money"

-Global Terrorism.org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum