简体   繁体   English

PDO安装-启用pdo_mysql

[英]PDO installation - enable pdo_mysql

I surfed a lot and a lot, many have same problem. 我冲浪了很多很多,很多都有相同的问题。 no answer have solved my problem , this question is the closest one.it's answer didn't help me. 没有答案解决了我的问题,这个问题是最接近的问题。它的回答没有帮助我。 I can't comment over answer to get more details. 我无法评论答案以获取更多详细信息。 I need 10 more reputation to do that. 我需要10个以上的声誉才能做到这一点。 I'm using appserv I've changed the setting required in php.ini 我正在使用appserv,但我更改了php.ini中所需的设置

            extension=php_pdo.dll
            extension=php_pdo_firebird.dll
            extension=php_pdo_mssql.dll
            extension=php_pdo_mysql.dll
            extension=php_pdo_oci.dll
            extension=php_pdo_oci8.dll
            extension=php_pdo_odbc.dll
            extension=php_pdo_pgsql.dll
            extension=php_pdo_sqlite.dll

and phpinfo() still showing only this: 和phpinfo()仍然只显示以下内容:

phpinfo()

I still have same error: 我仍然有同样的错误:

"could not find driver" “找不到驱动程序”

I wanna add the pdo for mysql as well. 我也想为mysql添加pdo。 what the right, complete and simple way to make it works? 有什么正确,完整和简单的方法可以使它起作用? I made this tutorial too. 我也做了本教程

after a day of research, I found my problem! 经过一天的研究,我发现了我的问题! this may be useful for new developers: it works for me using Appserv 2.5.10 on Windows 8: 这对新开发人员可能有用:在Windows 8上使用Appserv 2.5.10对我有用:

  1. first make sure that you edit the right php.ini file. 首先,请确保您编辑正确的php.ini文件。 Do that by going to view the phpinfo(), search for Configuration File (php.ini) Path in the info page, you will find the directory that you need to configure the file in 为此,请查看phpinfo(),在信息页面中搜索配置文件(php.ini)路径 ,您将在以下位置找到配置文件所需的目录
  2. after Editing the php.ini file, save the changes and restart your device 编辑php.ini文件后,保存更改并重新启动设备

at first i didn't now how to restart the Apache, i thought it might be a cmd command or clicking a patch file. 起初,我现在不知道如何重新启动Apache,我认为这可能是cmd命令或单击补丁文件。 but it raises errors for me when i used apache_start.bat patch. 但是当我使用apache_start.bat补丁时,这为我带来了错误。 restarting the PC will do fine! 重启电脑就可以了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM