php4是内嵌mysql支持的,所以没有php_mysql.dll
php5里面mysqli支持4.1以上的mysql,mysql支持4.0以下的

解决方案 »

  1.   

    是这样的,正如上面的朋友所说,以下是引用php.net网站上的说明4. PHP 5 no longer bundles MySQL client libraries, what does this mean to me? Can I still use MySQL with PHP? I try to use MySQL and get "function undefined" errors, what gives? Yes. There will always be MySQL support in PHP of one kind or another. The only change in PHP 5 is that we are no longer bundling the client library itself. Some reasons in no particular order: 
    Most systems these days already have the client library installed. Given the above, having multiple versions of the library can get messy. For example, if you link mod_auth_mysql against one version and PHP against another, and then enable both in Apache, you get a nice fat crash. Also, the bundled library didn't always play well with the installed server version. The most obvious symptom of this being disagreement over where to find the mysql.socket Unix domain socket file. Maintenance was somewhat lax and it was falling further and further behind the released version. Future versions of the library are under the GPL and thus we don't have an upgrade path since we cannot bundle a GPL'ed library in a BSD/Apache-style licensed project. A clean break in PHP 5 seemed like the best option. This won't actually affect that many people. Unix users, at least the ones who know what they are doing, tend to always build PHP against their system's libmyqlclient library simply by adding the --with-mysql=/usr option when building PHP. Windows users may enable the extension php_mysql.dll inside php.ini. Also, be sure libmysql.dll is available to the systems PATH. For more details on how, read the FAQ on setting up the Windows systems PATH. Because libmysql.dll (and many other PHP related files) exist in the PHP folder, you'll want to add the PHP folder to your systems PATH. 5. After installing shared MySQL support, Apache dumps core as soon as libphp4.so is loaded. Can this be fixed? 还有下面这个2. Does MySQL work in PHP 5? It seemed to have disappeared. MySQL is supported with the only change being that MySQL support is no longer enabled by default in PHP 5. This essentially means that PHP doesn't include the --with-mysql option in the configure line so that you must now manually do this when compiling PHP. Windows users will edit php.ini and enable the php_mysql.dll DLL as in PHP 4 no such DLL existed, it was simply built into your Windows PHP binaries. Also, the MySQL client libraries are no longer bundled with PHP. More details on this topic are covered in the following FAQ and be sure to read the MySQL section for details on installing MySQL. An example configure line would be --with-mysql=/usr while Windows users will need the libmySQL.dll available to the system. 
    另一个faqDatabases
    There were some changes in PHP 5 regarding databases (MySQL and SQLite). In PHP 5 the MySQL client libraries are not bundled, because of license problems and some others. For more information, read the FAQ entry. There is also a new extension, MySQLi (Improved MySQL), which is designed to work with MySQL 4.1 and above. Since PHP 5, the SQLite extension is built-in PHP. SQLite is an embeddable SQL database engine and is not a client library used to connect to a big database server (like MySQL or PostgreSQL). The SQLite library reads and writes directly to and from the database files on disk. 
    其实这些东西只要你细心一点都可以从php.net网站上查到我引用的地址如下
    http://cn.php.net/manual/en/faq.migration5.php
    http://cn.php.net/manual/en/migration5.databases.php
    令注:如果你想从php4升级到php5强烈建议你细心读一下我最后给你的那个连接,这个里面很详细的讲述了从php 4到php5需要注意的问题。