Jonathan,

It looks like you are mixing threaded and non-threaded libraries.
I assume PHP is non-threaded here, ensure you are using the non-threaded
version of iODBC and check with your MyODBC driver maintainer for a
libmyodbc.so that is non-threaded.

Also, you may wish to just post these question on the DB list - the cross
post to the general list isn't necessary.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Data Integration Technology Providers

> -----Original Message-----
> From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 28, 2001 11:26 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] iODBC Troubles
>
>
> I first tried unixODBC in order to get ODBC functionality on my
> FreeBSD 4.2
> box with PHP 4.0.3 on Apache 1.3.14. It didn't work too well, and I kept
> getting an error about undefined symbols like pthread_mutex_init or
> something when trying to run command-line sample applications. So someone
> suggested I use iODBC instead and I responded:
>
> Okay, I uninstalled unixODBC and tried iODBC ( I actually began to try it
> before, but then thought of something that might work on
> unixODBC, so I went
> back to it ).
>
> Now iODBC's odbctest application works with myODBC installed.
> However, after
> I recompile PHP with iodbc parameters, I try to run the odbc_connect
> function. If I misspell the DSN or use a non-existent one, I will get the
> following message:
>
> Warning: SQL error: [iODBC][Driver Manager]Data source name not
> found and no
> default driver specified. Driver could not be loaded, SQL state IM002 in
> SQLConnect
>
> Now, if I spell the defined DSN correctly and reload the page, the
> application just hangs. If I look at my error logs I see this:
>
> /usr/libexec/ld-elf.so.1: /usr/local/lib/libmyodbc.so: Undefined symbol
> "pthread_mutex_init"
>
> Once for every time I reload the page. This is odd, because this was a
> problem message I was receiving when testing unixODBC on the command line.
> After I installed iODBC, the command-line application was able to connect
> and query perfectly! So what gives? Why does one application work and
> another does not?
>
> I set the following environment vars - some may not make sense, but I've
> been trying everything:
>
> $EnvVars["LD_LIBRARY_PATH"] = "/usr/local/lib:/usr/include";
> $EnvVars["LD_RUN_PATH"] = "/usr/local/lib:/usr/include";
> $EnvVars["ODBCINI"] = "/usr/local/src/odbcsdk/doc/odbc.ini";
> $EnvVars["PATH"] =
> "/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/bin:/usr/X11R
> 6/bin:/hom
> e/suroot/bin:/usr/libexec:/usr/include";
>
> foreach($EnvVars as $Key => $Val)
> {
>  putenv("$Key=$Val");
>  $HTTP_ENV_VARS["$Key"] = $Val;
> }
>
> I can see via phpinfo() that they are getting set. Any more ideas?
>
> - Jonathan
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to