Koozali.org formerly Contribs.org

"pear" commands return HTTP/1.1 410 Gone error

"pear" commands return HTTP/1.1 410 Gone error
« on: March 24, 2008, 01:59:52 PM »
I have a very recent fresh installation of SME Server 7.3. I'm trying to install the pear package HTML_QuickForm. Whatever pear command I use that requires remote access to pear.php.net returns an error message

"Didn't receive 200 OK from remote server. (HTTP/1.1 410 Gone)"

I have tried running the pear command (as root) after changing to the /usr/share/pear directory, and also from root's home directory (/root), but get the same in both case.

Some research on the Internet said that it might be because pear wasn't configured with the right http_proxy setting (it was blank), so I tried disabling the HTTP proxy server in the Server-manager, and even rebooted after that, but I still have the problem.

Apache and PHP are working fine. The PHP include_path is set to

     .:/usr/share/pear

if that is relevant.

I can't find anything else relevant searching the Internet, the pear.php.net website, and the contribs.org website.

Can anyone please point me in the right direction for a possible solution?

Thanks if you can help.

John McC

PS. In case it might help the diagnosis, I append below the output of the pear config-show command. I haven't knowing changed any of the default settings.

Configuration:
==============
PEAR executables directory     bin_dir         /usr/bin
PEAR documentation directory   doc_dir         /usr/share/pear/doc
PHP extension directory        ext_dir         /usr/lib/php4
PEAR directory                 php_dir         /usr/share/pear
PEAR Installer cache directory cache_dir       /tmp/pear/cache
PEAR data directory            data_dir        /usr/share/pear/data
PHP CLI/CGI binary             php_bin         /usr/bin/php
PEAR test directory            test_dir        /usr/share/pear/test
Cache TimeToLive               cache_ttl       3600
Preferred Package State        preferred_state stable
Unix file mask                 umask           22
Debug Log Level                verbose         1
HTTP Proxy Server Address      http_proxy      <not set>
PEAR server                    master_server   pear.php.net
PEAR password (for             password        <not set>
maintainers)
Signature Handling Program     sig_bin         /usr/bin/gpg
Signature Key Directory        sig_keydir      /etc/pearkeys
Signature Key Id               sig_keyid       <not set>
Package Signature Type         sig_type        gpg
PEAR username (for             username        <not set>
maintainers)

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: "pear" commands return HTTP/1.1 410 Gone error
« Reply #1 on: March 24, 2008, 03:41:29 PM »
I have a very recent fresh installation of SME Server 7.3. I'm trying to install the pear package HTML_QuickForm. Whatever pear command I use that requires remote access to pear.php.net returns an error message
Even on recent versions of SME Server PEAR is outdated, you can try the commands from the pear website (they should work), otherwise you need to manually download stuff and extract it in the PEAR directory I guess. I do not know if this might brake webmail or other stuff as I believe they might depend on PEAR.
« Last Edit: March 24, 2008, 03:44:29 PM by cactus »
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 cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: "pear" commands return HTTP/1.1 410 Gone error
« Reply #2 on: March 24, 2008, 04:01:49 PM »
I filed a bug for an upgrade of PEAR against the redhat bugtracker a few months ago alrady but they do not think it such a high priority I guess. As soon as Redhat pushes the new version, CentOS and thus SME Server will have the newer version of PEAR implemented automatically (as they are based on RedHat).
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)

Re: "pear" commands return HTTP/1.1 410 Gone error
« Reply #3 on: March 24, 2008, 04:31:54 PM »
Thank you for clarifying that.

Since posting, I eventually found some further information on the pear.php.net site that hadn't turned up in previous searches, saying that versions of PEAR older than 1.4-something would no longer be able to access the former repositories, as they have changed format (since 1 Jan 2008) and the old format files have been removed. And the instructions to upgrade didn't work for me, probably because I'm cut off from access to the format that PEAR on SME Server uses.

