Discussion:
PEAR installer missing on Windows + PHP 4.3.0 (pear.bat refers to missing file?)
Peter Zuidhoek
22 years ago
Permalink
I installed PEAR on top of a clean PHP 4.3.0 installation on a Windows XP
Pro machine. See output below. The base packages all seem to have been
installed correctly (for example, a simple test with DB works). But the
installer file "pear.bat" is missing. There is just a file named
"pear.bat_old".

The warning

** WARNING! Backed up old pear to C:\\Programs\\PHP\pear.bat_old

is misleading, considering that there was no file "pear.bat" when I started
the installation of PEAR.

If I rename "pear.bat_old" to "pear.bat" and fix the paths in it, it does
not work. The file contains the command

%PHP_BIN% -C -d output_buffer=1 -d include_path=%PEAR_PATH% -f
%BIN_DIR%\pear -- %1 %2 %3 %4 %5 %6 %7 %8 %9

But the file "%BIN_DIR%\pear" -- as referred to by the -f option -- is
missing. (What directory should %BIN_DIR% point to anyway?)

I have searched CVS, I can't find any such file. What's the status on all
this?

Peter Zuidhoek

-------------------------

1. Installation output

-------------------------

C:\Programs\PHP>cli\php -r "readfile('http://go-pear.org/');" | php

Content-type: text/html

X-Powered-By: PHP/4.3.0

Welcome to go-pear!

Go-pear will install the 'pear' command and all the files needed by

it. This command is your tool for PEAR installation and maintenance.

Go-pear also lets you download and install the PEAR packages bundled

with PHP: DB, Net_Socket, Net_SMTP, Mail, XML_Parser.

If you wish to abort, press Control-C now, or press Enter to continue:

HTTP proxy (host:port), or Enter for none:

Below is a suggested file layout for your new PEAR installation. To

change individual locations, type the number in front of the

directory. Type 'all' to change all of them or simply press Enter to

accept these locations.

1. Installation prefix : c:\php4

2. Binaries directory : $prefix

3. PHP code directory : $prefix\pear

4. Documentation base directory : $php_dir\docs

5. Data base directory : $php_dir\data

6. Tests base directory : $php_dir\tests

1-6, 'all' or Enter to continue: 1

Installation prefix [c:\php4] : c:\programs\php

Below is a suggested file layout for your new PEAR installation. To

change individual locations, type the number in front of the

directory. Type 'all' to change all of them or simply press Enter to

accept these locations.

1. Installation prefix : c:\programs\php

2. Binaries directory : $prefix

3. PHP code directory : $prefix\pear

4. Documentation base directory : $php_dir\docs

5. Data base directory : $php_dir\data

6. Tests base directory : $php_dir\tests

1-6, 'all' or Enter to continue:

The following PEAR packages are bundled with PHP: DB, Net_Socket, Net_SMTP,

Mail, XML_Parser.

Would you like to install these as well? [Y/n] : Y

Downloading package: PEAR.............ok

Downloading package: Archive_Tar......ok

Downloading package: Console_Getopt...ok

Downloading package: XML_RPC..........ok

Bootstrapping: PEAR...................ok

Bootstrapping: Archive_Tar............ok

Bootstrapping: Console_Getopt.........ok

Downloading package: DB...............ok

Downloading package: Net_Socket.......ok

Downloading package: Net_SMTP.........ok

Downloading package: Mail.............ok

Downloading package: XML_Parser.......ok

Extracting installer..................ok

install ok: PEAR 1.0

install ok: Archive_Tar 0.9

install ok: Console_Getopt 1.0

install ok: XML_RPC 1.0.4

install ok: DB 1.3

install ok: Net_Socket 1.0.1

install ok: Net_SMTP 1.0

install ok: Mail 1.0.2

install ok: XML_Parser 1.0

** WARNING! Backed up old pear to C:\\Programs\\PHP\pear.bat_old

The 'pear' command is now at your service at c:\programs\php\pear

** The 'pear' command is not currently in your PATH, so you need to

** use 'c:\programs\php\pear' until you have added

** 'c:\programs\php' to your PATH environment variable.

Run it without parameters to see the available actions, try 'pear list'

to see what packages are installed, or 'pear help' for help.

For more information about PEAR, see:

http://pear.php.net/faq.php

http://cvs.php.net/co.php/pearweb/doc/pear_package_manager.txt?p=1

http://pear.php.net/manual/

Thanks for using go-pear!

C:\Programs\PHP>



-------------------------

pear_old.bat

-------------------------

@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 ***@php.net so we can mail you a copy immediately.

REM ----------------------------------------------------------------------

REM Authors: Alexander Merz (***@php.net)

REM ----------------------------------------------------------------------

REM

REM $Id: pear.bat,v 1.11 2002/12/13 02:10:23 ssb 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_buffer=1 -d include_path=%PEAR_PATH% -f
%BIN_DIR%\pear -- %1 %2 %3 %4 %5 %6 %7 %8 %9

@ECHO ON
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Christoph Grottolo
22 years ago
Permalink
Related to Peters post, also 4.3.0 Win32:

go-pear seems to install always to drive c:\, even if there you specify
another location.

The empty directories
pear
pear\data
pear\docs
pear\tests

