Install on Windows
| From: | David Botham | Date: | Tue, 29 Apr 2003 21:36:29 +0000 |
| Subject: | Install on Windows | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-5128@lists.php.net to get a copy of this message | ||
All,
I am pretty new to php/pear and quite sorry this is so long. I
appreciate any help y'all might be able to give me. I can't wait to do
the old forehead slap when you point out my mistake.
I have installed this version of php:
PHP 4.3.1 zip package
That is to say, I have exploded the zip package into c:\phpbin4.3.x, and
added that directory to my path env var.
I put php.ini in c:\windows and edited the extension dir directive to
point into the ..bin..\extensions dir.
I also added an extension for komodo and can now debug php in komodo. I
do not have a web server on this system. I use it strictly for
developing include scripts for backend functions and the like...
Because I wanted to use the Net_DNS that is apparently in PEAR, I
started to research pear. I found out from
http://pear.php.net/manual/en/installation.php
that:
" If you have a recent installation of PHP 4, you can relax: The PEAR
base installation is already installed on your system"
Well, there is no pear in the distribution I mentioned above (if there
is, I am really slipping badly). So, I got go-pear and ran it. Here is
what I got (btw, most times this script hangs, this time it ran):
########################################################################
####
php-cli -c c:\windows go-pear.php
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, phpUnit.
If you wish to abort, press Control-C now, or press Enter to continue:
HTTP proxy (host:port), or Enter for none:
*NOTICE*
We found php.exe under c:\phpbin4.3.x\php.exe, it uses a cgi SAPI. PEAR
commandl
ine
tool works well with it, if you have a CLI php.exe available, we
recommand to use it.
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:\phpbin4.3.x
2. Binaries directory : $prefix
3. PHP code directory ($php_dir) : $prefix\pear
4. Documentation base directory : $php_dir\docs
5. Data base directory : $php_dir\data
6. Tests base directory : $php_dir\tests
7. php.exe path : c:\phpbin4.3.x\php.exe
1-7, 'all' or Enter to continue:
The following PEAR packages are bundled with PHP: DB, Net_Socket,
Net_SMTP,
Mail, XML_Parser, phpUnit.
Would you like to install these as well? [Y/n] :
Loading zlib: ok
Downloading package: PEAR.............ok
Downloading package: Archive_Tar......ok
Downloading package: Console_Getopt....ok
Downloading package: XML_RPC..........ok
Bootstrapping: PEAR...................(remote) ok
Bootstrapping: Archive_Tar............(remote) ok
Bootstrapping: Console_Getopt.........(remote) ok
Downloading package: DB...............ok
Downloading package: Net_Socket.......ok
Downloading package: Net_SMTP.........ok
Downloading package: Mail.............ok
Downloading package: XML_Parser.......ok
Downloading package: phpUnit..........ok
Extracting installer..................ok
install ok: PEAR 1.0.1
install ok: Archive_Tar 1.0
install ok: Console_Getopt 1.0
install ok: XML_RPC 1.0.4
install ok: DB 1.4b1
install ok: Net_Socket 1.0.1
install ok: Net_SMTP 1.2.1
install ok: Mail 1.0.2
install ok: XML_Parser 1.0.1
install ok: PHPUnit 0.6
************************************************************************
******
WARNING! The include_path defined in the currently used php.ini does
not
contain the PEAR PHP directory you just specified:
<C:\phpbin4.3.x\pear>
If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.
Would you like to alter php.ini <c:\windows\php.ini>? [Y/n] :
php.ini <c:\windows\php.ini> include_path updated.
Current include path : .;c:\php4\pear
Configured directory : C:\phpbin4.3.x\pear
Currently used php.ini (guess) : c:\windows\php.ini
Press Enter to continue:
** WARNING! Backed up old pear to c:\phpbin4.3.x\pear.bat_old
The 'pear' command is now at your service at C:\phpbin4.3.x\pear
** The 'pear' command is not currently in your PATH, so you need to
** use 'C:\phpbin4.3.x\pear' until you have added
** 'C:\phpbin4.3.x' 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!
* WINDOWS ENVIRONMENT VARIABLES *
For convenience, a REG file is available under
C:\phpbin4.3.x\PEAR_ENV.reg .
This file creates ENV variables for the current user.
Double-click this file to add it to the current user registry.
########################################################################
####
I don't know if it is important, but, the php bin directory is on the
path:
C:\>php -help
Error in argument 1, char 5: option not found p
Error in argument 1, char 5: option not found p
Error in argument 1, char 5: option not found p
Usage: php [-q] [-h] [-s [-v] [-i] [-f <file>]
php <file> [args...]
-a Run interactively
-b <address:port>|<port> Bind Path for external FASTCGI Server mode
-C Do not chdir to the script's directory
-c <path>|<file> Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-f <file> Parse <file>. Implies `-q'
-h This help
-i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-q Quiet-mode. Suppress HTTP Header output.
-s Display colour syntax highlighted source.
-v Version number
-w Display source with stripped comments and whitespace.
-z <file> Load Zend extension <file>.
If pear is there, then it does not run:
C:\>pear
'pear' is not recognized as an internal or external command,
operable program or batch file.
I did double clicked the reg entry to add the env vars before I ran the
above commands.
Here is the output of a dir command on the php bin directory:
C:\phpbin4.3.x>dir
Volume in drive C has no label.
Volume Serial Number is DC5E-C469
Directory of C:\phpbin4.3.x
04/29/2003 04:37 PM <DIR> .
04/29/2003 04:37 PM <DIR> ..
04/29/2003 04:37 PM 9,675 .tmppear
04/29/2003 04:33 PM <DIR> cli
04/28/2003 10:05 AM <DIR> debug
04/28/2003 09:58 AM <DIR> dlls
04/28/2003 09:58 AM <DIR> extensions
04/29/2003 04:36 PM 71,131 go-pear.php
02/16/2003 12:02 AM 32,881 install.txt
02/15/2003 11:20 PM 3,276 license.txt
02/15/2003 11:20 PM 36,823 magic.mime
04/28/2003 09:58 AM <DIR> mibs
02/15/2003 11:20 PM 142,387 news.txt
04/28/2003 09:58 AM <DIR> openssl
04/28/2003 09:58 AM <DIR> pdf-related
04/29/2003 04:37 PM <DIR> pear
04/29/2003 04:37 PM 1,262 pear.bat_old
04/29/2003 04:37 PM 371 PEAR_ENV.reg
02/15/2003 11:20 PM 24,576 php-cli.exe
02/16/2003 12:02 AM 45,056 php.exe
02/15/2003 11:20 PM 3,872 php.gif
02/15/2003 11:20 PM 38,898 php.ini-dist
02/15/2003 11:20 PM 39,502 php.ini-recommended
02/15/2003 11:20 PM 7,952 php4embed.lib
02/15/2003 11:58 PM 1,282,048 php4ts.dll
02/15/2003 11:20 PM 169,956 php4ts.lib
04/28/2003 09:58 AM <DIR> sapi
I know this has been really long, but, I contribute to the DNS and BIND
mailing list quite a bit and get annoyed with people who think mind
reading is a common trait among people in the computer industry. I
thought completeness might be helpful...
Thanks in advance for any help you might be able to give me.
Thanks again,
Dave...