FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=17016&edit=1

  ID: 17016
  Comment by: jcdr
  Reported By: jessiedeer@hotmail.com
  Summary: Windows: PEAR Installation go-pear.bat config variable
                    php_suffix
  Status: Open
  Type: Bug
  Package: PEAR
  Operating System: Windows 2008 Server 64bit
  Package Version: 1.9.0
  PHP Version: 5.3.1
  New Comment:

...
I'VE LOST THE WHOLE DAY ON THIS !!!

To finally find that the bug comes from the RegExp in builder.php line
245:

        if (preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php(.+)?$/',
                        $this->config->get('php_bin'), $matches)) {

I am using EasyPHP with php_bin = "C:\Program
Files\EasyPHP-DevServer-13.1VC11\binaries\php\php_runningversion\php.exe",

so the RegExp returns:
array (size=4)
   0 => string '\php\php_runningversion\php.exe' (length=31)
   1 => string '\' (length=1)
   2 => string '' (length=0)
   3 => string '\php_runningversion\php.exe' (length=27)

Line 3 should be "php.exe", hence the bug.

BUG: Line 5471 of installer go-pear.phar should be changed
from: if (preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php(.+)?$/',
to: if
(preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php([^\\/\\\\]+)$/',

For those who already installed PEAR, just change the RegExp in
builder.php.


I cannot believe that PEAR developers have left this bug open for nearly
four years, with hundreds of complaints all over the web.


Previous Comments:
------------------------------------------------------------------------

[2012-09-28 19:41:35] felipemanchu

I have the same problem, and spent some time tracing this.
The issue is not that the temporary folder gets deleted is that the
package is extracted outside of the temporary folder.

then when the builder fails to find the extracted package folder it
fails and deletes the temporary folder afterwards.

Hope, that helps some. Still looking to correct this myself. I will post
back if/when I do.

------------------------------------------------------------------------

[2012-04-19 22:21:49] brentnewland

pecl config-set php_suffix \php-cgi.exe
pecl config-set php_bin C:\pathto\php\php-cgi.exe

PEAR\Builder.php: Line 109 to "return $this->raiseError("The DSP
$dir/$dsp does not exist.")" (add the "$dir/")

It appears the temp directory gets destroyed before the install phase.

------------------------------------------------------------------------

[2011-02-12 02:59:07] jojo

after I try to set php_sufgfix with
$ pecl config-set php_suffix .exe
get below:
c:\PHP_CI_env>pecl config-set php_suffix .exe
config-set succeeded
then I try:
c:\PHP_CI_env>pecl install xdebug
downloading xdebug-2.1.0.tgz ...
Starting to download xdebug-2.1.0.tgz (301,354 bytes)
................done: 301,354 bytes
66 source files, building
ERROR: The DSP xdebug.dsp does not exist.

the dsp error still be there.
what's wrong?

------------------------------------------------------------------------

[2010-09-21 16:17:32] konqi

try to set php_sufgfix with
$ pecl config-set php_suffix .exe

------------------------------------------------------------------------

[2010-01-21 11:58:18] amohr

One step further. I dug into the surces and found the following in
C:\progs\php\PEAR\PEAR\config.php

         'php_prefix' => array(
             'type' => 'string',
             'default' => '',
             'doc' => '--program-prefix for php_bin\'s ./configure, used
for pecl installs',
             'prompt' => '--program-prefix passed to PHP\'s
./configure',
             'group' => 'File Locations (Advanced)',
             ),
         'php_suffix' => array(
             'type' => 'string',
             'default' => '',
             'doc' => '--program-suffix for php_bin\'s ./configure, used
for pecl installs',
             'prompt' => '--program-suffix passed to PHP\'s
./configure',
             'group' => 'File Locations (Advanced)',
             ),

This encouraged me to go to the Package Manager Web Frontend (because
directly editing pear.ini makes it useless) and changed the following
values

--program-prefix passed to PHP's ./configure: c:\progs\php
--program-suffix passed to PHP's ./configure: \php-cgi.exe

The Environment variable (the one I believe to be relevant) points to
php-cgi.exe

PHP_PEAR_PHP_BIN = c:\progs\php\php-cgi.exe

I restarted the server to make sure all configuration is set. PECL
commands now return:

---------------------------------

c:\progs\php>pear install enchant
No releases available for package "pear.php.net/enchant" - package
pecl/enchant can be installed with "pe
cl install enchant"
install failed

c:\progs\php>pecl download enchant
downloading enchant-1.1.0.tgz ...
Starting to download enchant-1.1.0.tgz (9,464 bytes)
.....done: 9,464 bytes
File c:\progs\php\enchant-1.1.0.tgz downloaded

c:\progs\php>pecl bundle enchant
downloading enchant-1.1.0.tgz ...
Starting to download enchant-1.1.0.tgz (9,464 bytes)
.....done: 9,464 bytes
Package ready at 'c:\progs\php\ext\enchant'

c:\progs\php>pecl build enchant
Unable to open enchant

---------------------------------

Especially notable is now that there is no more hint on a missing .dsp
file. The question is if that is a good sign. All Errors and Warnings
are gone.

For debugging:

a) the configuration of php_suffix is not documented. I seems odd, that
the values can only be modified in the Package Manager Web Frontend,
which is only" Beta. And it seems odd theat the value for php_suffix
must be given with a preceding backslash. Is that correct?

b) If the above is correct, I believe that these values should be set
during the installation using go-pear.bat

c) It is still unclear why the build fails to open. Is it impossible to
"PECL build" unreleased packages in a windows environment at all? Or is
some "PHP SDK" or "Make Command from GNU" missing? Or - being a windows
user - do I need to manually build Enchant using Visual Studio because
"You can´t always get what you want"?

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
     http://pear.php.net/bugs/bug.php?id=17016

