Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
 Phone
 800-766-1884
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

Privacy Policy

 

   
 

ss

Oracle Tips by Burleson 

Installing PEAR on Windows

As is the case with Linux, PEAR is delivered with PHP. A subdirectory named PEAR and a script called go-pear.bat is found in the D:\PHP directory. Execute this script from a DOS window, and note the following results:

D:\PHP>go-pear
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:

After several more “press enter”, a warning appears that we did not take a look at the include directory path: 

********************************************************************
WARNING!  The include_path defined in the currently used php.ini does not contain the PEAR PHP directory you just specified:
<D:\PHP\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. 

Current include path           : .;C:\php5\pear
Configured directory           : D:\PHP\pear
Currently used php.ini (guess) :
Press Enter to continue: 

When the enter button is pressed, another warning comes up:

** The 'pear' command is not currently in your PATH, so you need to
** use 'D:\PHP\pear.bat' until you have added
** 'D:\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!

* WINDOWS ENVIRONMENT VARIABLES *
For convenience, a REG file is available under D:\PHP\PEAR_ENV.reg.
This file creates ENV variables for the current user. 

Double-click this file to add it to the current user registry. 

Press any key to continue . . .

Pressing enter finishes the installation script. However, there are several more tasks to do:

  • Edit PHP.ini and put D:\PHP and D:\PHP\PEAR in the include path.

  • Load D:\PHP\PEAR_ENV.reg into the registry.

  • Put D:\PHP into the PATH.

The first step is the easiest one to perform and is completely analogous to Linux. By using a favorite text editor, the following line is put into PHP.ini:

include_path = ".;D:\PHP;D:\PHP\PEAR”

This, of course means that the Apache2 web server will once again need to be restarted. Next, start windows explorer, locate the file D:\PHP\PEAR_ENV.reg and double-click it. This will load it into the registry. For changing the path, invoke regedit and go to HKEY_CURRENT_USER->Environment. Once there, add C:\PHP to the PATH variable, like shown in the following picture:

If the variable PATH does not exist, it can be created. Now, restart Apache2 and the system, so that the installed registry variables take effect. Next time the user logs in, they can start the DOS window, type “pear” and view the well known menu, exactly the same as for Linux. Using the PEAR installer on Windows is completely identical to using it on Linux. Here is the output from the post-installation steps:

C:\>pear upgrade-all
Will upgrade archive_tar
Will upgrade pear
Will upgrade xml_rpc
downloading Archive_Tar-1.3.0.tgz ...
Starting to download Archive_Tar-1.3.0.tgz (15,200 bytes)
.....done: 15,200 bytes
downloading PEAR-1.3.5.tgz ...
Starting to download PEAR-1.3.5.tgz (108,423 bytes)
...done: 108,423 bytes
downloading XML_RPC-1.2.1.tgz ...
Starting to download XML_RPC-1.2.1.tgz (21,837 bytes)
...done: 21,837 bytes
upgrade-all ok: Archive_Tar 1.3.0
upgrade-all ok: XML_RPC 1.2.1
upgrade-all ok: PEAR 1.3.5
 

C:\>pear install DB HTML_Common HTML_Table HTML_Form
Package 'DB' already installed, skipping
downloading HTML_Common-1.2.1.tgz ...
Starting to download HTML_Common-1.2.1.tgz (3,637 bytes)
....done: 3,637 bytes
downloading HTML_Table-1.5.tgz ...
Starting to download HTML_Table-1.5.tgz (6,276 bytes)
...done: 6,276 bytes
downloading HTML_Form-1.1.2.tgz ...
Starting to download HTML_Form-1.1.2.tgz (13,605 bytes)
...done: 13,605 bytes
install ok: HTML_Common 1.2.1
install ok: HTML_Form 1.1.2
install ok: HTML_Table 1.5 

C:\>pear list

INSTALLED PACKAGES:
===================
PACKAGE        VERSION STATE
Archive_Tar    1.3.0   stable
Console_Getopt 1.2     stable
DB             1.7.3   stable
HTML_Common    1.2.1   stable
HTML_Form      1.1.2   stable
HTML_Table     1.5     stable
Mail           1.1.4   stable
Net_SMTP       1.2.6   stable
Net_Socket     1.0.6   stable
PEAR           1.3.5   stable
PHPUnit        1.2.2   stable
XML_Parser     1.2.5   stable
XML_RPC        1.2.1   stable

The only difference from Linux is that the PEAR DB module comes standard on Windows, yet it does not come standard on Linux.


See code depot for complete scripts


The above book excerpt is from:

Easy Oracle PHP

Create Dynamic Web Pages with Oracle Data

ISBN 0-9761573-0-6   

Mladen Gogala

http://www.rampant-books.com/book_2005_2_php_oracle.htm

 

Download your Oracle scripts now:

www.oracle-script.com

The definitive Oracle Script collection for every Oracle professional DBA

Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster



Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   

 

   

 Copyright © 1996 -2016 by Burleson. All rights reserved.


Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks
 

Hit Counter