issues re: installing pyrus by following the online manual
| From: | Robert P. J. Day | Date: | Sun, 28 Feb 2010 13:18:28 +0000 |
| Subject: | issues re: installing pyrus by following the online manual | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-30334@lists.php.net to get a copy of this message | ||
i'm sure this is easy to fix, but there's a bit of a disconnect
between the way pyrus works and what the online doc says about it.
running fairly up-to-date fedora 12 system, with PHP 5.3.1:
$ rpm -q php
php-5.3.1-1.fc12.x86_64
$
so this system would seem to be pyrus-ready. grab pyrus.phar from
pear2.php.net, and try:
$ php pyrus.phar
PHP Fatal error: Class 'XMLReader' not found in
phar:///home/rpjday/Downloads/pyrus.phar/PEAR2_Pyrus-2.0.0a1/php/pear2/Pyrus/XMLParser.php
on line 35
$
the pyrus installation page
(http://pear.php.net/manual/en/installationpyrus.introduction.php)
claims:
"Install PHP 5.3.1 or newer. Pyrus needs the phar, simplexml, libxml2,
spl and pcre extensions in order to work. Fortunately, these are all
enabled by default in PHP 5.3."
i'm going to suggest that be written a bit more carefully since a
*lot* of linux versions have pre-packaged version of PHP, and it's not
clear *how* they're packaged. in any event, you can see what the doc
page claims above, but if you look inside pyrus.phar, you read:
foreach (array('phar', 'spl', 'pcre', 'simplexml') as $ext)
{
if (!extension_loaded($ext)) {
echo 'Extension ', $ext, " is required\n";
exit -1;
}
}
note the absence in the code for checking for libxml2, as the doc page
suggests. but what's the proper way to satisfy that dependency these
days? and should pyrus.phar explicitly check for that extension? i'm
trying to clarify this only because the online manual strongly
suggests that installing pyrus is a piece of cake but, depending on
your linux distro, you might have a bit of extra work to do and that
should be documented.
rday
--
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Kernel Pedantry.
Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================