PHP PEAR

PHP PEAR

  • PHP PEAR Manual
  • PEAR MDB2
  • Manual installation of PEAR Packages
  • PEAR DB Package
  • define variable: PHP_PEAR_INSTALL_DIR for the command line tool pear to check the pear directory
  • PHP PEAR at PHP’s CVS Web
  • install beta package in PEAR
    pear install -beta

  • Install a local copy of PEAR library for shared host enviornment
    1. For PEAR 1.4+
    2. Create a local config file:
      pear config-create [base-path] [/path/pearrc]

    3. Initial install base on the config file, files will put to base-path:
      pear -c /path/pearrc install Archive_Tar PEAR Console_Getopt XML_RPC

    4. Using the local pear from commandline:
      pear -c /path/pearrc [command]

    5. Using the local pear from apache conf:
      php_value include_path “.:/base-path"

    6. Using the local pear from inside php:
      ini_set('include_path', '~/pear/lib' . PATH_SEPARATOR  . ini_get('include_path'));
      
      // From PHP 4.3.0 onward, you can use the following,
      // which especially useful on shared hosts:
      set_include_path('~/pear/lib' . PATH_SEPARATOR . get_include_path());
      

發表迴響 (評論)