rocky48 Posted October 26, 2022 Share Posted October 26, 2022 I am trying to use my WAMP server to test code that is using PDO. Most sites tell me to open the php.ini file and find the extension extension=php_pdo_mysql and remove the semi colon from the begining. The only extension I can find is: extension=pdo_mysql, which has had the semicolon removed. i have tried installing the driver and install this: instantclient-basic-windows.x64-21.7.0.0.0dbru.zip and add the location to my environment path, which I have done. I've run out of ideas, so can someone tell me where I am going wrong? Quote Link to comment https://forums.phpfreaks.com/topic/315459-cant-run-pdo-for-msql-as-cant-find-drivers/ Share on other sites More sharing options...
Barand Posted October 26, 2022 Share Posted October 26, 2022 Check the output from phpinfo(); This will tell you two things relevant to this which php.ini file is currently in use and which you should be editting whether PDO is already installed, for example Quote Link to comment https://forums.phpfreaks.com/topic/315459-cant-run-pdo-for-msql-as-cant-find-drivers/#findComment-1601936 Share on other sites More sharing options...
rocky48 Posted October 26, 2022 Author Share Posted October 26, 2022 I am using PHP Version 8.1.0 The PDO versions as shown in picture. Looks like its running pdo_mysql? According to all the stuff I am reading on the internet, I should have an extension: php_pod_mysql How does that help? Quote Link to comment https://forums.phpfreaks.com/topic/315459-cant-run-pdo-for-msql-as-cant-find-drivers/#findComment-1601940 Share on other sites More sharing options...
rocky48 Posted October 26, 2022 Author Share Posted October 26, 2022 I am using PHP Version 8.1.0 The PDO versions as shown in picture. Looks like its running pdo_mysql? According to all the stuff I am reading on the internet, I should have an extension: php_pod_mysql How does that help? Quote Link to comment https://forums.phpfreaks.com/topic/315459-cant-run-pdo-for-msql-as-cant-find-drivers/#findComment-1601941 Share on other sites More sharing options...
Barand Posted October 26, 2022 Share Posted October 26, 2022 According to that phpinfo() output, you do have the extension pdo_mysql (In your extension folder there should be the file php_pdo_mysql.dll) Quote Link to comment https://forums.phpfreaks.com/topic/315459-cant-run-pdo-for-msql-as-cant-find-drivers/#findComment-1601942 Share on other sites More sharing options...
rocky48 Posted October 27, 2022 Author Share Posted October 27, 2022 Is the dll supposed to be in this folder: C:\wamp64\bin\php\php8.1.0 ? I am running 8.10. Still not working?? Quote Link to comment https://forums.phpfreaks.com/topic/315459-cant-run-pdo-for-msql-as-cant-find-drivers/#findComment-1601954 Share on other sites More sharing options...
rocky48 Posted October 27, 2022 Author Share Posted October 27, 2022 I have just tried adding the 'extension=php_pdo_mysql ' to php.ini I restarted the services, but still not working? Quote Link to comment https://forums.phpfreaks.com/topic/315459-cant-run-pdo-for-msql-as-cant-find-drivers/#findComment-1601955 Share on other sites More sharing options...
rocky48 Posted October 27, 2022 Author Share Posted October 27, 2022 Thought the log file might help! php_error.txt Quote Link to comment https://forums.phpfreaks.com/topic/315459-cant-run-pdo-for-msql-as-cant-find-drivers/#findComment-1601956 Share on other sites More sharing options...
mac_gyver Posted October 27, 2022 Share Posted October 27, 2022 the spelling in the PDO DSN connection string is mysql, not msql Quote Link to comment https://forums.phpfreaks.com/topic/315459-cant-run-pdo-for-msql-as-cant-find-drivers/#findComment-1601957 Share on other sites More sharing options...
rocky48 Posted October 27, 2022 Author Share Posted October 27, 2022 Better have a whip round and buy me some new glasses! I always miss the most obvious mistake! Quote Link to comment https://forums.phpfreaks.com/topic/315459-cant-run-pdo-for-msql-as-cant-find-drivers/#findComment-1601958 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.