Koozali.org: home of the SME Server

how can i integrate gallery2 into joomla

Offline gixmo

  • ***
  • 63
  • +0/-0
    • http://www.gixmo.nl
how can i integrate gallery2 into joomla
« on: December 02, 2006, 07:59:29 PM »
I've installed gallery2 in an ibay 'gallery2' and joomla into the primary ibay.
After i installed the gallery2-joomla bridge into joomla and in the gallery component setup in joomla i filled the question 'Full Server Path to G2:' with '' /home/e-smith/files/ibays/gallery2/html' . From there it goes wrong.
Joomla won't accept that full path. I've tried different paths but nothing is accepted.
I think the problem is that both are in different i-bays, but i'm not sure.

Does anyone have any experience with the gallery2 integration in joomla on SME 7 server? How did you fix this problem?

Any help will be appreciated.

Offline kingjm

  • ***
  • 55
  • +0/-0
    • www.iking.ca
how can i integrate gallery2 into joomla
« Reply #1 on: December 02, 2006, 10:57:17 PM »
I made a directory in /home/e-smith/files/ibays/primary/gallery2

insead of
Quote
/home/e-smith/files/ibays/gallery2/html'


Then when I installed the bridge it worked for me I had problems with permissions when I tried to do the same thing that you are.

Drupal has some better modules for galleries but more configuration and html is needed for drupal sites.

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
how can i integrate gallery2 into joomla
« Reply #2 on: December 03, 2006, 04:38:28 AM »
I'm also using the bridge with gallery and joomla in different ibays.
This was an upgrade from gallery 1 running on SME6 that now resides on SME7. I used the joomla contrib from Dungog's and gallery 1 came from Knuddy.
Not that this answer your question, but at least you know that can be done (and I had no hard time doing it).
Be carefull not to chmod entire folders when only subfolders are required.

Offline gixmo

  • ***
  • 63
  • +0/-0
    • http://www.gixmo.nl
how can i integrate gallery2 into joomla
« Reply #3 on: December 03, 2006, 02:50:28 PM »
I followed the tip of KingJim. I put the Gallery stuff in the Primary ibay in a subfolder and it works fine.

Offline si_blakely

  • *
  • 57
  • +0/-0
how can i integrate gallery2 into joomla
« Reply #4 on: December 07, 2006, 03:43:05 PM »
You need to modify the php BaseDir setting for the ibay (or in the template). This restricts the php interpreter/webserver to specific directories. You also need to add any directories you want to read files from.

I set up Joomla (/opt/joomla), added gallery2 into a subdir (/opt/joomla/gallery2), then modified the /etc/httpd/conf/httpd.conf fragment to include a basedir directive giving access to /ibays/photos/files, so I can directly import photos (via symlink to full res versions) into Gallery2.

It all works a charm - if you have an ibay you can add basedir entries via the e-smith db as well - I just can't quite remember the syntax at the moment.

Si

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #5 on: August 20, 2007, 08:52:04 PM »
You need to modify the php BaseDir setting for the ibay (or in the template). This restricts the php interpreter/webserver to specific directories. You also need to add any directories you want to read files from.

I set up Joomla (/opt/joomla), added gallery2 into a subdir (/opt/joomla/gallery2), then modified the /etc/httpd/conf/httpd.conf fragment to include a basedir directive giving access to /ibays/photos/files, so I can directly import photos (via symlink to full res versions) into Gallery2.

It all works a charm - if you have an ibay you can add basedir entries via the e-smith db as well - I just can't quite remember the syntax at the moment.

Si

Hi,
I am also trying to embed gallery into joomla with the gallery2bridge component. I installed joomla in opt and gallery as wel ( /opt/joomla ; /opt/gallery2 ). When i try to fill in the URL To Gallery 2 in joomla, I get the following error:
file /opt/gallery2/html/embed.php is restricted by PHP open_basedir
I don't know exactly what I have to do. Can someone help me?

Thanx!

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #6 on: August 20, 2007, 11:19:34 PM »
I found something in the wiki, http://wiki.contribs.org/PHP_Open_basedir_restriction , but I am not sure how to use this with the 2 applications installed in /opt

Someone an idea?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: how can i integrate gallery2 into joomla
« Reply #7 on: August 20, 2007, 11:27:33 PM »
I found something in the wiki, http://wiki.contribs.org/PHP_Open_basedir_restriction , but I am not sure how to use this with the 2 applications installed in /opt

Someone an idea?
Yes,it is not that hard.You have to modify your website ibay from which you want to access the general code base for your gallery2 installation.

