Failed opening required mysqli_connect.php

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Failed opening required mysqli_connect.php

Postby friday » 06. January 2016 08:29

I 'm trying to connect to mysql database in my php script. I keep getting the following error:

Warning: require(mysqli_connect.php): failed to open stream: No such file or directory in C:\xampp\htdocs\simpleIdb\register-page.php on line 52

Fatal error: require(): Failed opening required 'mysqli_connect.php' (include_path='.;C:\xampp\php\pear') in C:\xampp\htdocs\simpleIdb\register-page.php on line 52


I 'm running XAMPP 5.5.30 on Windows 10.

Line 52 is: require('mysqli_connect.php');

And the following as mysqli_connect.php:

DEFINE ('DB_USER', 'horatio');

DEFINE ('DB_PASSWORD','hmsvictory');

DEFINE('DB_HOST', 'localhost');

DEFINE('DB_NAME', 'simpleIdb');

$dbcon = @mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME)

OR die ('Could not connect to MySQL:'.mysql_connect_error());

mysql_set_charset($dbcon, 'utf-8');


My include path in php.ini is:

include_path=".;C:\xampp\php\pear"

Can anybody help?
friday
 
Posts: 1
Joined: 06. January 2016 08:19
Operating System: Windows 10

Re: Failed opening required mysqli_connect.php

Postby Altrea » 06. January 2016 08:34

friday wrote:Can anybody help?

Nobody except you. Is there a file C:\xampp\htdocs\simpleIdb\mysqli_connect.php ?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 93 guests