PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » File Formats » File_Archive » Bug #4213

Call to undefined function extract()

Details

Submitted2005-04-23 22:42 UTC
Fromdmytton at php dot net
StatusBogus
PackageFile_Archive
PHP Version4.3.10
OSLinux
Roadmaps(Not assigned)

Comments

[2005-04-23 22:42 UTC] dmytton at php dot net

Description:
------------
When calling the extract function, a fatal error occurs. This does not happen on my test platforms:

- Fedora Linux Core 2/PHP 4.3.11
- Windows/PHP 5.0.3

But happens on my customer's systsme:

- Linux/PHP 4.3.10

Reproduce code:
---------------
$location = 'key-1.php';
$ext = '.zip';
$source = File_Archive::read($location, $location);
$source->extract(File_Archive::toArchive($location.$ext, File_Archive::toFiles()));

Expected result:
----------------
The zip file should be created with key-1.php in it.

Actual result:
--------------
Fatal error: Call to undefined function: extract() in /home/guru04/public_html/shop/upload/includes/classes/iono/iono_downloads.php on line 74

[2005-04-26 06:42 UTC] dmytton at php dot net

Yes, seems you are right - the file it is trying to archive doesn't exist.

bool(false) object(pear_error)(8) { ["error_message_prefix"]=> string(0) "" ["mode"]=> int(1) ["level"]=> int(1024) ["code"]=> NULL ["message"]=> string(24) "File key-1.php not found" ["userinfo"]=> NULL ["backtrace"]=> array(8) { [0]=> array(6) { ["file"]=> string(21) "/usr/lib/php/PEAR.php" ["line"]=> int(538) ["function"]=> string(10) "pear_error" ["class"]=> string(10) "pear_error" ["type"]=> string(2) "->" ["args"]=> array(5) { [0]=> string(24) "File key-1.php not found" [1]=> NULL [2]=> int(1) [3]=> int(1024) [4]=> NULL } } [1]=> array(6) { ["file"]=> string(78) "/home/guru04/public_html/shop/upload/includes/classes/archive/File/Archive.php" ["line"]=> int(303) ["function"]=> string(10) "raiseerror" ["class"]=> string(4) "pear" ["type"]=> string(2) "::" ["args"]=> array(1) { [0]=> string(24) "File key-1.php not found" } } [2]=> array(6) { ["file"]=> string(78) "/home/guru04/public_html/shop/upload/includes/classes/archive/File/Archive.php" ["line"]=> int(342) ["function"]=> string(10) "readsource" ["class"]=> string(12) "file_archive" ["type"]=> string(2) "::" ["args"]=> array(5) { [0]=> NULL [1]=> string(9) "key-1.php" [2]=> string(9) "key-1.php" [3]=> int(0) [4]=> int(-1) } } [3]=> array(6) { ["file"]=> string(77) "/home/guru04/public_html/shop/upload/includes/classes/iono/iono_downloads.php" ["line"]=> int(75) ["function"]=> string(4) "read" ["class"]=> string(12) "file_archive" ["type"]=> string(2) "::" ["args"]=> array(2) { [0]=> string(9) "key-1.php" [1]=> string(9) "key-1.php" } } [4]=> array(6) { ["file"]=> string(77) "/home/guru04/public_html/shop/upload/includes/classes/iono/iono_downloads.php" ["line"]=> int(386) ["function"]=> string(7) "archive" ["class"]=> string(14) "iono_downloads" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> ∫(2) [1]=> &string(9) "key-1.php" } } [5]=> array(6) { ["file"]=> string(70) "/home/guru04/public_html/shop/upload/sources/frontend/download_key.php" ["line"]=> int(34) ["function"]=> string(12) "download_key" ["class"]=> string(14) "iono_downloads" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> ∫(1) } } [6]=> array(4) { ["file"]=> string(46) "/home/guru04/public_html/shop/upload/index.php" ["line"]=> int(61) ["args"]=> array(1) { [0]=> string(70) "/home/guru04/public_html/shop/upload/sources/frontend/download_key.php" } ["function"]=> string(12) "require_once" } [7]=> array(3) { ["file"]=> string(46) "/home/guru04/public_html/shop/upload/index.php" ["line"]=> int(4) ["function"]=> string(8) "_il_exec" } } ["callback"]=> NULL } bool(false)