search
HomeBackend DevelopmentPHP ProblemWhat to do if php.ini does not have pdo
What to do if php.ini does not have pdoSep 25, 2020 pm 02:26 PM
php.ini

The solution to the problem that php.ini does not have pdo: first find and open the "php.ini" file; then add the configuration content as "extension=php_pdo.dll extension=php_pdo_mysql.dll"; finally restart apache.

What to do if php.ini does not have pdo

Recommended: "PHP Video Tutorial"

PHP opens PDO_MySQL extension

PHP in lower versions has PDO.Dll, but not PDO_MySQL.Dll, because it is not supported by default, so it is necessary to add it manually.

First, place the pdo_mysql.dll file in the ext directory under the PHP installation root directory

Note that if you configure other directories as extension directories in the php.ini file, then It needs to be placed under the configured directory. Which directory is your PHP extension directory? You need to look at extension_dir = "D:/PHP/php5/ext" in the php.ini file. Which directory is pointed after extension_dir in this line? , that is, which directory to look for PDO_MySQL.Dll.

Then search for "pdo" in the php.ini file. You can find the line ;extension=php_pdo.dll at once and see if there is a semicolon in front of this line. If there is, remove it.

Then look for extension=php_pdo_mysql.dll. If so, remove the preceding semicolon as well.

If not, add it manually. The final two lines of configuration content are as follows:

extension=php_pdo.dll
extension=php_pdo_mysql.dll

Save the php.ini file, restart apache or IIS, and use the phpinfo function to observe whether there is the pdo extension. Under normal circumstances, you can view it normally.

The above is the detailed content of What to do if php.ini does not have pdo. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
php.ini怎么关闭缓存php.ini怎么关闭缓存Mar 15, 2021 am 09:35 AM

php.ini关闭缓存的方法:1、找到并打开php.ini配置文件;2、找到“opcache.enable”和“opcache.enable_cli”选项,将其修改为“opcache.enable=0”和“opcache.enable_cli=0”;3、保存修改后的文件即可。

聊聊如何修改php.ini配置文件聊聊如何修改php.ini配置文件Mar 28, 2023 pm 05:34 PM

PHP.ini是一个PHP配置文件,它被用于控制PHP在服务器上的表现。此文件被用于设置一些变量的值,以便在运行时控制PHP。这篇文章将会向您展示如何修改PHP.ini配置文件的方式,以便控制PHP在您的服务器上的表现。

【整理总结】常见的PHP.ini提示报错及解决方法【整理总结】常见的PHP.ini提示报错及解决方法Mar 20, 2023 pm 04:56 PM

PHP是一种常用的服务器端脚本语言,广泛应用于Web开发领域。然而,在PHP开发过程中,我们经常会遇到各种问题。其中,PHP.ini提示报错是一个常见的问题。

php.ini文件中怎么更改时区php.ini文件中怎么更改时区Mar 22, 2023 pm 03:22 PM

PHP是一种非常流行的服务器端编程语言。在使用PHP开发Web应用程序时,我们有时需要在PHP中设置时区。PHP默认的时区是“UTC(协调世界时)”,这在很多情况下都不是我们想要的时区,因此我们需要在php.ini文件中更改时区设置。本文将介绍如何在php.ini文件中更改时区。

linux php.ini不生效如何解决linux php.ini不生效如何解决May 13, 2023 am 09:10 AM

linuxphp.ini不生效的解决办法:1、重新加载php.ini配置文件;2、在打印出的“phpinfo();”中搜索要修改的配置;3、查看“php-fpm.conf”配置文件,检查是否覆盖了php.ini中的配置即可。linuxphp.ini不生效怎么办?在linux环境下修改php.ini不生效问题排查php.ini修改后不生效主要有如下几种原因:1、修改php.ini配置文件后,没有重新加载php.ini配置文件。2、存在多个php.ini配置文件3、php.ini中的配置被其他文件中

php7 php.ini中没有mysql.all如何解决php7 php.ini中没有mysql.all如何解决May 28, 2023 am 11:59 AM

PHP7中的迁移问题PHP7是PHP的下一个主要版本,它在性能和安全方面都有巨大的改进,因此很多网站都希望尽快升级到PHP7。然而,升级到PHP7并不总是容易的。由于与之前版本的不兼容性,企业可能需要进行一些修改,通常是在应用代码中和PHP配置文件中做一些调整。如上所述,PHP7中的mysql扩展已经被删除,因此如果你在旧版本的PHP中使用了mysql扩展,那么你需要在迁移到PHP7时进行一些修改。你可以选择将mysql扩展替换为mysqli扩展(mysqli是“MySQLImproved”扩展

wamp中怎么修改php.ini文件wamp中怎么修改php.ini文件Mar 20, 2023 pm 03:33 PM

Wampserver是一个可以在Windows计算机上安装Apache、PHP和MySQL的软件包。使用Wampserver可以轻松地在本地计算机上开发和测试PHP网站。在开发过程中,我们可能需要修改PHP配置文件php.ini。本文将介绍如何在Wampserver中修改php.ini文件。

php7改php.ini不起作用怎么办php7改php.ini不起作用怎么办Nov 07, 2022 am 09:54 AM

php7改php.ini不起作用的解决办法:1、检查配置文件的路径;2、对windows下的“php.ini”进行参数的修改;3、设置“post_max_size”的参数为“upload_max_filesize”的N倍;4、重启apache即可。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version