I have a windows classic hosting with iis and php 5.3 in godaddy there my website connects to a mysql database
this is my connection
<?php
$dsn = 'mysql:host=dbgts.db.2365702.3ed.hostedresource.net;dbname=dbase';
$username = 'user';
$password = '12345';
function conecta() {
global $dsn, $username, $password;
try {
$db = new PDO($dsn, $username, $password);
$db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
} catch (PDOException $e) {
die( 'Query failed: ' . $e->getMessage() );
}
}
function validaSesion(){
if(isset($_SESSION['usuario'])){
return true;
}else{
return false;
}
}
?>
but when making the connection I get this error Query failed: could not find driver
contact me with support and say that I have to make a php5.ini file and then call the pdo and mysql libraries already believe it but it still does not work.
this is my php5.ini
rAddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4
register_globals = Off
session.save_path = "D:\Hosting65702\html\session"
display_errors = ON
log_errors = On
error_log="D:\Hosting65702\html"
memory_limit = 48M
max_execution_time = 240
max_input_time = 180
post_max_size = 8M
file_uploads = On
upload_max_filesize = 256M
extension_dir = "D:\Hosting65702\html\ext"
upload_tmp_dir = "D:\Hosting65702\html\temp"
[PHP_PDO]
extension=D:\Hosting65702\html\ext\php_pdo.dll
[PHP_PDO_MYSQL]
extension=D:\Hosting65702\html\ext\php_pdo_mysql.dll
extension=D:\Hosting65702\html\ext\php_mysql.dll
extension=D:\Hosting65702\html\ext\php_mysqli.dll
extension=D:\Hosting65702\html\ext\php_curl.dll
[Pdo]
pdo_mysql.default_socket="MySQL"
[Pdo_mysql]
pdo_mysql.cache_size=2000
pdo_mysql.default_socket=
Create a folder in the root of my hosting called ext where I put all the dlls but in my file info.php I keep coming out PDO drivers no value and in extension_dir I get C: \ php53 \ ext