PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Images » Image_Barcode » Bug #4755

$barcodepath not found in Image/Barcode.php

Details

Submitted2005-07-06 02:24 UTC
Frommikespook at hotmail dot com
Assignedcweiske
StatusClosed
PackageImage_Barcode
PHP Version4.3.10
OSWindowsXP
Roadmaps(Not assigned)

Comments

[2005-07-06 02:24 UTC] mikespook at hotmail dot com

Description:
------------
* @version CVS: $Id: Barcode.php,v 1.2 2005/05/30 04:31:40 msmarcal Exp $

When I view the example, I got a warning: opendir(c:\php4\pear\Image\Barcode): failed to open dir: Invalid argument in c:\AppServ\php\PEAR\Image\Barcode.php on line 67

I use the PHP binarry package, so I can`t set the const "PEAR_INSTALL_DIR".

the const "PEAR_INSTALL_DIR" is "c:\php4\pear\" in default, but I install the PHP in "C:\AppServ\php".

Reproduce code:
---------------
in Pear.php
add the line
//--------------------
define('MY_PEAR_INSTALL_DIR', dirname( __FILE__ ));
//--------------------
in Barcode.php
modify the code at line 64
//--------------------
$barcodepath = PEAR_INSTALL_DIR . DIRECTORY_SEPARATOR . "Image" . DIRECTORY_SEPARATOR . "Barcode";
//--------------------
to
//--------------------
$barcodepath = MY_PEAR_INSTALL_DIR . DIRECTORY_SEPARATOR . "Image" . DIRECTORY_SEPARATOR . "Barcode";
//--------------------

Expected result:
----------------
the binarry package set the const PEAR_INSTALL_DIR to "c:\php4\pear". And I can`t change it to my dir.So I define "MY_PEAR_INSTALL_DIR".

Actual result:
--------------
In windows, the const PEAR_INSTALL_DIR can`t change to right dir.

[2006-01-16 15:35 UTC] said dot fox at gmail dot com

This problem made me mad. I solved this madness with a madness too. I copied the pear folder to C:\php4\, so the system can find it. By the way I installed php in c:\php\, I just used php4 folder to cover the bug