PHP 5.3 Windows and PEAR (go-pear.phar)

Some users have reported that the windows builds of PHP 5.3 are not able to open the shipped go-pear.phar file.

As a workaround, users can run the distributed phar with php -d phar.require_hash=0 go-pear.phar or download and use the http://pear.php.net/go-pear non-pharred version.

This entry was posted in Announcements. Bookmark the permalink.

43 Responses to PHP 5.3 Windows and PEAR (go-pear.phar)

  1. Brett Bieber says:

    Users can also use: php -d phar.require_hash=0 go-pear.phar

  2. Pingback: PEAR Blog: PHP 5.3 Windows and PEAR (go-pear.phar) | Webs Developer

  3. Pingback: PEAR Blog: PHP 5.3 Windows and PEAR (go-pear.phar) | DreamNest - Technology | Web | Net

  4. Sudhir says:

    go-pear.phar file is available but php_phar.dll extension is missing due to that unable to download PEAR libraries

  5. Brian Whalley says:

    Users can also use: php -d phar.require_hash=0 go-pear.phar

    oh no we can’t!!!

    C:\php>php -d phar.require_hash=0 go-pear.phar
    PHP Warning: PHP Startup: Unable to load dynamic library ‘C:\php\ext\php_exif.dll’ – The specified module could not be
    found.
    in Unknown on line 0
    PHP Warning: Module ‘bz2′ already loaded in Unknown on line 0
    PHP Warning: Module ‘curl’ already loaded in Unknown on line 0
    PHP Warning: Module ‘fileinfo’ already loaded in Unknown on line 0
    PHP Warning: Module ‘gd’ already loaded in Unknown on line 0
    PHP Warning: Module ‘gettext’ already loaded in Unknown on line 0
    PHP Warning: Module ‘gmp’ already loaded in Unknown on line 0
    PHP Warning: Module ‘imap’ already loaded in Unknown on line 0
    PHP Warning: Module ‘intl’ already loaded in Unknown on line 0
    PHP Warning: Module ‘ldap’ already loaded in Unknown on line 0
    PHP Warning: Module ‘mbstring’ already loaded in Unknown on line 0
    PHP Warning: Module ‘mysql’ already loaded in Unknown on line 0
    PHP Warning: Module ‘mysqli’ already loaded in Unknown on line 0
    PHP Warning: Module ‘openssl’ already loaded in Unknown on line 0
    PHP Warning: Module ‘pdo_mysql’ already loaded in Unknown on line 0
    PHP Warning: Module ‘PDO_ODBC’ already loaded in Unknown on line 0
    PHP Warning: Module ‘pdo_sqlite’ already loaded in Unknown on line 0
    PHP Warning: Module ‘pgsql’ already loaded in Unknown on line 0
    PHP Warning: Module ‘soap’ already loaded in Unknown on line 0
    PHP Warning: Module ‘sockets’ already loaded in Unknown on line 0
    PHP Warning: Module ‘sqlite3′ already loaded in Unknown on line 0
    PHP Warning: Module ‘tidy’ already loaded in Unknown on line 0
    PHP Warning: Module ‘xmlrpc’ already loaded in Unknown on line 0
    PHP Warning: Module ‘xsl’ already loaded in Unknown on line 0
    Could not open input file: go-pear.phar

    C:\php>

  6. Behzad says:

    It doesn’t worked for me!
    it said:
    phar “C:\php\go-pear.phar” does not have a have signaturePHP warning: require_once(phar://go-pear.phar/index.php): failed to open stream: phar “C:\php\go-pear.phar” does not have a have signature in C:\php\go-pear.phar on line 1236

  7. Todd says:

    Just downloaded and installed PHP 5.3 (VC9). I don’t see go-pear anywhere in the PHP install folder.

    Am I missing something?

    Todd

  8. Mike says:

    Brett, that is already exactly what the announcement said?

    I reinstalled xampp to have to latest pear-version, but I have big problems using the phar file. I have no idea where to use it for so far, but I really dont understand how this:
    php -d phar.require_hash=0 go-pear.phar
    has to be used or typed in a command line. I already tried to figure out on a forum, so far wiithout succes.
    Php is invalid command I get all the time. Where the hell do I have to type this piece of code to be executed??
    Thank you

  9. PNowicki says:

    When using the non-pharred version in the link, don’t just save the page to a .php file and try to run it. You’ll get some mis-converted characters and HTML header stuff the messes up the file. Just select and copy the text shown on the web page to an empty Notepad file and provide the .php extension. Then open this from a browser link on your local web server. As a newbie, it took me a couple tries to figure this out.

  10. Vinnie says:

    I still get errors when trying to install even after using the new go-pear above

    C:\php5>pecl install apc
    downloading APC-3.0.19.tgz …
    Starting to download APC-3.0.19.tgz (115,735 bytes)
    ….done: 115,735 bytes
    47 source files, building
    WARNING: php_bin c:\php5\php.exe appears to have a suffix 5\php.exe, but config
    variable php_suffix does not match
    running: msdev APC.dsp /MAKE “APC – Release”
    ERROR: Did not understand the completion status returned from msdev.exe.

  11. Mujahid says:

    how does this work? where do I do this?

    php -d phar.require_hash=0 go-pear.phar

  12. what a dumb run around to get pear installed on my windows xp machine. My webhost using C-Panel has a slick interface which puts the required files in the home php directory. I just wanted to double check what files are unpacked on the latest version compared to what is on the webhost compared to the sample code on yet another website. I know asking for an msi file is asking a lot, but the build behind the msi file derives from an xml document.

  13. Pablo says:

    php -d phar.require_hash=0 go-pear.phar

    Warning: rename(C:\Program Files\PHP\PEAR\tmp\PDO_MYSQL\.tmpphp_pdo_mysql_sqlstate.h,C:\Program Files\PHP\PEAR\tmp\PDO_MYSQL\php_pdo_mysql_sqlstate.h): File exists in C:\Program Files\PHP\PEAR\PEAR\Installer.php on line 6797 source files, building WARNING: php_bin C:\Program Files\PHP\.\php.exe appears to have a suffix .exe, but config variable php_suffix does not match ERROR: The DSP PDO_MYSQL.dsp does not exist.

  14. It’s not working for me either. Tried using a normal go-pear copy and paste, and the actual .phar file in the php 5.3 distro. Get signature errors for the phar package, and deprecation issues with the go-pear link.

  15. James says:

    X=your php folder drive letter
    you must have your X:\Php folder in your path and you must open a command prompt and navigate to X:\Php\pear and execute the command from there!

  16. Alberto Saavedra says:

    After having a really hard time, I figured it out.
    I am using WAMPSERVER2.0, by default pear is not installed, and when you try to install it via the go-pear.bat , you will get this error:

    phar “C:\wamp\bin\php\php5.3.0\PEAR\go-pear.phar” does not have a signaturePHP W
    arning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha
    r error: invalid url or non-existent phar “phar://go-pear.phar/index.php” in C:\
    wamp\bin\php\php5.3.0\PEAR\go-pear.phar on line 1236

    Warning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha
    r error: invalid url or non-existent phar “phar://go-pear.phar/index.php” in C:\
    wamp\bin\php\php5.3.0\PEAR\go-pear.phar on line 1236
    Press any key to continue . . .

    To avoid this what you have to do is this:

    -open a command prompt (cmd.exe)
    -go to the folder where the go-pear.phar is (cd C:\wamp\bin\php\php5.3.0\PEAR).
    -then type:
    php -d phar.require_hash=0 go-pear.phar
    3-Follow the straight-forward instructions and you are done!!!

    NOTE: the php directory has to be in the PATH environment variable.

    Good Luck

  17. Randy says:

    Thank you Alberto!

  18. nomac says:

    It looks like Pear is installed well but when I try to using it, with pear_frontend_web, got following:

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Config.php on line 650

    Any ideas?

  19. nomac says:

    It looks like Pear is good installed (Vista, Wamp2.0i) but when I try to connect the PEAR_Frontend_Web I’ve getting following error(s):

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Config.php on line 650

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Config.php on line 697

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Config.php on line 757

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Config.php on line 786

    … etc

    Somebody an idea?

    Thanks

  20. Paul says:

    If you’ve previously installed PEAR on your Windows PC, don’t forget to remove your PEAR environment variables under Control Panel -> System -> Advanced -> Environment Variables then reboot your PC.

  21. tj says:

    Just wanted to let you guys know with windows vista, wampserver2, php version 5.3.0. i had to go into my PEAR folder and cut the go-pear.phar out of it and paste it on the php5.3.0 folder and run

    php -d phar.require_hash=0 go-pear.phar

    because i kept getting that ‘php’ on the command line was not recognized.

    all is well now :)

  22. Andi says:

    Windows Installer used?
    - You need to download the Zip Package and extract go-pear.bat as well as the folder PEAR/ including the file go-pear.phar
    (You will need a foldner named extras, while your extracting the other stuff just grab the empty folder extras provided in the ZIP file – for convenience. We windows guys are lazy bastards after all LOL)

    Mike:
    - If php is an unknown command, you dont have PHP loaded in your environment. Fix that by adding the path to your php folder to the windows environt variables path. While you are at it check if the environt variable PHPRC exists. It should also hold the path to your php folder. You need to re-logon to Windows for this to take effect. Test by opening a cmd window and entering php -v. The cmd window should respond the php version…

    A couple of the windows guys are asking what to do with the line:
    php -d phar.require_hash=0 go-pear.phar
    Actually, that scares me. But I remember me being a newbie a few years back – so here goes: open go-pear.bat in notepad, put a rem before the php command that is in it and copy the line of code from here into it. Save it… go-pear.bat then will look something like this:
    —————————-
    @ECHO OFF
    set PHP_BIN=php.exe
    rem %PHP_BIN% -d output_buffering=0 PEAR\go-pear.phar
    php -d phar.require_hash=0 PEAR\go-pear.phar
    pause
    —————————-

    Double click it after you saved it (no, not the white space in the editor… close notepad and double click go-pear.bat in the folder – *ggg* – sorry, I needed that) and off you go.

  23. mivtech says:

    Thank Alberto Saavedra,
    that was work succesfully..

  24. Pingback: Developing using WampServer 2: additions | Patrick's playground

  25. klinyo says:

    am stuck with the script below.it brins up a blank page i cant seem to know where the problem is as i have installed PEAR and PEAR DB correctly.
    please assist

    connect(“mysqli://root:klinyo@localhost/password_test”);

    if($dat->isError($dbh)){
    print “Connect failed “;
    print “Error Message: “.$dbh->getMessage();
    print “Error details: “.$dbh->getUserInfo();
    print ” Debug Info”.$dbh->getDebugInfo();
    exit();

    }
    echo “Connection OK”;
    ?>

  26. Miguel says:

    Alberto, i had that problem and your solution didn’t work exactly. To type
    php -d phar.require_hash=0 go-pear.phar
    it said php is not a command
    then i went to the folder php5.3.0 and type
    php -d phar.require_hash=0 PEAR/go-pear.phar
    then it worked.
    Thank you for your help.

  27. Pingback: Installare PEAR e PHPUnit su Windows Vista usando WAMP | unodeitanti.com

  28. jdpond says:

    Microsoft updated its c++ to 2008. 2008 no longer contains msdev but does have vcbuild under vc/packages. However, don’t think the pecl invoking command line works – no idea how to fix it.

  29. Anil says:

    I am getting a error
    I have located the go-pear.bat file
    i have also directed where PEAR file is located like this
    @ECHO OFF
    set PHP_BIN=php.exe
    %PHP_BIN% -d output_buffering=0 c:\wamp\bin\php\php5.3.0\pear\go-pear.phar
    pause

    but when i execute it is showing me the error
    as
    phar “c:\wamp\bin\php\php5.3.0\pear\go-pear.phar” does not have a signaturePHP warning: require_once: failed to open stream: phar error: invalid url or non-existent phar “phar://go-phar/index.php ….. on line 1236

    warning ….. on line 1236

    where to give the path index.php file
    please guide me properly

  30. crazy says:

    hi, when i execute

    it is showing me follow, then don’t continue.
    ======================================

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

    1-12, ‘all’ or Enter to continue:

    ========================================
    when i push Enter, still show it.any way?

  31. clarajune says:

    Look for a file “phar.phar.bat” in your d:\php root. If you don’t have it unzip the VC9 non thread to get it.
    Run the “phar.phar.bat” and after that run the “go-pear.bat” as you already did.
    Good luck!

  32. KJ says:

    Thanks Alberto, that fixed it for me also.

  33. Jay says:

    ENV: Php532 on Vista

    Thanks!

    ‘php -d phar.require_hash=0′ (at command prompt from PEAR dir)

    .. worked great.

    Regarding install process not going anywhere (or continuing) upon Enter – I thought I experienced the same thing..but upon specifying option 12 ..which had no default, it continued on successfully.

  34. Benjy says:

    I’m having exactly the same problem as Crazy.

    Anyone got past this point? Even when i enter the path to the php.exe, it says it doesn’t have it and relists the 12 options.

    :(

  35. Evan Q says:

    To crazy : U must be choosing “system” in the beginning, try “local”, it works fine with Alberto Saavedra’s method! Thanks Alberto!

  36. just some help says:

    u got to see that there is one thing true.. u dont read the fine print… error on all my students comes from not reading the error messages there are very detail.. watch–

    the last line asks for: C:\wamp\bin\php\php5.3.0\data\PEAR_Frontend_Web\data\templates

    WELL THIS DOES EXISTS!! THE CORRECT IS

    C:\wamp\bin\php\php5.3.0\PEAR\data\PEAR_Frontend_Web\data\templates

    That path change makes the difference here so you can go to say

    C:\wamp\bin\php\php5.3.0\PEAR\data

    copy the folder: PEAR_Frontend_Web to

    C:\wamp\bin\php\php5.3.0\data\

    then all the Deprecated: Assigning the return value of …. are just a matter of setting the error_reporting or display_errors o whatever you like to your needs on your php.ini under C:\wamp\bin\apache\Apache2.2.11\bin
    to

  37. just some help says:

    error_reporting = E_ALL & ~E_DEPRECATED
    display_errors = On

    would be a solution since the last update to the PEAR_Frontend_Web package was last update some time in 2007 or if am not wrong 2003 and since it is beta.. we need a code for this… or just keep using the command-line.. joke

    with this solution be aware that for example regular expresion (ie. ereg) are DEPRECATED!!

  38. chip says:

    PHP 5.3 Windows and PEAR for thanx.

  39. amit says:

    i am trying to do
    php -d phar.require_hasg=0 PEAR/go-pear.phar
    on wamp 2.1 and php version 5.3.5

    but i am getting this error please help

    c:\wamp\bin\php\php5.3.5>php -d phar.require_hasg=0 PEAR/go-pear.phar
    phar “C:\wamp\bin\php\php5.3.5\PEAR\go-pear.phar” does not have a signaturePHP W
    arning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha
    r error: invalid url or non-existent phar “phar://go-pear.phar/index.php” in C:\
    wamp\bin\php\php5.3.5\PEAR\go-pear.phar on line 1236
    PHP Stack trace:
    PHP 1. {main}() C:\wamp\bin\php\php5.3.5\PEAR\go-pear.phar:0

    Warning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha
    r error: invalid url or non-existent phar “phar://go-pear.phar/index.php” in C:\
    wamp\bin\php\php5.3.5\PEAR\go-pear.phar on line 1236

    Call Stack:
    0.0207 719288 1. {main}() C:\wamp\bin\php\php5.3.5\PEAR\go-pear.phar:0

    c:\wamp\bin\php\php5.3.5>

  40. Matt Pitts says:

    When I run this: C:\PHP>php go-pear.phar

  41. tintin98 says:

    workaround fixed. Just copy PEAR folder from older version of PHP, then run

    php -d phar.require_hash=0 go-pear.phar

    all went well.

  42. Pingback: Como instalar PEAR en PHP 5.3.10 sobre IIS 7.5 | Mtro. Guillermo Humberto Vera Amaro

  43. Pingback: How to configure PEAR for Zend Server Community Edition on Windows 7 | Hampel Group