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







Install PEAR available in PHP 5.2.17



Information
PEAR (= PHP Extension and Application Repository) is a framework and distribution system for reusable PHP components.

More information about PEAR can be found at: http://pear.php.net

Operating system used
Windows Vista Home Premium SP 2

Software prerequisites
PHP 5.2.17

Procedure
  1. After you installed PHP, see quick guide "Installing PHP5.2.17 on Apache 2.2.11",
    PEAR is already available. See C:\tools\php-5.2.17-Win32-thread-safe\PEAR. You just need to set it up.

  2. Go to the unzipped php directory:
    E.g.: C:\tools\php-5.2.17-Win32-thread-safe

  3. Open a dos window and run the PEAR installer, type:

    C:\tools\php-5.2.17-Win32-thread-safe>go-pear.bat

    Are you installing a system-wide PEAR or a local copy?
    (system|local) [system] :
    local
    Please confirm local copy by typing 'yes' :
    yes

    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 base ($prefix)        : c:\tools\php-5.2.17-Win32-thread-safe
    2. Temporary directory for processing : c:\tools\php-5.2.17-Win32-thread-safe\tmp
    3. Temporary directory for downloads  : c:\tools\php-5.2.17-Win32-thread-safe\tmp
    4. Binaries directory                 : c:\tools\php-5.2.17-Win32-thread-safe
    5. PHP code directory ($php_dir)      : c:\tools\php-5.2.17-Win32-thread-safe\pear
    6. Documentation directory            : c:\tools\php-5.2.17-Win32-thread-safe\docs
    7. Data directory                     : c:\tools\php-5.2.17-Win32-thread-safe\data
    8. User-modifiable configuration
       files directory                    : c:\tools\php-5.2.17-Win32-thread-safe\cfg
    9. Public Web Files directory         : c:\tools\php-5.2.17-Win32-thread-safe\www
    10. Tests directory                   : c:\tools\php-5.2.17-Win32-thread-safe\tests
    11. Name of configuration file        : c:\tools\php-5.2.17-Win32-thread-safe\pear.ini
    12. Path to CLI php.exe               : .

    1-12, 'all' or Enter to continue:
    [Enter]
    Beginning install...
    Configuration written to C:\tools\php-5.2.17-Win32-thread-safe\pear.ini...
    Initialized registry...
    Preparing to install...
    installing phar://go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.3.3.tar...
    installing phar://go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.2.3.tar...

    installing phar://go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.9.0.tar...
    installing phar://go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.0.2.tar...
    installing phar://go-pear.phar/PEAR/go-pear-tarballs/XML_Util-1.2.1.tar...
    install ok: channel://pear.php.net/Archive_Tar-1.3.3
    install ok: channel://pear.php.net/Console_Getopt-1.2.3
    install ok: channel://pear.php.net/Structures_Graph-1.0.2
    install ok: channel://pear.php.net/XML_Util-1.2.1
    install ok: channel://pear.php.net/PEAR-1.9.0
    PEAR: Optional feature webinstaller available (PEAR's web-based installer)
    PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
    PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)

    PEAR: To install optional features use "pear install pear/PEAR#featurename"

    ******************************************************************************
    WARNING! The include_path defined in the currently used php.ini does not
    contain the PEAR PHP directory you just specified:
    <c:\tools\php-5.2.17-Win32-thread-safe\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] :
    Y

    php.ini <C:\Windows\php.ini> include_path updated.

    Current include path : .;c:\tools\php-5.2.8-Win32\pear
    Configured directory : C:\tools\php-5.2.17-Win32-thread-safe\pear
    Currently used php.ini (guess) : C:\Windows\php.ini
    Press Enter to continue:
    [Enter]

    ** WARNING! Old version found at C:\tools\php-5.2.17-Win32-thread-safe, please remove it or be sure to use the new c:\tools\php-5.2.17-win32-thread-safe\pear.bat command

    The 'pear' command is now at your service at c:\tools\php-5.2.17-win32-thread-safe\pear.bat
    Press any key to continue . . .




  4. Open a dos window and type: pear

    You should see:

    CommandsDescription
    build Build an Extension From C Source
    bundle Unpacks a Pecl Package
    channel-add Add a Channel
    channel-alias Specify an alias to a channel name
    channel-delete Remove a Channel From the List
    channel-discover Initialize a Channel from its server
    channel-info Retrieve Information on a Channel
    channel-login Connects and authenticates to remote channel server
    channel-logout Logs out from the remote channel server
    channel-update Update an Existing Channel
    clear-cache Clear Web Services Cache
    config-create Create a Default configuration file
    config-get Show One Setting
    config-help Show Information About Setting
    config-set Change Setting
    config-show Show All Settings
    convert Convert a package.xml 1.0 to package.xml 2.0 format
    cvsdiff Run a "cvs diff" for all files in a package
    cvstag Set CVS Release Tag
    download Download Package
    download-all Downloads each available package from the default channel
    info Display information about a package
    install Install Package
    list List Installed Packages. In The Default Channel
    list-all List All Packages
    list-channels List Available Channels
    list-files List Files In Installed Package
    list-upgrades List Available Upgrades
    login Connects and authenticates to remote server [Deprecated in favor of channel-login]
    logout Logs out from the remote server [Deprecated in favor of channel-logout]
    makerpm Builds an RPM spec file from a PEAR package
    package Build Package
    package-dependencies Show package dependencies
    package-validate Validate Package Consistency
    pickle Build PECL Package
    remote-info Information About Remote Packages
    remote-list List Remote Packages
    run-scripts Run Post-Install Scripts bundled with a package
    run-tests Run Regression Tests
    search Search remote package database
    shell-test Shell Script Test
    sign Sign a package distribution file
    svntag Set SVN Release Tag
    uninstall Un-install Package
    update-channels Update the Channel List
    upgrade Upgrade Package
    upgrade-all Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters]

    Usage: pear [options] command [command-options] <parameters>
    Type "pear help options" to list all options.
    Type "pear help shortcuts" to list all command shortcuts.
    Type "pear help <command>" to get the help for the specified command.


  5. To check which PEAR packages have been installed, open a dos window and type:

    pear list

    You should see:

    INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:
    =========================================
    PACKAGE            VERSION     STATE
    Archive_Tar        1.3.3       stable
    Console_Getopt     1.2.3       stable
    PEAR               1.9.0       stable
    Structures_Graph   1.0.2       stable
    XML_Util           1.2.1       stable


  6. Restart Apache.