Re: Pear 1.4.8 under PHP 4.2.2.

From: Date: Wed, 08 Mar 2006 10:05:11 +0000
Subject: Re: Pear 1.4.8 under PHP 4.2.2.
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23243@lists.php.net to get a copy of this message
Massimiliano Arione wrote:
bertrand Gugger wrote:
Loading the whole PHP_Compat for that would be much an overload. As a hack, you could try to build a tiny mycompat.php somewhere in your include_path just putting in it the compat functions what you need and declare it as auto-prepend [1] in your php.ini. As a first try you could just copy in it the file_get_content() compat function [2].
It's very much simpler to use the files provided by the PHP_Compat package: <?php require_once 'PHP_Compat/Compat/Function/file_get_contents.php'; .... ?> Sure, it's possible to have this mycompat.php itself requiring original PHP_Compat sub-files, which let you upgrade it normally. (easier maintainance)
I expect he would need more so I thought having them directly in 1 file would limit overload. Remember Matthew cannot edit all concerned php scripts he has and will certainly like to use the prepend feature, so this overload will go in every php page on the site. Eventually, that could be limited on a per directory basis using .htaccess if it's needed only for a subset of the pages. In this case command line must also specify it (not sure it works) php -d auto_prepend=mycompat.php script.php and for the pear command export PHP_PEAR_PHP_BIN=php -d auto_prepend=mycompat.php pear ... That all depends on the actual installation and loads, uneasy to state on the air... -- toggg

« previous php.pear.general (#23243) next »