Re: What's up with pear?
| From: | Alexander Skwar | Date: | Sat, 15 Feb 2003 17:44:56 +0000 |
| Subject: | Re: What's up with pear? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-3775@lists.php.net to get a copy of this message | ||
Mike Carter schrieb:
> I had the same problem. You need to use the CLI version of the PHP
> binary, I think it's in a CLI/ directory of your PHP4 installation.
Well, this seems to work - somewhat. As advised, I used the CLI version
of PHP and this time the installer ran. At the end, it issued this
warning message:
** The 'pear' command is not currently in your PATH, so you need to
** use 'C:\PHP\pear' until you have added
** 'C:\PHP' to your PATH environment variable.
However, C:\PHP is in my %PATH%:
[c:\]echo %PATH%
C:\PHP\cli;C:\PHP;.......
However, there's no pear.bat created in C:\PHP. I've got a pear.bat_old
(size: 2k) and a .tmppear (size: 10k). The installer did not create a
C:\PHP4 directory.
The installer also showed this warning message:
** WARNING! Backed up old pear to C:\\PHP\pear.bat_old
Well, I didn't have a pear.bat in C:\PHP. Also note the double
backslash in the warning message.
Hmm, is the installer confused by the fact that the "PHP code directory"
is supposed to go to a PEAR subdirectory? In Linux, this wouldn't be
possible, because there the PEAR script is called "pear" and thus would
clash with a directory called "pear". Did the installer maybe miss at
some point, that the PEAR script will be called "pear.bat"?
.tmppear isn't executable on Windows, because it's a sh shell script:
#!/bin/sh
# first find which PHP binary to use
if test "x$PHP_PEAR_PHP_BIN" != "x"; then
PHP="$PHP_PEAR_PHP_BIN"
else
if test "c:\php4\php.exe" = '@'php_bin'@'; then
PHP=php
else
PHP="c:\php4\php.exe"
fi
fi
# then look for the right pear include dir
if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then
INC="-d include_path=$PHP_PEAR_INSTALL_DIR"
else
if test "@php_dir@" = '@'php_dir'@'; then
INC=""
else
INC="-d include_path=@php_dir@"
fi
fi
exec $PHP -C -q $INC -d output_buffering=1 $0 $@
The tiny pear.bat_old contains:
@ECHO OFF
REM ----------------------------------------------------------------------
REM PHP version 4.0
REM ----------------------------------------------------------------------
REM Copyright (c) 1997-2002 The PHP Group
REM ----------------------------------------------------------------------
REM This source file is subject to version 2.02 of the PHP license,
REM that is bundled with this package in the file LICENSE, and is
REM available at through the world-wide-web at
REM http://www.php.net/license/2_02.txt.
REM If you did not receive a copy of the PHP license and are unable to
REM obtain it through the world-wide-web, please send a note to
REM license@php.net so we can mail you a copy immediately.
REM ----------------------------------------------------------------------
REM Authors: Alexander Merz (alexmerz@php.net)
REM ----------------------------------------------------------------------
REM
REM $Id: pear.bat,v 1.12 2003/01/03 00:17:41 phanto Exp $
REM change this lines to match the paths of your system
REM -------------------
set PHP_BIN=@php_bin@
set BIN_DIR=@bin_dir@
set PEAR_PATH=@include_path@
%PHP_BIN% -C -d output_buffering=1 -d include_path=%PEAR_PATH% -f
%BIN_DIR%\pear -- %1 %2 %3 %4 %5 %6 %7 %8 %9
@ECHO ON
Well, while Till clearly used the wrong words to describe the problem,
there's a lot broken in the PEAR installer IMO....
Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (en)
Homepage: http://www.iso-top.biz | Jabber:
askwar@a-message.de
iso-top.biz - Die günstige Art an Linux Distributionen zu kommen