Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: thyeum on October 02, 2006, 12:44:18 AM

Title: Wordpress + Gallery + WPG2 on SME 7
Post by: thyeum on October 02, 2006, 12:44:18 AM
Hi,

I've just installed WordPress 2.0.4 and Gallery 2.1.2 on a fresh install of SME Server 7.0

WordPress is in an ibay called 'blog' and Gallery is in an ibay called 'pics'

Everyting is running fine.

I installed the WPG2 plugin and activated it but I can't get it validated.

If I try the autoconfig mode I get 'file /home/e-smith/files/ibays/blog/pics/embed.php does not exist'
Which is true since it is in /home/e-smith/files/ibays/pics/html/embed.php

If I try the manual mode, filling it like this:

Gallery2 URL: http://www.thyeum.com/pics/main.php
URI to Gallery2 Embed Page (wp-gallery2.php): http://www.thyeum.com/blog/wp-gallery2.php
Gallery2 File Path: /home/e-smith/files/ibays/pics/html/
On Gallery Error Redirect to: http://www.thyeum.com/blog/

I get this error 'Please see "WPG2 Environment Status" below for reasons.'

And the WPG2 Environment Status are:
Gallery2 API located in G2 Path? Failed
G2Image located in TinyMCE plugins folder? Success
Gallery2 init? Skipped Due to Previous Error
Gallery2 Version Compatible? Skipped Due to Previous Error
Wordpress Version Compatible? Skipped Due to Previous Error
Gallery2 Module: ImageBlock Active? Skipped Due to Previous Error
Gallery2 Module: ImageFrame Active? Skipped Due to Previous Error
Gallery2 Module: Rewrite Active? Skipped Due to Previous Error
Gallery2 URL Rewrite Rules Updated? Skipped Due to Previous Error
Using Simple Header? Success
Using Simple Footer? Success


Does anybody have an idea, of how I could make this work?
Has anybody ever managed to have this plugin work on SME Server?
I am wondering if it's not a problem of ibays?

Thanks,

Mathieu
Title: Re: Wordpress + Gallery + WPG2 on SME 7
Post by: cactus on October 02, 2006, 09:56:03 AM
Quote from: "thyeum"
Hi,

I've just installed WordPress 2.0.4 and Gallery 2.1.2 on a fresh install of SME Server 7.0

WordPress is in an ibay called 'blog' and Gallery is in an ibay called 'pics'
It is preferred not to install in ibays as this will imit the options to configure everything. Normally you will install this kind of stuff in /var/www for instance and then create your own configuration templates in the templates folder for httpd.

Quote from: "thyeum"
I installed the WPG2 plugin and activated it but I can't get it validated.

If I try the autoconfig mode I get 'file /home/e-smith/files/ibays/blog/pics/embed.php does not exist'
Which is true since it is in /home/e-smith/files/ibays/pics/html/embed.php

If I try the manual mode, filling it like this:

Gallery2 URL: http://www.thyeum.com/pics/main.php
URI to Gallery2 Embed Page (wp-gallery2.php): http://www.thyeum.com/blog/wp-gallery2.php
Gallery2 File Path: /home/e-smith/files/ibays/pics/html/
On Gallery Error Redirect to: http://www.thyeum.com/blog/

I get this error 'Please see "WPG2 Environment Status" below for reasons.'

And the WPG2 Environment Status are:
Gallery2 API located in G2 Path? Failed
G2Image located in TinyMCE plugins folder? Success
Gallery2 init? Skipped Due to Previous Error
Gallery2 Version Compatible? Skipped Due to Previous Error
Wordpress Version Compatible? Skipped Due to Previous Error
Gallery2 Module: ImageBlock Active? Skipped Due to Previous Error
Gallery2 Module: ImageFrame Active? Skipped Due to Previous Error
Gallery2 Module: Rewrite Active? Skipped Due to Previous Error
Gallery2 URL Rewrite Rules Updated? Skipped Due to Previous Error
Using Simple Header? Success
Using Simple Footer? Success


Does anybody have an idea, of how I could make this work?
Has anybody ever managed to have this plugin work on SME Server?
I am wondering if it's not a problem of ibays?

It will probably help if you allow php to see one ibay from the other by modifying the PHPBaseDir property in the condiguration database. SME Server is configured that from one ibay you cannot see or execute code in an other ibay, this is a security issue.