I have tried (misguidedly, I now see) deleting the original installed files in /usr/share/pear and doing a fresh install into folders into a Primary/php directory (not html). The PEAR web installer just WOULD NOT allow me to write to the /usr/share/pear folder, even after I had changed the permissions to 777 as recommended. I had also tried changing the owner to www:www - but that didn't work either.

Anything on the server that depends on the original PEAR being present may not now work - so far, I haven't found what, but I'm hoping it doesn't matter as I'm only using it as a web server, not for email.

Is there a simple way to get the original PEAR files back? I REALLY don't want to have to do a complete fresh install to reinstate them, and I don't have another SME Server v7.3 to copy them from, just a v6.0.1-01 that this new server is designed to replace.

I've installed the current version of PEAR, but it isn't quite right yet either, probably because some install parameter or permission or fileowner is prevent webserver access. The installer wants a $php_dir value, which apparently isn't set on SME Server, or if it is, the installer isn't picking it up. And it doesn't tell you what it means, either, so I've had to guess. Is it the path to the binary executable php for CGI?

Anyway, I'll plug away at getting it to work, somehow, in the new form. Enough of it was working to be able to use the web-based package installer to get and install the HTML_QuickForm package, but I can't get a web page to use it yet.

Thanks again for taking the trouble to respond.

I much appreciate all the work the developers put into SME Server - it's been a really robust server for over six years in v5 and v6 that we've been using up to now. But it is a pity that so much of it depends on adapting existing stable versions of other distros (now CentOS) that the cumulative delays mean that even the latest version of SME Server is using currently obsolete and no-longer supported versions of (among other things) PHP, MySQL, and PEAR. Pity, because there are a few things I would like to use PHP 5 for, but it is definitely NOT recommended to try to upgrade to it, as other things break. And I don't want to go the CGI route, which is apparently possible.

John McC

Re: "pear" commands return HTTP/1.1 410 Gone error
« Reply #4 on: March 24, 2008, 04:45:35 PM »
Just a quick note about a further quirk between SME Server v6 and v7.

Our v6 server has PEAR v1.4.2.

The supposedly 'Later' version 7.3 has only v1.3.2.

The v6 server hasn't recently had any updates. The v7.3 is updated frequently.

John

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: "pear" commands return HTTP/1.1 410 Gone error
« Reply #5 on: March 24, 2008, 05:58:20 PM »
Thank you for clarifying that.

Since posting, I eventually found some further information on the pear.php.net site that hadn't turned up in previous searches, saying that versions of PEAR older than 1.4-something would no longer be able to access the former repositories, as they have changed format (since 1 Jan 2008) and the old format files have been removed. And the instructions to upgrade didn't work for me, probably because I'm cut off from access to the format that PEAR on SME Server uses.
I tested it on my test stock SME 7.3 test server and it upgrades perfectly with the commands from the pear website.

Is there a simple way to get the original PEAR files back? I REALLY don't want to have to do a complete fresh install to reinstate them, and I don't have another SME Server v7.3 to copy them from, just a v6.0.1-01 that this new server is designed to replace.
I guess there might be a way. First check if your server still thinks packages are installed (and generate a list of packages installed, make a note of them as you will need this list to re-install them later):

Code: [Select]
rpm -qa | grep pear
If so remove the packages with the following work-around:

Code: [Select]
rpm -e --nodeps php-pear pear*
After that you should be able to install it again using the following command:

Code: [Select]
yum install php-pear
Also make sure you re-install every pear package you removed from the list you generated above:

Code: [Select]
yum install pear-package1 pear-package2(make sure you replace packagen with the proper package name from the first command, you do not need the version number only the package name prefixed by pear-).

To get everything configured properly make sure you do the post-upgrade and reboot action to keep your system in a consistent state.

Code: [Select]
signal-event post-upgrade
signal-event reboot

After that you should be able to upgrade pear to the proper version using the commands listed on pear.php.net.
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)