So you possibly need to add the /opt/gallery2 path to your PHPBaseDir setting of the ibay that is holding your website and your gallery.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #8 on: August 20, 2007, 11:38:38 PM »
Yes,it is not that hard.You have to modify your website ibay from which you want to access the general code base for your gallery2 installation.

So you possibly need to add the /opt/gallery2 path to your PHPBaseDir setting of the ibay that is holding your website and your gallery.

Thanx for your reply, but the problem is that my main website is my joomla application which is stored in /opt and not in an ibay... So i am searching for a way to change the phpbasedir setting for /opt/joomla

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: how can i integrate gallery2 into joomla
« Reply #9 on: August 21, 2007, 08:55:41 AM »
Thanx for your reply, but the problem is that my main website is my joomla application which is stored in /opt and not in an ibay... So i am searching for a way to change the phpbasedir setting for /opt/joomla
It does not matter where your website is located on your harddisk, what matters is the configuration directive in the configuration file of the apache server.
You probably defined a location there for your primary website. In that configuration part you need to add a value defining the php_admin_value to override/define the PHP basedir setting.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #10 on: August 21, 2007, 09:39:32 AM »
It does not matter where your website is located on your harddisk, what matters is the configuration directive in the configuration file of the apache server.
You probably defined a location there for your primary website. In that configuration part you need to add a value defining the php_admin_value to override/define the PHP basedir setting.

I tried the commands as defined in the wiki.
When I paste at command line the following:

db accounts getprop Primary PHPBaseDir

nothing shows up.

When I try:

db accounts show Primary

there is no PHPBaseDir entry anymore. Did this change since 7.2 ?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: how can i integrate gallery2 into joomla
« Reply #11 on: August 21, 2007, 10:03:11 AM »
I tried the commands as defined in the wiki.
When I paste at command line the following:

db accounts getprop Primary PHPBaseDir

nothing shows up.

When I try:

db accounts show Primary

there is no PHPBaseDir entry anymore. Did this change since 7.2 ?
Not that I know of, did you enable the execution of SSI, like PHP and CGI scripts in the server-manager?
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #12 on: August 21, 2007, 10:37:03 AM »
Not that I know of, did you enable the execution of SSI, like PHP and CGI scripts in the server-manager?

As far as I know is PHP, CGI enabled at default for the primary ibay.

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #13 on: August 21, 2007, 11:13:15 AM »
I tried the commands as defined in the wiki.
When I paste at command line the following:

db accounts getprop Primary PHPBaseDir

nothing shows up.

When I try:

db accounts show Primary

there is no PHPBaseDir entry anymore. Did this change since 7.2 ?

Tried the same on another server, same issue's. No PHPBasedir entry. And I am sure php is enabled...

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: how can i integrate gallery2 into joomla
« Reply #14 on: August 21, 2007, 11:43:47 AM »
Tried the same on another server, same issue's. No PHPBasedir entry. And I am sure php is enabled...
It's not about PHP being enabled, it is the configuration directive allowing executable content in the ibay, which defines if a PHPBaseDir is set.

If it is not set automatically (which should be done after allowing executable content) AFAIK, you can set it manually, be sure to also include the path to the ibay itself, at least the html folder should be present.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #15 on: August 21, 2007, 12:23:13 PM »
It's not about PHP being enabled, it is the configuration directive allowing executable content in the ibay, which defines if a PHPBaseDir is set.

If it is not set automatically (which should be done after allowing executable content) AFAIK, you can set it manually, be sure to also include the path to the ibay itself, at least the html folder should be present.

I tried:
db accounts setprop PHPBasedir Primary /home/e-smith/files/ibays/Primary/html/:/opt/gallery2/

But that doesn't solve the problem...

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: how can i integrate gallery2 into joomla
« Reply #16 on: August 21, 2007, 12:29:11 PM »
I tried:
db accounts setprop PHPBasedir Primary /home/e-smith/files/ibays/Primary/html/:/opt/gallery2/

But that doesn't solve the problem...
Did you issue the command
Code: [Select]
signal-event ibay-modify Primary after changing the values?
If so please proof that the value is entered in the configuration directive in the httpd.conf file by looking for it in the /etc/httpd/conf/httpd.conf file.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #17 on: August 21, 2007, 12:47:07 PM »
Did you issue the command
Code: [Select]
signal-event ibay-modify Primary after changing the values?
If so please proof that the value is entered in the configuration directive in the httpd.conf file by looking for it in the /etc/httpd/conf/httpd.conf file.

