Koozali.org: home of the SME Server
Obsolete Releases => SME Server 8.x => Topic started by: mophilly on January 27, 2012, 06:27:03 PM
-
In migrating a client's web site to our system, I found a dependency on HTML_QuickForm, and by extension on PEAR. A quick search of the SME 8.0 beta installation shows PEAR is installed. With a quick amendment to the appropriate accounts db record the PEAR install tested successfully in the target iBay.
When I attempted to install the HTML_QuickForm package, the PEAR tool complained. The package needs PEAR v1.5.2 or higher. Version 1.4.9 is installed and it appears the current version of PEAR is v1.9.x.
I know nothing of PEAR, and use PHP only when I must. (buy me a beer and I will tell you why) So, before I apply known ignorance to the system, and possibly knocking it over, I thought posing a question to this forum would be wise.
Is PEAR a requirement of any stock SME 8 packages?
If yes, will updating PEAR undermine them?
If no one knows for sure, can someone suggest a reasonably efficient method for making the determination?
TIA
-
If you have a spare box, install SME on that, make the upgrade to PEAR and see what happens. Include any contribs you are running on your main system.
If it works, the main drawback is you would need to watch upgrades to make sure no PEAR (or PEAR related libraries) were upgraded (downgraded) to an intermediate version. Could be an ongoing problem which may be more trouble than it is worth.
Alternativly, you may be able to run a second server with CENTOS 6 (which should have the PEARL at a version you need (? not sure), put the new website on that and establish a redirection from the SME to the new box.
Can't help with the technical details since I have never done this - just trying to give you some ideas to play around with.
Cheers
Ian
-
Thanks, Ian. I appreciate the reply.
All good ideas, and added to the list of "what shall I do if..."
-
Here is a little bit of follow up in case anyone is interested.
* Adding a "custom" pear install, say for a specific iBay, will likely fail. I read several posts discussing how tightly coupled PEAR and PHP are, and the short answer is it would be a lot of work. There are globals and similar issues to address in the base php.
* Updating PEAR on my SME 8 system. This is a appealing except that, having searched the contribs.org bug system and similar over at centos, CentOS 5 includes PEAR 1.4.9 but nothing beyond. Thus, SME 8 is consistent with the CentOS 5 distro. (Martha Stewart would call that a good thing, I bet) An update may also be a lot of work.
So, until and unless some new info lands on my desk or I have time to experiment on a test box, I am letting this thread of inquiry rest.
-
So, until and unless some new info lands on my desk or I have time to experiment on a test box, I am letting this thread of inquiry rest.
Perhaps a local install of pear in your ibay might be an idea? See http://pear.php.net/manual/en/installation.shared.php
-
Perhaps a local install of pear in your ibay might be an idea? See http://pear.php.net/manual/en/installation.shared.php
Thank you, cactus. That is interesting. I had reviewed it earlier and found some other references to it that cast a shadow on the option. However, upon reading it again today, I will give it run through.
I suppose I need to modify the SME accounts db to include the path to the private pear directory in the phpBaseDir (sp?). Would that be correct?
-
I suppose I need to modify the SME accounts db to include the path to the private pear directory in the phpBaseDir (sp?). Would that be correct?
I would not do that and only enable it for ibays you need by using the include option specified in that page to enable the newer version of PEAR for the code in that ibay.
-
I would not do that and only enable it for ibays you need by using the include option specified in that page to enable the newer version of PEAR for the code in that ibay.
Right. Do you mean something similar to this:
db accounts setprop myIbay PHPBaseDir /home/e-smith/files/ibays/myIbay/pear/
-
Right. Do you mean something similar to this:
db accounts setprop myIbay PHPBaseDir /home/e-smith/files/ibays/myIbay/pear/
No, your PHP base dit is the jail in which you code lives, you should not need to change that if you install PEAR inside the ibay.
I mean this example:
<?php
ini_set('include_path', '~/pear/lib' . PATH_SEPARATOR
. ini_get('include_path'));
// From PHP 4.3.0 onward, you can use the following,
// which especially useful on shared hosts:
set_include_path('~/pear/lib' . PATH_SEPARATOR
. get_include_path());
?>
-
Great. :-)
Thank you for the clarification.