English 中文(简体)
go-pear.bat file won t install PEAR at all
原标题:
  • 时间:2009-12-10 18:54:18
  •  标签:
  • php
  • pear

I just made a new install of WAMP on Windows 7 and I m trying to get PEAR to work. Things are going wrong from the very beginning. When I try to execute the go-pear.bat file, it shows me this.

phar "C:wampinphpphp5.3.1PEARgo-pear.phar" does not have a signature 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: wampinphpphp5.3.1PEARgo-pear.phar on line 1236 Press any key to continue . . .

How can I help it that the file doesn t have a signature?

最佳回答

This blog-post might interest you : Pear: “go-pear.phar” Does Not Have a Signature

It explains how to change a configuration option in php.ini to avoid this error message, and what s said it for WAMP 2.0 and PHP 5.3, so might work in your case.

问题回答

Just in case anyone comes here from Google: We fixed the .phar download yesterday on http://pear.php.net/go-pear.phar.

In some circumstances (well, actually only on Windows :-)) the file could corrupt from the download. So for example, a lot of people wanted to download it and ended up copy-pasting the contents, etc..

We ve asked some people on Windows to test and so far it worked for everyone I talked to. Let me know if it works for you.

Let’s try this from the PEAR directory. cd PEAR and let’s try that again.

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

Now the PEAR install runs fine.

If the go-pear.bat file won t run, try this procedure:

  1. issue this command with cmd.exe:

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

    Allow the installer to edit php.ini.

  2. Check the contents of PEAR_ENV.reg - located in the PEAR directory YOUR-PHP-INSTALL-PATHPEAR folder (ex. c:PHPPEARPEAR_ENV.reg) to be sure it has the paths right. Edit as needed and run it. Check your path and environment variables for correctness, then do the same in go-pear.bat and php.ini (mine needed to be corrected to point correctly to my php.exe file).

  3. Issue the

    pear
    

    command at the command line to test the path configuration. It will run and do everything but still can t install packages due to a missing dependency.

  4. Download and uncompress Structures_Graph from the PEAR website (direct link).The file has three folders - docs, Structures and tests. Copy the Structure folder into the YOUR-PHP-INSTALL-PATHPEAR folder (ex. c:PHPPEARStructures).

  5. Issue the command:

    pear install Structures_Graph
    

    Even though the files are present, Structures_Graph is not really installed unless you issue the above command.

  6. Issue the command:

    pear update PEAR

  7. Enjoy!

    Good luck and thanks to Marcos Roriz for the graph dependency half of my solution!





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签