Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: gixmo 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.
-
I made a directory in /home/e-smith/files/ibays/primary/gallery2
insead of
/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.
-
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.
-
I followed the tip of KingJim. I put the Gallery stuff in the Primary ibay in a subfolder and it works fine.
-
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
-
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!
-
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?
-
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.
-
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
-
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.
-
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 ?
-
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?
-
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.
-
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...
-
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.
-
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...
-
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 commandsignal-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.
-
Did you issue the commandsignal-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...
-
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:
db accounts show Primary
-
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:
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.
-
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
-
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.
-
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
-
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:
db accounts delprop Primary PHPBasedir
And after that modify the proper PHPBaseDir setting:
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.
-
That is easy, the database entries are case sensitive, so you first need to delete the newly added, wrong case version:
db accounts delprop Primary PHPBasedir
And after that modify the proper PHPBaseDir setting:
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?
-
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";
-
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
-
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:
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:
expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart
-
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:
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:
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
-
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:db show accounts ibayname
-
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:db show accounts ibayname
Thanx cactus, going to try this on a test server.
I will report in a couple of days.
-
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