Home » PEAR » PEAR » Bug #444
/usr/local/bin/pear: segmentation fault
Details
| Submitted | 2003-12-17 08:58 UTC |
|---|---|
| From | sw at telemedia dot ch |
| Status | Bogus |
| Package | PEAR |
| PHP Version | Irrelevant |
| OS | OpenBSD |
| Roadmaps | (Not assigned) |
Comments
[2003-12-17 08:58 UTC] sw at telemedia dot ch
Description:
------------
the latest php package available with OpenBSD is 3.2.3. after installing the package and pear from the OpenBSD port the pear script dies with:
Reproduce code:
---------------
<b2-143:/usr/ports/www/php4/extensions/pkg>#pear --help
Expected result:
----------------
<b2-143:/usr/ports/www/php4/extensions/pkg>#pear --help
Usage: pear [options] command [command-options] <parameters>
Type "pear help options" to list all options.
Type "pear help <command>" to get the help for the specified command.
Commands:
login
logout
config-show
config-get
config-set
install
uninstall
upgrade
package
package-info
package-list
package-validate
cvstag
list-installed
shell-test
remote-package-info
list-upgrades
list-remote-packages
Actual result:
--------------
Segmentation fault.
when i change /usr/local/bin/pear from:
#!/usr/local/bin/php -Cq
<?php // -*- PHP -*-
to:
#!/usr/local/bin/php -cq
<?php // -*- PHP -*-
it works fine.
# php -h
does not offer a '-C' argument.
[2003-12-17 09:36 UTC] sw at telemedia dot ch
the latest php package available with OpenBSD is 3.2.3.
[2003-12-17 09:57 UTC] sw at telemedia dot ch
--shell
<b2-143:/usr/ports/www/php4/extensions/pkg>#php -v
4.2.3
<b2-143:/usr/ports/www/php4/extensions/pkg>#pear -V
unrecognized option -- V
Usage: pear [options] command [command-options] <parameters>
Type "pear help options" to list all options.
Type "pear help <command>" to get the help for the specified command.
Commands:
login
logout
config-show
config-get
config-set
install
uninstall
upgrade
package
package-info
package-list
package-validate
cvstag
list-installed
shell-test
remote-package-info
list-upgrades
list-remote-packages
--shell
there is no -V parameter for pear:
---snip
foreach ($opts as $opt) {
$param = !empty($opt[1]) ? $opt[1] : true;
switch ($opt[0]) {
case 'd':
list($key, $value) = explode('=', $param);
$config->set($key, $value, 'user');
break;
case 'D':
list($key, $value) = explode('=', $param);
$config->set($key, $value, 'system');
break;
case 's':
$store_user_config = true;
break;
case 'S':
$store_system_config = true;
break;
case 'u':
$config->remove($param, 'user');
break;
case 'v':
$config->set('verbose', $verbose + 1);
break;
case 'q':
$config->set('verbose', $verbose - 1);
break;
default:
// all non pear params goes to the command
$cmdopts[$opt[0]] = $param;
break;
}
}
--- snip
i got this from PEAR.php:
$Id: PEAR.php,v 1.32.2.2 2002/04/09 19:04:07 ssb Exp $
Cheers,
-S
[2003-12-17 10:10 UTC] sw at telemedia dot ch
thanks for your help pierre.
maybe this is something for the OpenBSD packager. the problem (imho) is that ppl with few or no knowledge of php/pear (maybe a sys admin who installs the php package) may not find this problem quickly ...
>BSD port, even if it is an usefull system, should
>actually not be used to install pear (and/or php but
>this is another topic).
OpenBSD has a very clean directory layout (other than eg. linux). this is the reason why the package will most probably rather be installed trough the package manager than from source (due to the preset installation paths for lib, binm, etc...).
since the pear script itself came originally from here (altough its old) i tought i'd mention the problem (with the same version on linux i don't get a segmentation fault, altough the -C option is also not available).
Cheers,
-S
[2003-12-17 10:22 UTC] sw at telemeida dot ch
i just installed the latest pear version.
i checked the HEAD version of the pear script in the CVS:
http://cvs.php.net/co.php/php-src/pear/scripts/pear.sh?r=1.2.2.2
php is called with -C and will, therefore still crash with php 4.2 versions.
with -c /path/to/ini or by just ommitting the -C arg it works fine.
my question: why does the php binary crash on OpenBSD when the -C arg is supplied (other unknown args will just display the php -h witouth dieing)?
would i have to install a newer php version then (something past 3.3)?
Cheers,
-Simon
[2003-12-17 10:23 UTC] sw at telemeida dot ch
ok, got that. thanks again for your help!
Cheers,
-S