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

ID: 17016
Comment by: brentnewland
Reported By: brent dot newland at casipc dot 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:

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.


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

[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"?

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

[2010-01-21 09:50:19] amohr1

As I see in the description of the preceeding bug it is recommended to
configure PEAR to use the cgi version of the php binary if it exists.

I changed configuration using Pear Web Frontent Package Manager (because
changing the value with a text editor renders pear.ini useless) for "PHP
CLI/CGI binary:" to c:\progs\php\php-cgi.exe. Now the s value is 24
(whatt? why?)
s:24:"c:\progs\php\php-cgi.exe"

I also changed the environment Variable PHP_PEAR_PHP_BIN to
c:\progs\php\php-cgi.exe

I restarted the system to make sure everything is reset.

Here are the results - note the different locations of the tgz´s

---------------------------------------------
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

c:\progs\php>pear install enchant
No releases available for package "pear.php.net/enchant" - package
pecl/enchant can be installed with "pecl 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
WARNING: php_bin c:\progs\php\php-cgi.exe appears to have a suffix
\php-cgi.exe, but config variable php_suffix does not match
Unable to open enchant

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

It would really help to know where the "config variable php_suffix" is
exactly taken from.

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

[2010-01-20 16:03:09] amohr

Description:
------------
I believe go-pear.bat creates a wrong parameter in pear.ini which leads
to an error message "config variable php_suffix does not match" when
commiting PEAR or PECL commands in Wondows environments. Or php_suffix
is compared to a wrong value.

Theres a lot of frustration on the web about problems with php_suffix
variable and missing .dsp files - but no solutions.

I can hopefully contribute to solve respectively clarify that a bit.

During installation of PEAR using go-pear.bat it is required to enter a
correct paramater for Path to CLI php.exe. Entering only the path leads
to an error message. The complete path to php.ini is required to be
configured for the installation to succeed (allthough commonly the "php
binary" under windows is pointed at like c:\php without php.exe). So the
following must be entered:

12. Path to CLI php.exe: C:\progs\php\php.exe

***** In effect the Env Var vor PHP_PEAR_PHP_BIN is set to the complete
Path

"PHP_PEAR_SYSCONF_DIR"="c:\\progs\\php"
"PHP_PEAR_INSTALL_DIR"="c:\\progs\\php\\pear"
"PHP_PEAR_DOC_DIR"="c:\\progs\\php\\docs"
"PHP_PEAR_BIN_DIR"="c:\\progs\\php"
"PHP_PEAR_DATA_DIR"="c:\\progs\\php\\data"
"PHP_PEAR_PHP_BIN"="C:\\progs\\php\\php.exe"
"PHP_PEAR_TEST_DIR"="c:\\progs\\php\\tests"

***** To verify my PEAR installation I installed Web Package Manager

c:\progs\php>pear install PEAR_Frontend_Web-0.7.4

***** I Copied index.php to a webserver location and verified frontend
functionality, which is good. Assuming the PEAR configuration is
correct, I proceeded with the installation of a PEAR Package (in my
case: Enchant):

**** I tried:

c:\progs\php>pecl install enchant
downloading enchant-1.1.0.tgz ...
Starting to download enchant-1.1.0.tgz (9,464 bytes)
.....done: 9,464 bytes
4 source files, building
WARNING: php_bin C:\progs\php\php.exe appears to have a suffix \php.exe,
but config variable php_suffix does not match
ERROR: The DSP enchant.dsp does not exist.

**** Then I tried:

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'

**** So: bundeling seems OK... so I tried building:

c:\progs\php>pecl build enchant
WARNING: php_bin C:\progs\php\php.exe appears to have a suffix \php.exe,
but config variable php_suffix d
oes not match
Unable to open enchant

***** ...Note: the .dsp is not mentioned in this message...


***** First thing I tried then is to modify the value in pear.ini with
text editor:

...s:12:"c:\progs\php"...

***** Result:

c:\progs\php>pecl build enchant
Notice: unserialize(): Error at offset 434 of 556 bytes in Config.php on
line 1050
ERROR: The default config file is not a valid config file or is
corrupted.

***** I changed the value back my text editor to
...s:12:"c:\progs\php\php.exe"... which resolved the "corrupt" message.
I

switched to the Web frontend package manager and modified the
configuration there. I changed the following to values (the latter was
empty):

PHP CLI/CGI binary: c:\progs\php
php.ini location: c:\progs\php

***** I saved the configuration and got the following two results:

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

c:\progs\php>pecl install enchant
downloading enchant-1.1.0.tgz ...
Starting to download enchant-1.1.0.tgz (9,464 bytes)
.....done: 9,464 bytes
4 source files, building
ERROR: The DSP enchant.dsp does not exist.

***** This might be a clue: I observed following behaviour in pear.ini
on saving the configuration using the web frontend

When changing the value for PHP CLI/CGI binary, the parameter
...s:12:"c:\progs\php"... changes to

...s:20:"c:\progs\php\php.exe"... (S:25 in a second try) when I change
back to the "correct" value it changes back to

...s:12:"c:\progs\php"...

***** In the Web Frontend Package Manager I do not understand the
parameters needed for "--program-prefix passed to PHP's ./configure:"
And could not find documentation on theses parameters. Possibly this has
to do with the "missing .dsp file" message...?

After my tests (see above) I find Enchant data in three different
Locations. I do not understand why. I would not expect anything to go to
the php/ext directory that is not compiled.

c:\progs\php\ext\enchant (seems to be complete w. 14 files and 3 folders
incl. credits and enchant-1.1.0.tgz)
c:\progs\php\tmp\enchant (only for files containing .m4, .w32, .h and
.c)
c:\progs\php\tmp\enchant-1.0.1 (seems to be complete w. 13 files and 3
folders but no credits and no tar)

Last but not least, the answer to the question often postet on the web
that leads to some frustration:
What is a .dsp file? (Refer to ERROR: The DSP enchant.dsp does not
exist. above). For anyone who gets here looking for
answers - working in a MS environment DSP is commonly associated with
Microsoft Developer Studio project. I did not manage to compile PHP Code
of the enchant sources yet using Visual C++ Express 2008 - it seems to
be time consuming for beginners. If anyone needs to go throught it, the
following offers good reference:
http://blog.astrumfutura.com/archives/327-Compiling-PHP-for-Windows-Vista-using-Visual-C++-Express-2008-Seriously!.html
http://www.phpbuilder.com/manual/en/install.windows.building.php

I for my part decided not to use Enchant or any other .dll that is not
released (for Windows)... for now.

I now use Environment Variable PHP_PEAR_PHP_BIN = c:\progs\php\php.exe
and "PHP CLI/CGI binary" = c:\progs\php for the best possible running
state:

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

c:\progs\php>PECL install enchant
downloading enchant-1.1.0.tgz ...
Starting to download enchant-1.1.0.tgz (9,464 bytes)
.....done: 9,464 bytes
4 source files, building
ERROR: The DSP enchant.dsp does not exist.

Maybe when the Error message is printed out you could also print out the
hint that the "PHP SDK" is needed for creating a .dsp file or that under
Windows, this Extension needs to be manually compiled with whatever
method...

Test script:
---------------
- Install PHP 5.3.1 on a Windows 2008 System
- Use go-pear.bat to install pear.
- For Path to CLI php.exe try to use c:\php, note the Error Message. Use
c:\php\php.exe and submit
- After the installation, try to issue "PECL INSTALL Enchant" command.
Note the warning "php_suffix does not match".
- Issue the command "pear install PEAR_Frontend_Web-0.7.4" do the
necessary copying and open the Web Frontend
- In the configuration, change the value for PHP CLI/CGI binary from
c:\progs\php\php.exe to c:\progs\php. Save the configuration
- Issue the command "PECL INSTALL Enchant" again and note that the
message "php_suffix does not match" is gone.




Expected result:
----------------
Its not a script. But after successfully installing PEAR under windows
with no error message or warning using go-pear.bat, the PECL Install
$Extension command should run without showing the message "php_suffix
does not match".

The PECL command provides a .dsp file and installs or compiles the
enchant extension correctly. Otherwise a hint is given how to resolve
the issue or what to look for. Is that a result of "compilation failed"
or "preparation of compilation failed because xyz.file is missing or it
simply does not work under Windows and needs to be compiled manually"...
I would expect to find documentation on the PEAR Website what is to be
done if "No releases" are "available for package" for Windows users
(I.e. if no releases are available and you are a windows user you need
to manually compile using gnu make or whatever).

Actual result:
--------------
After successfully installing PEAR under windows with no error messages
or warnings using go-pear.bat, the PECL Install $Extension command runs
showing the Warning "php_suffix does not match".

ERROR: The DSP enchant.dsp does not exist. is shown.

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedApr 19, '12 at 9:29p
activeApr 19, '12 at 9:29p
posts1
users1
websitepear.php.net

1 user in discussion

Brentnewland: 1 post

People

Translate

site design / logo © 2022 Grokbase