Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /Applications/MAMP/htdocs/4d/index.php:12 Stack trace: #0 /Applications/MAMP/htdocs/4d/index.php(12): PDO->__construct('4D:host=127.0.0...', 'test', 'test') #1 {main} thrown in /Applications/MAMP/htdocs/4d/index.php on line 12
  2.  
  3. $dsn = '4D:host=127.0.0.1;charset=UTF-8';
  4. $user = 'test';
  5. $pass = 'test';
  6.  
  7. // Connection to the 4D SQL server
  8. $db = new PDO($dsn, $user, $pass);
  9.  
  10. try {
  11. echo "OK";
  12. } catch (PDOException $e) {
  13. die("Error 4D : " . $e->getMessage());
  14. }
  15.  
  16. pecl install channel://pecl.php.net/pdo_4D-0.3
  17.  
  18. /Applications/MAMP/bin/php/(phpversion)/bin/pecl install channel://pecl.php.net/pdo_4D-0.3
  19.  
  20. $odbc_string = 'DRIVER={4D v14 ODBC Driver};SSL=false;SERVER=<ip>;PORT=<19812>;UID=<user>;PWD=<password>';
  21. $connect = odbc_connect($odbc_string,"","");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement