Koozali.org: home of the SME Server

PEAR update?

Offline mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
PEAR update?
« 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
- Mark

Offline idp_qbn

  • *****
  • 347
  • +0/-0
Re: PEAR update?
« Reply #1 on: January 27, 2012, 07:49:13 PM »
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
___________________
Sydney, NSW, Australia

Offline mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
Re: PEAR update?
« Reply #2 on: January 27, 2012, 07:55:55 PM »
Thanks, Ian. I appreciate the reply.

All good ideas, and added to the list of "what shall I do if..."
- Mark

Offline mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
Re: PEAR update?
« Reply #3 on: February 02, 2012, 11:52:59 PM »
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.
- Mark

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: PEAR update?
« Reply #4 on: February 03, 2012, 06:09:54 PM »
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
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 mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
Re: PEAR update?
« Reply #5 on: February 03, 2012, 06:18:50 PM »
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?
- Mark

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: PEAR update?
« Reply #6 on: February 03, 2012, 06:21:50 PM »
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.
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 mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
Re: PEAR update?
« Reply #7 on: February 03, 2012, 06:27:03 PM »
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:

Code: [Select]
db accounts setprop myIbay PHPBaseDir /home/e-smith/files/ibays/myIbay/pear/
- Mark

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: PEAR update?
« Reply #8 on: February 03, 2012, 06:29:43 PM »
Right. Do you mean something similar to this:

Code: [Select]
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:
Code: [Select]
<?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());
?>
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 mophilly

  • *
  • 384
  • +0/-0
    • Mophilly
Re: PEAR update?
« Reply #9 on: February 03, 2012, 06:56:34 PM »
Great.  :-)

Thank you for the clarification.
- Mark