php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8386 Dynamic module of ODBC
Submitted: 2000-12-22 19:15 UTC Modified: 2001-06-12 17:08 UTC
From: edlman at dzungle dot ms dot mff dot cuni dot cz Assigned:
Status: Closed Package: Dynamic loading
PHP Version: 4.0.3pl1 OS: RedHat 6.1/6.2 Linux
Private report: No CVE-ID: None
 [2000-12-22 19:15 UTC] edlman at dzungle dot ms dot mff dot cuni dot cz
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-12 17:08 UTC] sniper@php.net
These all should be fixed in PHP 4.0.6RC3.
Found here:

http://www.php.net/~andi/php-4.0.6RC3.tar.gz

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 19:01:29 2024 UTC