Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

There is no libmysql.dll in the above version of PHP5.3, and the trouble caused by it.

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

When a friend downloaded the PHP5.3,PHP5.4 version and wanted to load mysql support, he found that he could not complete the mysql configuration without libmysql.dll files. In fact, the PHP5.3 version started to use mysqlnd libraries instead of libmysql.dll to access MySQL databases, which greatly improved the database access performance of PHP. And mysql is supported by default, which does not need to be manually copied to the windows/system32 directory like libmysql.dll.

Previous versions of PHP accessed the MySQL database through the libmysql client library of the MySQL database, which was written in libmysql client. Although PHP has always performed well in accessing the database through libmysql, it is unable to take advantage of many of the features of PHP itself.

The new mysqlnd provides a high degree of integration with the Zend engine, faster execution speed, less memory consumption, taking advantage of PHP's Stream API, and client segment caching mechanism. Because mysqlnd is through the Zend engine, it provides more advanced features and efficient use of Zend for acceleration

Libmysql accesses the database directly, while mysqlnd accesses the database through Zend.

The above, extracted from http://www.51itz.com/?p=467, is a good explanation that PHP5.3 does not have libmysql.dll, which is also detailed in the PHP manual.

Here are the troubles, especially for beginners.

1. When reading some outdated PHP tutorials, you will mention the libmysql.dll file, or even to copy the file and php5ts.dll to the system32 directory of Windows, so the novice is confused when he finds that there is no libmysql.dll file in the downloaded PHP5.3 package. In fact, PHP intentionally removes libmysql.dll files because it provides a better alternative to the embedded php module "mysqlnd", and because "mysqlnd" is embedded, there is no need for extra libmysql.dll-like files. At the same time, this has no effect on the use of mysql, mysqli, and PDO, because it's just an update to the way mysql interacts at the bottom, and php programmers don't care about it.

two。 When configuring the extension_dir option for php.ini in Windows, make sure it is available before testing the usefulness of an extension. This is a matter of order of doing things, not technical problems. I have wasted a lot of debugging time by using relative paths instead of absolute paths many times! PHP manual mentioned that this option can use relative path or absolute path, but I found that only absolute path can be used under Windows, please pay attention to this!

3. As can be seen from the "MySQL Connectors" section of mysql's official website http://www.mysql.com/downloads/, mysql provides communication interfaces for C++, Java, .net, C, ODBC and other communication interfaces, while the interface to C is libmysql.dll, which can be used for PHP, because PHP is written in C. From this, we can also know that libmysql.dll is a general C interface module, not only applicable to PHP. By contrast, the mysqlnd module developed by PHP itself is proprietary to PHP and complies with its own release protocol.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report