Edit report at http://bugs.php.net/bug.php?id=54276&edit=1
ID: 54276
Comment by: carsten_sttgt at gmx dot de
Reported by: jinmoku at hotmail dot com
Summary: ini_get can't read pdo.dsn.*
Status: Open
Type: Bug
Package: PDO related
Operating System: Win 7
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
> I doubt ini_get should use such hacks.
With get_cfg_var() I can get such values:
| var_dump(get_cfg_var('pdo.dsn.test'));
| string(15) "sqlite::memory:"
| 5.3.0 get_cfg_var() was fixed to be able to return "array" ini
options.
(At least the manual should describe this restriction for ini_get[_all]
or phpinfo.)
Previous Comments:
------------------------------------------------------------------------
[2011-03-17 10:23:17] [email protected]
Interesting. But well in the sense of PHP they don't exist but PDO uses
a hack to use them anyways. I doubt ini_get should use such hacks.
------------------------------------------------------------------------
[2011-03-17 08:44:47] carsten_sttgt at gmx dot de
@johannes
> The is no such ini entries.
The manual [1] describes this as an INI option like any other:
| pdo.dsn.* string [php.ini only]
So it should be possible to use ini_get() to get the value.
------------------------------------------------------------------------
[2011-03-16 18:45:38] [email protected]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php
The is no such ini entries. ini_get() only works for settings defined by
PHP.
------------------------------------------------------------------------
[2011-03-16 16:55:05] jinmoku at hotmail dot com
Description:
------------
ini_get can't read pdo.dsn.* in the php.ini
Test script:
---------------
//ini : pdo.dsn.test = sqlite::memory:
$dbh = new PDO('test');
var_dump(ini_get('pdo.dsn.test'));
Expected result:
----------------
string(15) "sqlite::memory:"
Actual result:
--------------
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54276&edit=1