PHP

 
 
PHP (= Hypertext Preprocessor) is an HTML-embedded server-side scripting language.

PHP is distributed at no charge for commercial or non-commercial use. For more information read the LICENSE information.

More information about PHP can be found at: http://www.php.net

PHP manuals can be found at:
http://www.php.net/manual/en/
http://devzone.zend.com/manual/

The latest PHP version can be downloaded from: http://www.php.net/downloads.php

rss feed






Install PEAR packages in PHP 5.2.8



Information
none

Operating system used
Windows Vista Home Premium SP 1

Software prerequisites
PHP 5.2.8
PEAR in PHP 5.2.8


Procedure
  1. After you have run go-pear.bat, see Install PEAR available in PHP 5.2.8 you can now install PEAR packages using the pear command.

  2. To determine which package to install go to http://pear.php.net/packages.php and select the package.
    In the following example, installation details about the MDB2 package is gathered.

    • Select Database.

      Select database

    • Select MDB2.

      Select MDB2

    • Select download.

      Select download

    • Select the latest stable version.

      Select version

    • Read the information about this package and also it dependencies.
      The pear command is displayed: pear install MDB2-2.4.1

      The install caommand

  3. Open a dos window and type:
    pear install MDB2-2.4.1

    You will see the following:

    downloading MDB2-2.4.1.tgz ...
    Starting to download MDB2-2.4.1.tgz (119,790 bytes)
    ..........................done: 119,790 bytes
    install ok: channel://pear.php.net/MDB2-2.4.1
    MDB2: Optional feature fbsql available (Frontbase SQL driver for MDB2)
    MDB2: Optional feature ibase available (Interbase/Firebird driver for MDB2)
    MDB2: Optional feature mysql available (MySQL driver for MDB2)
    MDB2: Optional feature mysqli available (MySQLi driver for MDB2)
    MDB2: Optional feature mssql available (MS SQL Server driver for MDB2)
    MDB2: Optional feature oci8 available (Oracle driver for MDB2)
    MDB2: Optional feature pgsql available (PostgreSQL driver for MDB2)
    MDB2: Optional feature querysim available (Querysim driver for MDB2)
    MDB2: Optional feature sqlite available (SQLite2 driver for MDB2)
    MDB2: To install optional features use "pear install pear/MDB2#featurename"


  4. I have installed MySQL 5.1 and should therefore install a MySQL driver for MDB2. According to the output message above, the optional feature mysql should be used. Type:
    pear install pear/MDB2#mysql

    You will see the following:

    Skipping package "pear/MDB2", already installed as version 2.4.1
    downloading MDB2_Driver_mysql-1.4.1.tgz ...
    Starting to download MDB2_Driver_mysql-1.4.1.tgz (36,481 bytes)
    ..........done: 36,481 bytes
    install ok: channel://pear.php.net/MDB2_Driver_mysql-1.4.1




  5. Follow the same procedure to gather installation details about the Log package.
    In this example the following Log package is installed, type:
    pear install Log-1.11.3

    You will see the following:

    WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
    Did not download optional dependencies: pear/DB, pear/Mail, use --alldeps to download automatically
    pear/Log can optionally use package "pear/DB" (version >= 1.3)
    pear/Log can optionally use package "pear/Mail"
    pear/Log can optionally use PHP extension "sqlite"
    downloading Log-1.11.3.tgz ...
    Starting to download Log-1.11.3.tgz (42,960 bytes)
    ............done: 42,960 bytes
    install ok: channel://pear.php.net/Log-1.11.3


  6. Show all installed packages, type:
    pear list

    You will see the following:
    
    INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:
    =========================================
    PACKAGE           VERSION STATE
    Archive_Tar       1.3.2   stable
    Console_Getopt    1.2.3   stable
    Log               1.11.3  stable
    MDB2              2.4.1   stable
    MDB2_Driver_mysql 1.4.1   stable
    PEAR              1.7.2   stable
    Structures_Graph  1.0.2   stable
    
    
  7. To remove an installed package, type:
    pear uninstall <PACKAGE>

    For example:
    pear uninstall MDB2-2.4.1