I've installed Propel correctly according the installation manual (http://propelorm.org/documentation/01-installation.html). I checked that PHP was loading pdo_mysql driver so I made a phpinfo() test and It showed that everything was correct. Nevertheless, when I made a simple Query using Propel, as showing below:
<?php
//define('BASE_PATH', '/Users/jvarela/Development/Crack/Crack-Server');
define('BASE_PATH', '/Library/WebServer/Documents');
ini_set('include_path', BASE_PATH.':'.ini_get('include_path').':'.BASE_PATH.'/propel/vendor/propel/src');
spl_autoload_extensions(".php"); // comma-separated list
spl_autoload_register();
// setup the autoloading
require_once 'propel/vendor/autoload.php';
// setup Propel
require_once 'propel/vendor/generated-conf/config.php';
echo 'All ok, for now...';
$a = new JugadorQuery();
$a->findPK(1);
?>
I'm receiving the error below.
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /Library/WebServer/Documents/propel/vendor/propel/src/propel/runtime/connection/connectionfactory.php on line 44
( ! ) PDOException: could not find driver in /Library/WebServer/Documents/propel/vendor/propel/src/propel/runtime/connection/pdoconnection.php on line 50
The strange thing is that if I just create a PDO object like the example below, I get no error and It connects to the Database properly
$test = new PDO("mysql:host=localhost","user","pass")
Have anyone got the same error or known if I made a mistake installing Propel v2.0 properly? Thank you
PD: I'm using Apache v2.2, PHP v5.4 and MySQL v 5.6
Regards.