Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RFC: PHP's PEAR Broken in 10.3?



I'd like to request confirmation of the problem, as well
as the solution, before I submit this as a formal bug.

 * PEAR is a package/module manager PEAR was  for PHP.

 * PHP 4.1.2 was installed with Jaguar.
 * PEAR was installed (by Apple) with Jaguar along with a number
   of additional modules (reference /System/Library/PHP). PEAR was
   not a default item in 4.1.2 PHP installations.

 * PEAR is a default install with PHP 4.3+.
 * PHP 4.3.2 is installed with Panther.
 * The default PEAR is installed with Panther.

I submit that PEAR under Panther does not work:

   % /usr/bin/pear -v

   Warning: main(System.php): failed to open stream:
   No such file or directory in Config.php on line 23

   Fatal error: main(): Failed opening required 'System.php'
   (include_path='.:/usr/lib/php') in /usr/lib/php/PEAR/Config.php
   on line 23

In fact, there's no System.php file anywhere ("locate System.php"). Nor is
there anything located in /System/Library/PHP (I suspect this is because
Apple chose not to install any of the PEAR packages for the user, as they
did with the non-PEAR default of 4.1.2/Jaguar).

But, with the System.php file missing on Panther, none of the
cross-platform, system-specific functions are defined for PEAR, thus it
fails. Copying over /System/Library/PHP/System.php in Jaguar solved nothing
- due to the oldness of the file (2001), tmpdir() was not defined.

   Fatal error: Call to undefined function:  tmpdir()
   in /usr/lib/php/PEAR/Config.php on line 116

Now, grab the latest System.php from the PHP CVS
http://cvs.php.net/cvs.php/php-src/pear/System.php
and drop it into /usr/lib/php/ (you'll probably need
to sudo cp the file to do so). Once that happens,
PEAR works fine:

   % sudo pear list
   Installed packages:
   ===================
   Package        Version State
   Archive_Tar    0.9     stable
   Console_Getopt 1.0     stable
   PEAR           0.9     stable

Can anyone confirm this? Sanity check my solution? Give more insight?

-- 
Morbus Iff ( i put the demon back in codemonkey )
Technical: http://www.oreillynet.com/pub/au/779
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus
_______________________________________________
web-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/web-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.