Re: "pear" commands return HTTP/1.1 410 Gone error
« Reply #6 on: March 24, 2008, 07:12:14 PM »
Even on recent versions of SME Server PEAR is outdated, you can try the commands from the pear website (they should work), otherwise you need to manually download stuff and extract it in the PEAR directory I guess.

Note that use of the 'pear' command to install software is deprecated. Software should only be installed via rpm, so that it appears in the software catalog (rpm -q) and so that it can be verified (rpm -V).

Re: "pear" commands return HTTP/1.1 410 Gone error
« Reply #7 on: March 24, 2008, 07:28:30 PM »
It's incredibly helpful of you to reply so quickly, and much appreciated.

rpm packages listed by
[root@netserver2 ~]# rpm -qa | grep pear

php-pear-4.3.9-3.22.9
pear-log-1.8.7-2.el4.sme
pear-date-1.4.3-4.el4.sme
pear-file-1.2.0-4.el4.sme
pear-mail-1.1.4-4.el4.sme
pear-db-1.7.6-4.el4.sme
pear-mail_mime-1.3.0-4.el4.sme

But when I try to remove them I get this:

[root@netserver2 ~]# rpm -e --nodeps php-pear pear*
error: package pear* is not installed

However, I found I could remove them one at a time (didn't like the wildcard or the multiple entries on one line, or both) with
rpm -e --nodeps php-pear
rpm -e --nodeps pear-log
rpm -e --nodeps pear-date
...

etc, then the rest worked, following your instructions, and again adding the packages back one at a time.

I'm just waiting for the reboot, then I'll see if the pear command will access things again.

(A little later)
Well, I'm back with PEAR v1.3.2. And the same problem I had before, but (I think) have worked around unless I've now broken the work-around! (Quick check - no, the HTML_QuickForm test form still works).

But at least anything within the standard SME server that needs PEAR should now have it where it expects it.

I tried the wrong set of instructions from the pear.php.net to start with, but trying the right ones (at the top of the home page) did eventually work, with only a couple of minor hiccups -

sh: /usr/bin/cpp: No such file or directory

I don't know how significant that is.

I will return to the new install of PEAR and see if I can revert to the 'proper' location and get the HTML_QuickForm package to install there, then change the PHP include_path in the custom template to fix things properly.

(A few minutes later: installing HTML_QuickForms seems to work, but even after changing the PHP include_path to /usr/share/pear via a custom template, the form can't see it. I think I have to add that to the php base_dir configuration, and will try that shortly, once I've remember where to do it!)

So once again, THANK YOU massively.

John McC

PS: My drafting of this just crossed with your more recent post, but I don't think it changes the substance of my reply, except to add:

How would I install HTML_QuickForm (as an example) from an RPM? It's easy from the pear installer.

Offline byte

  • *
  • 2,183
Re: "pear" commands return HTTP/1.1 410 Gone error
« Reply #8 on: March 24, 2008, 07:47:45 PM »
Moving this topic to the SME 7.x contribs forum, it is more appropriate there. Thanks!
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Re: "pear" commands return HTTP/1.1 410 Gone error
« Reply #9 on: March 24, 2008, 08:24:13 PM »
How would I install HTML_QuickForm (as an example) from an RPM?

Someone would need to build the rpm first. The spec files for perl-file, pear-log, etc, etc show how to build such an rpm. It's not hard (but you need to know the basics about rpm and spec files first).

Offline cactus

  • *
  • 4,880
    • http://www.snetram.nl
Re: "pear" commands return HTTP/1.1 410 Gone error
« Reply #10 on: March 24, 2008, 10:16:42 PM »
Note that use of the 'pear' command to install software is deprecated. Software should only be installed via rpm, so that it appears in the software catalog (rpm -q) and so that it can be verified (rpm -V).
You are right Charlie, I should have mentioned that. But it's a pity that RedHat takes so much time in upgrading the PEAR package as the current version is not maintained and supported since January 2008.
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)