To view the current setting:
Code: [Select]
db accounts show ibayname
Code: [Select]
db accounts ibay-name setprop PHPBaseDir oldvalue[b]:/path/to/other/ibay/mane/folder[/b]
Expand the httpd template to reflect configuration changes:
Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
And restart httpd for the changes to take effect
Code: [Select]
/etc/rc7.d/S86httpd-e-smith sigusr1
Another option of course is to install gallery in a subfolder of the blog ibay, this way you won't have anything to do with security restrictions like the PHPBaseDir restriction.
Title: Wordpress + Gallery + WPG2 on SME 7
Post by: thyeum on October 02, 2006, 03:08:15 PM
Hi Cactus,

Thanks for your answer.

I am kind of new to all this, so I have a couple questions.

First of all, which option do you think would be the best? Considering security, structure and ease of use.

In your first option, you tell me to install it in /var/www
I'm not sure I understand how this would work since http://www.thyeum.com points to /home/e-smith/files/ibays/Primary/html
Is it the configuration templates you talk about that would make this work?
How exactly do you do that?

I understand the second option consists of creating a breach in the security of SME. How bad is it to do this?

Finally, your third suggestion seems the easiest to do (no command line, at which I'm not very good...). How about creating an ibay called website and in there creating two ibays, one called blog, and one called pics. Would that work too, or does it absolutely have to be pics ibay inside blog ibay?

Thanks a lot for your answers,

Mathieu
Title: Wordpress + Gallery + WPG2 on SME 7
Post by: cactus on October 02, 2006, 07:28:35 PM
Quote from: "thyeum"
Hi Cactus,

Thanks for your answer.
You are welcome.
Quote from: "thyeum"
I am kind of new to all this, so I have a couple questions.
We all started there so no worries. :-D
Quote from: "thyeum"
First of all, which option do you think would be the best? Considering security, structure and ease of use.
IMHO opinion it is the best to create new entries instead of installing it in ibays, however the latter is by far the easiest and probably the best for you as you stated earlier.
Quote from: "thyeum"
In your first option, you tell me to install it in /var/www
I'm not sure I understand how this would work since http://www.thyeum.com points to /home/e-smith/files/ibays/Primary/html
Is it the configuration templates you talk about that would make this work?
How exactly do you do that?
If you find thge time and have a interest for it you might want to read up on the SME Server development guide and maybe a bit on configuring apache/httpd as well.

Quote from: "thyeum"
I understand the second option consists of creating a breach in the security of SME. How bad is it to do this?
If you know what you are doing and who is accessing  your system it is not that bad... it merely resticts php (or users with access to the folder who place nasty bad php code to be executed) from executinmg code outside it's scope (and therefore limits the risk of harm to your system). It is not totally save as there are more interpretated langauges that can be ran to do stuff like that on SME Server (for instance perl, wihich is not affected by this restriction.

Quote from: "thyeum"
Finally, your third suggestion seems the easiest to do (no command line, at which I'm not very good...). How about creating an ibay called website and in there creating two ibays, one called blog, and one called pics. Would that work too, or does it absolutely have to be pics ibay inside blog ibay?

I would go with this option as it is by far the easiest for you. However I would go on a slightly different aproach as long as you have no other site running in your Primary ibay folder I would place my blog software there (in the html directory). To install gallery as well I would create a subdirectory pics or whatever you want to call it and install gallery in there. If it is possible (as adviced by the gallery installation) place the directory that will hold the gallery data outside the scope of your browser. Therefore don't place it in the html folder or it's subfolders. Best is to place it in the files directory as this should at least be readable by the www process (if I remember correctly, if not we are again having to modify the PHPBaseDir setting :-) )
Title: Wordpress + Gallery + WPG2 on SME 7
Post by: thyeum on October 02, 2006, 10:47:01 PM
Thanks again for helping me out on this one.

I think that given the time that I have, I am going to go with the third option, and eventually I'll try reading a bit about the SME Server development guide.

I have one last question before I start everything:

can I just move the current directories that are in the 'blog' and 'pics' ibays in the primary ibay using something like winscp, or should I do a complete reinstallation of everything?
I should have the time to do the complete reinstallation, so if you think it would be better, just let me know.

Thanks,

Mathieu