Cannot install phpseclib on host: Validation Error.

Get help with using the PHP Secure Communications Library.

Moderator: Nuxius

Forum rules
The purpose of this forum is to provide support for phpseclib, a pure PHP SSH / SFTP / RSA library.

Posts by new users are held in a moderation queue and are not publicly visible until the post is approved.

Cannot install phpseclib on host: Validation Error.

Postby LazloHollyfeld » Wed May 11, 2011 8:12 pm

Hi There,

I need to install phpseclib with pear on a different host machine. I was able to do this successfully on a previous host machine, but this one gives me a strange error:

After having successfully discovered the phpseclib channel, I type in:

sudo pear install phpseclib/Net_SSH2

I get the following (my apologies for the length of this:
Code: Select all
Did not download optional dependencies: phpseclib/Crypt_AES, phpseclib/Crypt_TripleDES, phpseclib/Crypt_DES, phpseclib/Crypt_RC4, use --alldeps to download automatically
Did not download optional dependencies: phpseclib/Math_BigInteger, use --alldeps to download automatically
phpseclib/Math_BigInteger can optionally use PHP extension "gmp"
phpseclib/Crypt_Hash can optionally use PHP extension "mhash"
phpseclib/Crypt_TripleDES can optionally use PHP extension "mcrypt"
phpseclib/Crypt_RC4 can optionally use PHP extension "mcrypt"
phpseclib/Crypt_AES can optionally use PHP extension "mcrypt"
phpseclib/Crypt_DES can optionally use PHP extension "mcrypt"
downloading Net_SSH2-0.2.2.tgz ...
Starting to download Net_SSH2-0.2.2.tgz (18,762 bytes)
......done: 18,762 bytes
Validation Error: <notes> cannot be empty (<notes/>)
Parsing of package.xml from file "/private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/pearsA3vgO/package.xml" failed
Download of "phpseclib/Net_SSH2" succeeded, but it is not a valid package archive
Error: cannot download "phpseclib/Net_SSH2"
downloading Math_BigInteger-0.2.2.tgz ...
Starting to download Math_BigInteger-0.2.2.tgz (24,730 bytes)
...done: 24,730 bytes
Validation Error: <notes> cannot be empty (<notes/>)
Parsing of package.xml from file "/private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/pearwSFRHU/package.xml" failed
Download of "phpseclib/Math_BigInteger" succeeded, but it is not a valid package archive
Error: cannot download "phpseclib/Math_BigInteger"
downloading Crypt_Random-0.2.2.tgz ...
Starting to download Crypt_Random-0.2.2.tgz (2,975 bytes)
...done: 2,975 bytes
Validation Error: <notes> cannot be empty (<notes/>)
Parsing of package.xml from file "/private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/pearWTHhtC/package.xml" failed
Download of "phpseclib/Crypt_Random" succeeded, but it is not a valid package archive
Error: cannot download "phpseclib/Crypt_Random"
downloading Crypt_Hash-0.2.2.tgz ...
Starting to download Crypt_Hash-0.2.2.tgz (8,483 bytes)
...done: 8,483 bytes
Validation Error: <notes> cannot be empty (<notes/>)
Parsing of package.xml from file "/private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/pear9Jg6Yx/package.xml" failed
Download of "phpseclib/Crypt_Hash" succeeded, but it is not a valid package archive
Error: cannot download "phpseclib/Crypt_Hash"
downloading Crypt_TripleDES-0.2.2.tgz ...
Starting to download Crypt_TripleDES-0.2.2.tgz (7,755 bytes)
...done: 7,755 bytes
Validation Error: <notes> cannot be empty (<notes/>)
Parsing of package.xml from file "/private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/pearx5QMaF/package.xml" failed
Download of "phpseclib/Crypt_TripleDES" succeeded, but it is not a valid package archive
Error: cannot download "phpseclib/Crypt_TripleDES"
downloading Crypt_RC4-0.2.2.tgz ...
Starting to download Crypt_RC4-0.2.2.tgz (5,108 bytes)
...done: 5,108 bytes
Validation Error: <notes> cannot be empty (<notes/>)
Parsing of package.xml from file "/private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/pearFx73Xw/package.xml" failed
Download of "phpseclib/Crypt_RC4" succeeded, but it is not a valid package archive
Error: cannot download "phpseclib/Crypt_RC4"
downloading Crypt_AES-0.2.2.tgz ...
Starting to download Crypt_AES-0.2.2.tgz (6,041 bytes)
...done: 6,041 bytes
Validation Error: Invalid tag order in <package>, found <contents> expected one of "notes"
Parsing of package.xml from file "/private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/pearEw8iGg/package.xml" failed
Download of "phpseclib/Crypt_AES" succeeded, but it is not a valid package archive
Error: cannot download "phpseclib/Crypt_AES"
downloading Crypt_DES-0.2.2.tgz ...
Starting to download Crypt_DES-0.2.2.tgz (10,734 bytes)
...done: 10,734 bytes
Validation Error: <notes> cannot be empty (<notes/>)
Parsing of package.xml from file "/private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/pear05utQu/package.xml" failed
Download of "phpseclib/Crypt_DES" succeeded, but it is not a valid package archive
Error: cannot download "phpseclib/Crypt_DES"
downloading Crypt_Rijndael-0.2.2.tgz ...
Starting to download Crypt_Rijndael-0.2.2.tgz (15,182 bytes)
...done: 15,182 bytes
Validation Error: <notes> cannot be empty (<notes/>)
Parsing of package.xml from file "/private/var/tmp/apache_mod_php/apache_mod_php-53.1.1~7/Build/tmp/pear/temp/pear56WJFC/package.xml" failed
Download of "phpseclib/Crypt_Rijndael" succeeded, but it is not a valid package archive
Error: cannot download "phpseclib/Crypt_Rijndael"
Download failed
install failed



So, I thought maybe my install version of PEAR itself was old, so I decided to upgrade it, and here is my version info
Code: Select all
PEAR Version: 1.9.2
PHP Version: 5.3.4
Zend Engine Version: 2.3.0
Running on: Darwin myHostMachine 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386


After I upgraded PEAR, running the install command still would not validate the packages. What is the message <notes> cannot be empty (<notes/>) refer to? I did check the .xml files and yes, the <notes> node is empty, but why is it not validating it?

Thanks,
Laz
LazloHollyfeld
Traveler
 
Posts: 3
Joined: Mon May 02, 2011 8:08 pm

Re: Cannot install phpseclib on host: Validation Error.

Postby TerraFrost » Sun May 15, 2011 8:26 pm

I apologize for the delay. Anyway, try it now!
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Re: Cannot install phpseclib on host: Validation Error.

Postby d3xt3r01 » Fri Aug 09, 2013 4:39 pm

$ php index.php
PHP Warning: include(File/X509.php): failed to open stream: No such file or directory in ...
$ sudo pear install Crypt_Rsa
WARNING: "pear/Crypt_RSA" is deprecated in favor of "channel://phpseclib.sourceforge.net/Crypt_RSA"
....
# pear channel-discover phpseclib.sourceforge.net
Adding Channel "phpseclib.sourceforge.net" succeeded
Discovery of channel "phpseclib.sourceforge.net" succeeded
# pear remote-list -c phpseclib
CHANNEL PHPSECLIB AVAILABLE PACKAGES:
=====================================
PACKAGE VERSION
....
# pear install phpseclib/File_X509
downloading File_X509-0.3.5.tgz ...
Starting to download File_X509-0.3.5.tgz (26,283 bytes)
.........done: 26,283 bytes
could not extract the package.xml file from "/var/tmp/pear/File_X509-0.3.5.tgz"
Download of "phpseclib/File_X509" succeeded, but it is not a valid package archive
Error: cannot download "phpseclib/File_X509"
downloading File_ASN1-0.3.5.tgz ...
Starting to download File_ASN1-0.3.5.tgz (11,443 bytes)
...done: 11,443 bytes
could not extract the package.xml file from "/var/tmp/pear/File_ASN1-0.3.5.tgz"
Download of "phpseclib/File_ASN1" succeeded, but it is not a valid package archive
Error: cannot download "phpseclib/File_ASN1"
Download failed
install failed
$ php -v
PHP 5.5.1-pl1-gentoo (cli) (built: Aug 4 2013 12:44:56)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.2-dev, Copyright (c) 1999-2013, by Zend Technologies
d3xt3r01
Traveler
 
Posts: 2
Joined: Fri Aug 09, 2013 4:36 pm

Re: Cannot install phpseclib on host: Validation Error.

Postby TerraFrost » Tue Aug 13, 2013 4:12 am

You're doing "sudo pear install Crypt_Rsa" but then "pear install phpseclib/File_X509". Why not do sudo on the last one as well? I think that'd fix your problem.
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am

Re: Cannot install phpseclib on host: Validation Error.

Postby d3xt3r01 » Tue Aug 13, 2013 7:21 pm

Notice the # infront, I've changed from user ( $ ) to root ( # ) in the meantime :)
d3xt3r01
Traveler
 
Posts: 2
Joined: Fri Aug 09, 2013 4:36 pm

Re: Cannot install phpseclib on host: Validation Error.

Postby TerraFrost » Tue Aug 13, 2013 8:08 pm

All I can say is... it works for me in VirtualBox:

http://imgur.com/u4f75g6

phpseclib's PEAR channel doesn't support https, per <https://github.com/phpseclib/phpseclib/issues/60>, fwiw, but I don't think that'd cause the issue you're seeing anyway.
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am


Return to phpseclib support

Who is online

Users browsing this forum: No registered users and 1 guest

cron