Home » Database » MDB2 » Bug #8296
No Extended (mysql) functions available
Details
| Submitted | 2006-07-26 11:23 UTC |
|---|---|
| From | jonathan dot martens at gmx dot net |
| Assigned | lsmith |
| Status | Closed |
| Package | MDB2 |
| PHP Version | 5.0.3 |
| OS | Win XP SP2 |
| Roadmaps | (Not assigned) |
Comments
[2006-07-26 11:23 UTC] jonathan dot martens at gmx dot net
Description:
------------
As I am moving from DB to MDB2 I would like to use the getAssoc functionality for the mysql driver. As this is located in the Extended module I tried to load this module.
However this results in a missing file warning. After a inspection of the file tree a Extended directory does not seem to exist in the MDB2\Driver subtree.
Installed relevant PEAR modules:
- PEAR (1.4.10)
- MDB2 (2.2.0)
- MDB2_Driver_mysql (1.2.0)
Test script:
---------------
<?php
/*
* Use define statements for the DB_* constants
* or replace them with the desired value
*/
$dsn = array(
'phptype' => DB_TYPE,
'hostspec' => DB_HOST,
'database' => DB_DATABASE,
'username' => DB_USERNAME,
'password' => DB_PASSWORD
);
$options = array(
'debug' => 2,
'portability' => MDB2_PORTABILITY_ALL
);
$mdb =& MDB2::connect($dsn, $options);
$mdb->loadModule('Extended');
?>
Expected result:
----------------
Expected result is a flawless load of the Extended module and not a file not found warning on line 914 of MDB2.php:
Actual result:
--------------
Loading of the Extended module results in a file not found warning for MDB2.php at line 914:
Warning in C:\Program Files\php\php-5.0.3\PEAR\MDB2.php on line 914: fopen(MDB2\Driver\Extended\mysql.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: no such file or directory
[2006-07-26 12:49 UTC] jonathanmartens at gmx dot net
David,
This is not a full path bug I think as the filename is build from the class name on line 1801 of MDB2.php using a strreplace replacing the undesscores for the directory separator:
$file_name = str_replace('_', DIRECTORY_SEPARATOR, $class_name).'.php';
I have grepped through the tree and there seems to be no getAssoc function what so ever other then in the MDB2/Extended.php file.
Could it be that this feature still has to be implemented in the MDB2_Driver_mysql class?
Thanks so far!
[2006-07-26 12:50 UTC] jonathanmartens at gmx dot net
Lukas,
I don't see much use in surpressing a warning that is relevant and shows that the codebase is incomplete or not functioning like it should. If I surpress the warning then the file and hence the medthod is still not loaded.
Thanks anyhow!
[2006-09-21 16:46 UTC] tloo at saltstorm dot net
Just noticed that this bug is still present in MDB2 2.2.2 hosted on a Slackware 10.1 / PHP 5.1.6 system with the following php.ini settings:
safe_mode = On
safe_mode_gid = On
safe_mod_include_dir = <PEAR basedir>
The safe_mode exception workaround in function MDB2::fileExists, will not work on my system (giving the same error as initially reported in this report (#8296)). Reverting the conditional clause to (!ini_get(..)) making the else statement run instead, I get around this however. This bug is still not resolved, I'd say.