I did use the command, but I cannot find the value back in the config file. Sorry for bothering you but I don't know what I am doing wrong and what I should do...

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: how can i integrate gallery2 into joomla
« Reply #18 on: August 21, 2007, 12:53:28 PM »
I did use the command, but I cannot find the value back in the config file. Sorry for bothering you but I don't know what I am doing wrong and what I should do...
Like said before: first enable the ibay to allow to execute PHP and CGI scripts, by modifying the ibay settings accordingly. My guess is that is still set to disabled. What is the output from this command:
Code: [Select]
db accounts show Primary
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #19 on: August 21, 2007, 02:08:44 PM »
Like said before: first enable the ibay to allow to execute PHP and CGI scripts, by modifying the ibay settings accordingly. My guess is that is still set to disabled. What is the output from this command:
Code: [Select]
db accounts show Primary


Primary=ibay
    CgiBin=enabled
    Group=shared
    Modifiable=no
    Name=Primary i-bay
    PasswordSet=no
    Passwordable=no
    PublicAccess=global
    Removable=no
    UserAccess=wr-admin-rd-group

That's what i get.

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: how can i integrate gallery2 into joomla
« Reply #20 on: August 21, 2007, 03:45:27 PM »
I tried:
db accounts setprop PHPBasedir Primary /home/e-smith/files/ibays/Primary/html/:/opt/gallery2/

But that doesn't solve the problem...
Looking back i see waht you have doen wrong I guess, you should have added:

db accounts setprop Primary PHPBasedir /home/e-smith/files/ibays/Primary/html/:/opt/gallery2/

in other words you have to switch the property and the key in your original command.

You can delete the result of the other one like this;

db accounts delete PHPBasedir
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #21 on: August 21, 2007, 04:21:11 PM »
Looking back i see waht you have doen wrong I guess, you should have added:

db accounts setprop Primary PHPBasedir /home/e-smith/files/ibays/Primary/html/:/opt/gallery2/

in other words you have to switch the property and the key in your original command.

You can delete the result of the other one like this;

db accounts delete PHPBasedir

Thnx, that's indeed what went wrong:

Primary=ibay
    CgiBin=enabled
    Group=shared
    Modifiable=no
    Name=Primary i-bay
    PHPBasedir=/home/e-smith/files/ibays/Primary/html/:/opt/gallery2/
    PasswordSet=no
    Passwordable=no
    PublicAccess=global
    Removable=no
    UserAccess=wr-admin-rd-group

is now the output of db accounts show Primary

The only thing is, I still get the file /opt/gallery2/html/embed.php is restricted by PHP open_basedir error.
« Last Edit: August 21, 2007, 04:24:34 PM by skydivers »

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #22 on: September 15, 2007, 01:36:54 PM »
I'm still having problems on this. I tried to add another PHPBaseDir but now when I type:

db accounts show Primary

it shows

Primary=ibay
    CgiBin=enabled
    Group=shared
    Modifiable=no
    Name=Primary i-bay
    PHPBaseDir=/opt/joomla/:/tmp
    PHPBasedir=/home/e-smith/files/ibays/Primary/html/:/opt/gallery2/
    PasswordSet=no
    Passwordable=no
    PublicAccess=global
    Removable=no
    UserAccess=wr-admin-rd-group

I want to delete one PHPBaseDir, how can i solve that?

Thanx

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: how can i integrate gallery2 into joomla
« Reply #23 on: September 15, 2007, 04:52:14 PM »
    PHPBaseDir=/opt/joomla/:/tmp
    PHPBasedir=/home/e-smith/files/ibays/Primary/html/:/opt/gallery2/
I want to delete one PHPBaseDir, how can i solve that?
That is easy, the database entries are case sensitive, so you first need to delete the newly added, wrong case version:
Code: [Select]
db accounts delprop Primary PHPBasedirAnd after that modify the proper PHPBaseDir setting:
Code: [Select]
db accounts setprop Primary PHPBasedir /home/e-smith/files/ibays/Primary/html/:/opt/gallery2/:/opt/joomla/BTW adding /tmp is a bad thing to do , it can harm the security of your system.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #24 on: September 17, 2007, 04:40:52 PM »
That is easy, the database entries are case sensitive, so you first need to delete the newly added, wrong case version:
Code: [Select]
db accounts delprop Primary PHPBasedirAnd after that modify the proper PHPBaseDir setting:
Code: [Select]
db accounts setprop Primary PHPBasedir /home/e-smith/files/ibays/Primary/html/:/opt/gallery2/:/opt/joomla/BTW adding /tmp is a bad thing to do , it can harm the security of your system.

Cactus, thanx for your fast reply.

