Here is my connection:
- Code: Select all
<?php
$db_host = "localhost";
$db_user = "epiales";
$db_pass = 'testing';
$db_name = "testing";
/* $con = mysqli_connect($mysql_hostname, $mysql_user, $mysql_password, $mysql_database) */
/* or die("Oops some thing went wrong");
*/
try {
$con = new PDO("mysqli:host=($db_host);dbname=($db_name)", $db_user, $db_pass);
$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(PDOException $e) {
echo 'ERROR: ' . $e->getMessage();
}
?>
Here is my ini file...
- Code: Select all
extension=bz2
extension=curl
extension=fileinfo
extension=gd2
extension=gettext
;extension=gmp
;extension=intl
;extension=imap
;extension=interbase
;extension=ldap
extension=mbstring
extension=exif ; Must be after mbstring as it depends on it
extension=mysqli
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
;extension=openssl
;extension=pdo_firebird
extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
extension=pdo_pgsql
extension=pdo_sqlite
;extension=pgsql
;extension=shmop
What am I doing wrong? I've restarted many times and tried putting .dll extension on the files and still nothing. I would appreciate any help, as this is really dire that I get this working asap. Thank you and blessings for anyone takin their time to help facilitate this problem.
I did think that the new version, out of the box would of been sufficient? Also, I"m using Windows 10 and of course the php, mysql that came with XAMPP. Thank you again.
Blessings,
EPIALES