are created in the correct location but the files itself are placed in a
parallel directory structure on c:\pear instead of e:\pear. Also a directory
c:\php_iis is created with the files pear.bat and pear in it.

See the installation output below.

Additionally, there is a disinformation in go-pear output, as there is
nothing related to PEAR included in the PHP distribution (as of 4.3.0 on
win32).

Christoph

--------------------
Installation output:
--------------------
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

E:\php_iis>cli\php -r "readfile('http://go-pear.org/');" | php
Content-type: text/html; charset=iso-8859-1
X-Powered-By: PHP/4.3.0

Welcome to go-pear!

Go-pear will install the 'pear' command and all the files needed by
it. This command is your tool for PEAR installation and maintenance.

Go-pear also lets you download and install the PEAR packages bundled
with PHP: DB, Net_Socket, Net_SMTP, Mail, XML_Parser.

If you wish to abort, press Control-C now, or press Enter to continue:

HTTP proxy (host:port), or Enter for none:

Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type 'all' to change all of them or simply press Enter to
accept these locations.

1. Installation prefix : c:\php4
2. Binaries directory : $prefix
3. PHP code directory : $prefix\pear
4. Documentation base directory : $php_dir\docs
5. Data base directory : $php_dir\data
6. Tests base directory : $php_dir\tests

1-6, 'all' or Enter to continue: 1

[...]

1. Installation prefix : e:\php_iis
2. Binaries directory : $prefix
3. PHP code directory : e:\pear
4. Documentation base directory : $php_dir\docs
5. Data base directory : $php_dir\data
6. Tests base directory : $php_dir\tests

1-6, 'all' or Enter to continue:

The following PEAR packages are bundled with PHP: DB, Net_Socket, Net_SMTP,
Mail, XML_Parser.
Would you like to install these as well? [Y/n] : Y

Downloading package: PEAR.............ok
Downloading package: Archive_Tar......ok
Downloading package: Console_Getopt...ok
Downloading package: XML_RPC..........ok
Bootstrapping: PEAR...................ok
Bootstrapping: Archive_Tar............ok
Bootstrapping: Console_Getopt.........ok
Downloading package: DB...............ok
Downloading package: Net_Socket.......ok
Downloading package: Net_SMTP.........ok
Downloading package: Mail.............ok
Downloading package: XML_Parser.......ok
Extracting installer..................ok
install ok: PEAR 1.0
install ok: Archive_Tar 0.9
install ok: Console_Getopt 1.0
install ok: XML_RPC 1.0.4
install ok: DB 1.3
install ok: Net_Socket 1.0.1
install ok: Net_SMTP 1.0
install ok: Mail 1.0.2
install ok: XML_Parser 1.0

****************************************************************************
**
WARNING! The include_path defined in the currently used php.ini does not
contain the PEAR PHP directory you just specified. If the specified
directory is also not in the include_path used by your scripts, you
will have problems getting any PEAR packages working.

Please look over your php.ini file to make sure
e:\pear is in your include_path.
Current include path : .;e:\php\include;e:\php\pear
Configured directory : e:\pear
Currently used php.ini (guess) : c:\windows\php.ini

Press Enter to continue:

The 'pear' command is now at your service at e:\php_iis\pear

** The 'pear' command is not currently in your PATH, so you need to
** use 'e:\php_iis\pear' until you have added
** 'e:\php_iis' to your PATH environment variable.

Run it without parameters to see the available actions, try 'pear list'
to see what packages are installed, or 'pear help' for help.

For more information about PEAR, see:

http://pear.php.net/faq.php
http://cvs.php.net/co.php/pearweb/doc/pear_package_manager.txt?p=1
http://pear.php.net/manual/

Thanks for using go-pear!


E:\php_iis>
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Peter Zuidhoek
22 years ago
Permalink
Christoph,

None of the empty directories you mention were created. All of the base PEAR
packages, documentation, registry files were created in the right locations
(in my case c:\programs\php\pear and downwards). All that is missing is the
installer. So my question remains.

Peter
...
****************************************************************************
...
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Peter Zuidhoek
22 years ago
Permalink
To all those interested:

I got the installer working after I

1) Created the directory C:\Programs\PHP\pear\scripts

(C:\Programs\PHP is my PHP installation path.)

2) Copied the file scripts\pear.in from the PEAR 1.0 package tar-file
(PEAR-1[1].0.tar.gz) to this C:\Programs\PHP\pear\scripts and renamed a copy
of this file to "pear".

3) Copied the file scripts\pear.bat from the PEAR 1.0 package tar-file to
the directory C:\Programs\PHP and adapted the following lines:

set PHP_BIN=c:\programs\php\cli\php.exe
set BIN_DIR=c:\programs\php\pear\scripts
set PEAR_PATH=c:\programs\php\pear

%PHP_BIN% -C -d output_buffer=1 -d include_path=%PEAR_PATH% -f
%BIN_DIR%\pear -- %1 %2 %3 %4 %5 %6 %7 %8 %9

4) The installer works! Both

pear list

and

pear search Auth

produced plausible output.

5) From the output of

pear config-show

I could see that php_bin was still pointing to c:\php4\php.exe. I changed
this with:

pear config-set php_bin c:\programs\php\cli\php.exe

The other settings seemed OK.

6) For example, installing the package Auth through the installer worked
just fine.
...
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Loading...