Search Discussions

  • Jessiedeer at Oct 5, 2013 at 5:37 pm
    Edit report at https://pear.php.net/bugs/bug.php?id=17016&edit=1

      ID: 17016
      Comment by: jessiedeer@hotmail.com
      Reported By: andreas dot mohr at teraport dot de
      Summary: Windows: PEAR Installation go-pear.bat config
                         variable php_suffix
      Status: Open
      Type: Bug
      Package: PEAR
      Operating System: Windows 2008 Server 64bit
      Package Version: 1.9.0
      PHP Version: 5.3.1
      Roadmap Versions:
      New Comment:

    Sorry, deleted the second question mark. It should be
    if (preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php([^\\/\\\\]+)?$/',


    Previous Comments:
    ------------------------------------------------------------------------

    [2013-10-05 19:33:42] jcdr

    ...
    I'VE LOST THE WHOLE DAY ON THIS !!!

    To finally find that the bug comes from the RegExp in builder.php line
    245:

            if (preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php(.+)?$/',
                            $this->config->get('php_bin'), $matches)) {

    I am using EasyPHP with php_bin = "C:\Program
    Files\EasyPHP-DevServer-13.1VC11\binaries\php\php_runningversion\php.exe",

    so the RegExp returns:
    array (size=4)
       0 => string '\php\php_runningversion\php.exe' (length=31)
       1 => string '\' (length=1)
       2 => string '' (length=0)
       3 => string '\php_runningversion\php.exe' (length=27)

    Line 3 should be "php.exe", hence the bug.

    BUG: Line 5471 of installer go-pear.phar should be changed
    from: if (preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php(.+)?$/',
    to: if
    (preg_match('/(\\/|\\\\|^)([^\\/\\\\]+)?php([^\\/\\\\]+)$/',

    For those who already installed PEAR, just change the RegExp in
    builder.php.


    I cannot believe that PEAR developers have left this bug open for nearly
    four years, with hundreds of complaints all over the web.

    ------------------------------------------------------------------------

    [2012-09-28 19:41:35] felipemanchu

    I have the same problem, and spent some time tracing this.
    The issue is not that the temporary folder gets deleted is that the
    package is extracted outside of the temporary folder.

    then when the builder fails to find the extracted package folder it
    fails and deletes the temporary folder afterwards.

    Hope, that helps some. Still looking to correct this myself. I will post
    back if/when I do.

    ------------------------------------------------------------------------

    [2012-04-19 22:21:49] brentnewland

    pecl config-set php_suffix \php-cgi.exe
    pecl config-set php_bin C:\pathto\php\php-cgi.exe

    PEAR\Builder.php: Line 109 to "return $this->raiseError("The DSP
    $dir/$dsp does not exist.")" (add the "$dir/")

    It appears the temp directory gets destroyed before the install phase.

    ------------------------------------------------------------------------

    [2011-02-12 02:59:07] jojo

    after I try to set php_sufgfix with
    $ pecl config-set php_suffix .exe
    get below:
    c:\PHP_CI_env>pecl config-set php_suffix .exe
    config-set succeeded
    then I try:
    c:\PHP_CI_env>pecl install xdebug
    downloading xdebug-2.1.0.tgz ...
    Starting to download xdebug-2.1.0.tgz (301,354 bytes)
    ................done: 301,354 bytes
    66 source files, building
    ERROR: The DSP xdebug.dsp does not exist.

    the dsp error still be there.
    what's wrong?

    ------------------------------------------------------------------------

    [2010-09-21 16:17:32] konqi

    try to set php_sufgfix with
    $ pecl config-set php_suffix .exe

    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
         http://pear.php.net/bugs/bug.php?id=17016

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedOct 5, '13 at 5:28p
activeOct 5, '13 at 5:37p
posts2
users2
websitepear.php.net

2 users in discussion

Jessiedeer: 1 post Jcdr: 1 post

People

Translate

site design / logo © 2022 Grokbase