I have found a lot of instances of this problem but no matter what I try it still does not work.
I am running MAMP with Apache server on a windows 10. For the database management i am using PostgreSQL 9.5.
My error says:
Fatal error: Uncaught PDOException: could not find driver in C:\MAMP\htdocs\Database assignment\vendor\propel\propel\src\Propel\Runtime\Connection\PdoConnection.php:49 Stack trace: #0 C:\MAMP\htdocs\Database assignment\vendor\propel\propel\src\Propel\Runtime\Connection\PdoConnection.php(49): PDO->__construct('pgsql:host=loca...', 'postgres', 'prlbrd68', Array) #1 C:\MAMP\htdocs\Database assignment\vendor\propel\propel\src\Propel\Runtime\Adapter\Pdo\PdoAdapter.php(70): Propel\Runtime\Connection\PdoConnection->__construct('pgsql:host=loca...', 'postgres', 'prlbrd68', Array) #2 C:\MAMP\htdocs\Database assignment\vendor\propel\propel\src\Propel\Runtime\Connection\ConnectionFactory.php(41): Propel\Runtime\Adapter\Pdo\PdoAdapter->getConnection(Array) #3 C:\MAMP\htdocs\Database assignment\vendor\propel\propel\src\Propel\Runtime\Connection\ConnectionManagerSingle.php(76): Propel\Runtime\Connection\ConnectionFactory::create(Array, Object(Propel\Runtime\Adapter\Pdo\PgsqlAdapter)) #4 C:\MAMP\htdocs\Database assignment\vendor\propel\ in C:\MAMP\htdocs\Database assignment\vendor\propel\propel\src\Propel\Runtime\Connection\ConnectionFactory.php on line 43
From what I can understand the Apache server can not access the pdo_pgsql driver. I have modified the php.ini file inside Mamp/conf/php7.0.6 to include the extension=php_pdo_pgsql.dll as well as the php_pgsql.dll .
When I call the phpinfo() it tells me my set PDO is mysql but that is not the case. I have checked if the I am modifying the correctly loaded php.ini file. I have made sure that in my system PATH variable I have also added the location of the .dll's. I have tried to add another module to the server in the MAMP/conf/Apache/httpd.conf file by using the line " LoadFile "C:/Program Files/PostgreSQL/9.5/bin/libpq.dll" ". SOmeone sugeste that adding this line would force load the libraries, however when I added this line the server would not start at all. I have been stuck on this for a whole day. Any help is welcome!