Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: EdelingF on December 27, 2008, 12:33:52 PM
-
I've been trying to integrate Gallery2 into WordPress because of the great facilities it gives me, which no WordPress plugin can give me.
But I get the error file /opt/gallery2/embed.php is restricted by PHP open_basedir
I've been reading about open_basedir on this page http://wiki.contribs.org/PHP#Open_basedir_restriction (http://wiki.contribs.org/PHP#Open_basedir_restriction) but it doesnt make it understandable for me.
Since I'm not familiar with this and I certainly don't want to open my server for everybody, I was wondering if someone could tell me what I should do.
This is the code in the template 92gallery2:
# Gallery2
Alias /gallery2 /opt/gallery2/html
<Directory /opt/gallery2/html>
AddType application/x-httpd-php .php .php3 .phtml
php_admin_value open_basedir /opt/gallery2/html/:/opt/gallery2/g2data
Options None
Options +Includes
AllowOverride None
order deny,allow
deny from all
allow from all
</Directory>
<Directory /opt/gallery2/g2data>
SetHandler Gallery_Security_Do_Not_Remove
Options None
<IfModule mod_rewrite.c>
RewriteEngine off
</IfModule>
<IfModule mod_access.c>
order deny,allow
deny from all
</IfModule>
</Directory>
-
Try change from
php_admin_value open_basedir /opt/gallery2/html/:/opt/gallery2/g2data
to
php_admin_value open_basedir /opt/gallery2:/tmp
Of course, then expand-template and restart httpd-e-smith
At the future you can try http://wiki.contribs.org/SME_Site_Maker
-
Nope, that didn't do it. I still get:
file /opt/gallery2/embed.php is restricted by PHP open_basedir
-
Nope, that didn't do it. I still get:
file /opt/gallery2/embed.php is restricted by PHP open_basedir
You did expand your webserver configuration file and restart the webservice ith these commands?
expand-template /etc/httpd/conf/http.conf
sv t httpd-e-smith
-
In
/etc/e-smith/templates/etc/httpd/conf/httpd.conf
I changed in 92gallery2
php_admin_value open_basedir /opt/gallery2/html/:/opt/gallery2/g2data
to
php_admin_value open_basedir /opt/gallery2:/tmp
Then I did
expand-template /etc/httpd/conf/http.conf
sv t httpd-e-smith
Then I went back to WordPress and activated the plugin WPG2
The results are:
WPG2 Validation Check: Failed (Help)
1. Wordpress Compatible? - [ Success]
2. URI to Gallery2 Ok? - [Success]
3. Gallery2 can be located in G2 File Path? - [Failed]
On the second tab you can manually fill in the URL: http://www.domain.nl/gallery2/
The result of this is:
file /opt/gallery2/html/embed.php is restricted by PHP open_basedir
-
I jus found a HowTo from 2007:
http://wiki.contribs.org/WPG2_Plugin (http://wiki.contribs.org/WPG2_Plugin)
Which directs to:
http://forums.contribs.org/index.php?topic=38549.msg174775#msg174775 (http://forums.contribs.org/index.php?topic=38549.msg174775#msg174775)
Would this do the trick?
-
I jus found a HowTo from 2007:
http://wiki.contribs.org/WPG2_Plugin (http://wiki.contribs.org/WPG2_Plugin)
Which directs to:
http://forums.contribs.org/index.php?topic=38549.msg174775#msg174775 (http://forums.contribs.org/index.php?topic=38549.msg174775#msg174775)
Would this do the trick?
Perhaps as you need to adjust the PHP BaseDir setting for wordpress (in this case) as you are running into it's limits from the wordpress source dir.
When following suggested link be sure to not use the commands listed there to restart the webserver, they have changes in the mean time. Use the one in my earlier post.
-
It looks good, it did the trick I think
Just struggeling with some relative paths
Thank for your help