Bug #55194 [NEW]: PEAR doesn't work with empty php.ini files
From:
Operating system: Irrelevant
PHP version: Irrelevant
Package: Unknown/Other Function
Bug Type: Bug
Bug description:PEAR doesn't work with empty php.ini files
Description:
------------
I'm using PEAR 1.9.0, but newer version are also affected.
PEAR fails to open and parse an empty php.ini file because the return value
of file() is not checked correctly (see attached patch).
It's easy to end up with an empty php.ini file when you set the php_ini
configuration variable to a custom location.
The attached patch applies to SVN r313186
Best regards
PS: It's not clear where this bug should be reported, the PEAR website
doesn't seem to have the concept of bugs in PEAR itself but only in
packagesâ¦
Test script:
---------------
#!/bin/sh
php_ini=mktemp
pear config-set php_ini $php_ini user
pecl install mongo
rm -f $php_ini
Expected result:
----------------
[..]
install ok: channel://pecl.php.net/mongo-1.2.1
Extension mongo enabled in php.ini
%
Actual result:
--------------
[...]
install ok: channel://pecl.php.net/mongo-1.2.1
php.ini "/tmp/tmp.V6wU8jpMA4" could not be read
You should add "extension=mongo.so" to php.ini
%
--
Edit bug report at https://bugs.php.net/bug.php?id=55194&edit=1
--
Try a snapshot (PHP 5.2): https://bugs.php.net/fix.php?id=55194&r=trysnapshot52
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55194&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55194&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=55194&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55194&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=55194&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=55194&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=55194&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=55194&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=55194&r=support
Expected behavior: https://bugs.php.net/fix.php?id=55194&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=55194&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=55194&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=55194&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55194&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=55194&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=55194&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=55194&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=55194&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=55194&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=55194&r=mysqlcfg
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55194&r=trysnapshot54
Thread (5 messages)
- kalessin at kalessin dot fr