0

I am working on a project using an iis server and database. I need to make a connection to the database using php and through my research so far I think that a non-thread safe PDO is the best driver to use.

I am able to get php working on the server, I can get the phpInfo() to print out on the server. Using PDO::getAvailableDriver() I can see that I have MySQL and odbc. So will I be using the MySQL PDO driver to make the connection? When I try to make the connection I get a 500 error. I'm not sure if I need different drivers, they aren't installed correctly, or I'm making the call incorrectly. Any help is appreciated.

Here is my connection statement that is in a try/catch block. $conn = new PDO("mysql:host=$servername;dbname=$dbName", $username, $password);

0 Answers0