As reply to the entry from 20-Mar-2005 01:19:
The trick seems to be to insert the php directory into your path before any of the other libmysql.dll locations.
章 52. 数据库问题本节包括 PHP 和数据库之间关系的常见问题。是的,PHP 事实上可以访问如今现有的任何数据库。
在 Windows 机器中,可以简单地使用内置的 ODBC 支持和正确的 ODBC 驱动程序。 在 Unix 机器中,可以用 Sybase-CT 驱动程序来访问 Microsoft SQL Server,因为它们的协议是(至少大部分)兼容的。Sybase 做了一个 Linux 系统下所需库的免费版本。对于其它 Unix 操作系统,需要和 Sybase 联系来得到正确的库。同样也看看下一个问题的回答。 可以。如果完全在 Windows 9x/Me/NT/2000 下运行,那已经有了所有所需的工具,可以用 ODBC 和 Microsoft's ODBC drivers for Microsoft Access database。 如果在 Unix 下运行 PHP 而想访问 Windows 中的 MS Access,那需要 Unix ODBC 驱动程序。OpenLink Software 有一个基于 Unix 的 ODBC 驱动程序可以做这件事。 另外一个替代方案是用带 Windows ODBC 驱动的 SQL Server 并用它来储存数据,可以通过 Microsoft Access(用 ODBC)和 PHP(用内置驱动)来访问,或者用一个 Access 和 PHP 都识别的中间文件格式,例如 flat 文件或者 dBase 数据库。关于这一点 OpenLink Software 的 Tim Hayes 写道:
还有一个已被证实有效的选择是在 Windows 下用 MySQL 和它的 MyODBC 驱动来同步数据库。Steve Lawrence 写道:
提示与技巧:
看上去最有可能的是,PHP 4 在编译时使用了
重新编译 PHP 4,并在标记中加上 MySQL 的路径“--with-mysql=/your/path/to/mysql”通常会解决此问题。 是的。PHP 总是支持 MySQL 的,不是这种方法就是那种方法。在 PHP 5 中唯一的改变就是不再绑定客户端库本身了。部分原因是(无特定顺序):
事实上这并不会影响到太多人。UNIX
用户,起码是那些知道自己在做什么的人,往往会在编译
PHP 时通过 如果你的 MySQL 库依靠 pthreads 连接就会这样。检查是否使用了 ldd。如果有的话,下载 MySQL 源程序编译,或者从源 rpm 的 spec 文件中去掉打开 threaded client 的选项然后重新编译。以上任一建议会解决此问题。然后再加上新的 MySQL 库重新编译 PHP。 6. 为什么我得到类似如下的错误:“Warning: 0 is not a MySQL result index in <file> on line <x>”或者“Warning: Supplied argument is not a valid MySQL result resource in <file> on line <x>”? 你试图用一个值为 0 的结果资源号。0 表示你的查询由于某原因失败了,需要在提交查询之后和在使用返回结果资源号之前检查错误。正确的方法是用类似如下的代码:
kalle dot kipina at gmail dot com
09-Aug-2007 12:06
As reply to the entry from 20-Mar-2005 01:19:
me at hotmail dot com
27-Jun-2007 03:37
To access a SQL database you can just use this code:
cantelow at csd dot net
30-Aug-2006 05:48
On Tru64 5.1A, we had what looked like the mysql pthread problem, with php 5 shared lib compiling fine but crashing upon firing up apache. But, our problem turned out to be this: we were running 2 versions of mysql and attempting to use --with-mysql=/usr/local/newmysql5 to link to our running test mysql5 distribution. php was still linking against an old /usr/local/lib/mysql mysqlclient library, however (or setting up to use old /usr/local/lib/mysql shared mysqlclient.so, not sure which).
Kaleabtesfaye at hotmail dot com
13-Apr-2006 07:56
If Some1 is intersted on PHP with MS Access
jstoner at NOSPAM dot opsource dot net
01-Mar-2006 09:56
Building in a Redhat 4 64-bit environment:
James Coburn
01-Feb-2006 01:31
An easy way to compile PHP5 when you have installed mysql, but
plandis98 at yahoo dot com
18-Dec-2005 06:46
If one is using PHP on Windows to connection to MS SQL Server and does not want to pass credentials via the mssql_connect but instead use MS Connectionless NT Authentication, what is the proper syntax/usage?
djlopez at gmx dot de
08-Sep-2005 12:51
How to compile PHP5 when you have installed mysql, but
20-Mar-2005 09:19
Just a quick note which may help Windows users setting up PHP/Apache/MySQL. I was receiving these two error messages on Apache startup: 1) "The procedure entry point mysql_thread_end could not be located in the dynamic link library LIBMYSQL.dll" and 2) "PHP Startup: Unable to load dynamic library '<my php installation dir>/ext/php_mysql.dll' - The specified procedure could not be found". After checking that libmysql.dll did exist in my root PHP install dir, and that this dir was in my path, I determined that the problem was an older version of libmysql.dll. My solution was to search all harddrives for this file (I found 6 copies of 5 different versions), and rename all of them except my PHP install dir copy. PHP, Apache and MySQL all function as expected after making this change.
knb at gfz-potsdam dot de
11-Oct-2004 09:53
This is a crucial piece of information for SYBASE users:
Simon
05-Nov-2003 12:38
You can connect to Microsoft SQL Server from PHP without using ODBC. It's even detailed in the PHP docs! Wow! You can find the details at http://www.php.net/manual/en/ref.mssql.php
jastern at uci dot edu
26-Sep-2002 09:24
i made some notes of trials/tribulations setting up PHP (on a linux redhat 7.3 box) to connect (via interbase/ODBC client libraries) to an interbase server on another machine:
michal at tuxy dot org
27-Feb-2002 07:22
You can approch problem with mysql and pthread by recompiling/linking apache (1.3.2x) with pthread library instead of removing pthread from mysql. This solved my problem with apache dumping core with php (3.0.18 and php 4.1.1) and mysql. | ||||