PHP 4.0 Bug #8386: Dynamic module of ODBC

From: Date: Sat, 23 Dec 2000 00:15:17 +0000
Subject: PHP 4.0 Bug #8386: Dynamic module of ODBC
Groups: php.dev 
Request: Send a blank email to php-dev+get-42153@lists.php.net to get a copy of this message
From: edlman@dzungle.ms.mff.cuni.cz Operating system: RedHat 6.1/6.2 Linux PHP version: 4.0.3pl1 PHP Bug Type: Dynamic loading Bug description: Dynamic module of ODBC I was trying to compile PHP 4.0.3pl1 with ODBC as shared module, but I was not successfull. I debugged the configure script to find out that the ODBC module can be made as shared only if '$shared' is set to 'shared' or 'yes' (line +- #26000) if test "$shared" != "shared" && test "$shared" != "yes"; then I searched all the parts of the script where ODBC drivers are processed to find out that the '$shared' is set only in DBMaker. But there is a way to make the ODBC modules shared. All we need is to set the '$shared' to 'shared' or 'yes'. This can be achieved by using --with-gd=shared. Strange huh? The trick is that the '$shared' variable is not reset after previous or before actual use. So its value is set to 'yes' and kept until the ODBC test section is reached. And that's the place where it does the job. I suppose this is a bug in some m4 file or in some script which generates configure. I assume that the configure script should not act like it does. The variables used in some block should be reset before they're used. But when this is fixed there is no way to make odbc module shared (until you use DBMaker). So it would be great if you modify other ODBC configs to allow them to be shared. I'd do this by myself, but I don't know what and where to modify, the job would be much easier for you. I have tested iodbc and unixODBC. Or did I something wrong by making the ODBC module shared when it's not officially supported? Will it work? I did not test it yet. Anyway I wanted to report the bug. -- Edit Bug report at: http://bugs.php.net/?id=8386&edit=1

« previous php.dev (#42153) next »