I deleted the PHPBasedir entries. (I didn't know it was case sensitive)

I changed it to what you described above but i still get the PHPBasedir restriction in joomla...

Any ideas?

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Re: how can i integrate gallery2 into joomla
« Reply #25 on: September 17, 2007, 04:50:24 PM »
if you are using the dungog rpm
joomla has a php open_basedir in it's fragment, which overrides anything else
edit it

/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92joomla

      $OUT .= "    php_admin_value open_basedir /opt/joomla:/tmp\n";

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #26 on: September 17, 2007, 06:52:51 PM »
if you are using the dungog rpm
joomla has a php open_basedir in it's fragment, which overrides anything else
edit it

/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92joomla

      $OUT .= "    php_admin_value open_basedir /opt/joomla:/tmp\n";


I am using the dungog rpm. Changed the above but still get the:

file /opt/gallery2/html/embed.php is restricted by PHP open_basedir

error

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: how can i integrate gallery2 into joomla
« Reply #27 on: September 17, 2007, 09:53:09 PM »
I am using the dungog rpm. Changed the above but still get the:

file /opt/gallery2/html/embed.php is restricted by PHP open_basedir

error
What file is trying to access the files in the /opt/gallery folder and from what file on your system? You need to add the path of the folder where the script is located to the gallery PHPBaseDir setting, e. g. if you want to access a script in /opt/gallery from your Primary ibay you need to add /home/e-smith/files/ibays/Primary/html/ to your PHPBaseDir setting of the gallery share. Don't forget to restart your webserver to reflect configuration changes :-)

As the configuration file for the /opt/gallery location is templated you need to make a copy of the template and modify this copy to reflect your desired changes:
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cp /etc/e-smith/templates/etc/httpd/conf/httpd.conf/92joomla /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
Edit the newly created section with your favourite editor and save the changes:
Regenerate your configuration file and restart the webserver:
Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #28 on: September 18, 2007, 11:41:27 AM »
What file is trying to access the files in the /opt/gallery folder and from what file on your system? You need to add the path of the folder where the script is located to the gallery PHPBaseDir setting, e. g. if you want to access a script in /opt/gallery from your Primary ibay you need to add /home/e-smith/files/ibays/Primary/html/ to your PHPBaseDir setting of the gallery share. Don't forget to restart your webserver to reflect configuration changes :-)

As the configuration file for the /opt/gallery location is templated you need to make a copy of the template and modify this copy to reflect your desired changes:
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cp /etc/e-smith/templates/etc/httpd/conf/httpd.conf/92joomla /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
Edit the newly created section with your favourite editor and save the changes:
Regenerate your configuration file and restart the webserver:
Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart

Cactus,
if I understand this correct I have to change the PHPBasedir setting of gallery2 (installed in /opt/gallery2) .
So in my case I should add /opt/joomla as PHPBaseDir setting (is it PHPBasedir of PHPBaseDir?) for gallery2 ?

I have to do this with the custom template? So I should template gallery2 (instead of joomla like you said above)

Thanx

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: how can i integrate gallery2 into joomla
« Reply #29 on: September 18, 2007, 01:02:31 PM »
Cactus,
if I understand this correct I have to change the PHPBasedir setting of gallery2 (installed in /opt/gallery2) .
So in my case I should add /opt/joomla as PHPBaseDir setting (is it PHPBasedir of PHPBaseDir?) for gallery2 ?

I have to do this with the custom template? So I should template gallery2 (instead of joomla like you said above)

Thanx
Yep, that is correct. From memory it is PHPBaseDir, but you easily proof this by looking at the original template fragment doing a command like this:
Code: [Select]
db show accounts ibayname
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #30 on: September 19, 2007, 11:28:04 AM »
Yep, that is correct. From memory it is PHPBaseDir, but you easily proof this by looking at the original template fragment doing a command like this:
Code: [Select]
db show accounts ibayname

Thanx cactus, going to try this on a test server.

I will report in a couple of days.

Offline skydivers

  • *
  • 178
  • +0/-0
Re: how can i integrate gallery2 into joomla
« Reply #31 on: September 20, 2007, 11:27:04 AM »
Finally I managed to do the job  :)

This is what I did:

mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cp /etc/e-smith/templates/etc/httpd/conf/httpd.conf/92joomla /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/

pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/92joomla

and changed:

$OUT .= "    php_admin_value open_basedir /opt/joomla\n";

to:

$OUT .= "    php_admin_value open_basedir /opt/joomla:/opt/gallery2\n";

Followed by:

expand-template etc/httpd/conf/httpd.conf

/etc/rc7.d/S86httpd-e-smith restart

Also thanx to thomasch who managed this with wordpress and gallery2
« Last Edit: September 20, 2007, 11:29:16 AM by skydivers »