By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,407 Members | 1,583 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,407 IT Pros & Developers. It's quick & easy.

PHP5 with MySQL 4.1 on Apache 2 on Win98

P: n/a
Hello. I am in the process of learning php. I am particularly
interested in its uses with MySQL. I have Apache 2 and PHP5 both
installed and working fine. I pasted a MySQLi example for opening and
connecting to a MySQL DB into "hello.php"

<?php
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");

/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}

printf("Host information: %s\n", $mysqli->host_info);

/* close connection */
$mysqli->close();
?>
For some reason when I get:

Fatal error: Class 'mysqli' not found in D:\Apache
group\Apache2\htdocs\hello.php on line 7

I installed PHP in "d:\php" and added it to my path in my autoexec.bat.
in php.ini:
....
extension_dir = "d:\php\ext"
....
extension=php_mysqli.dll

I read all the posts at the bottom of the pages on PHP.net website where
someone says "I had a problem and I got...yada...yada and did everything
each of those posts said you had to do and it still won't work.

The only thing left is how PHP needs compiled with a "--with" statement
or something like that but I'm using the windows binary so that
shouldn't be a problem...

Is there some other problem it could be besides a problem with finding a
dll or ini?

Thanks

Bryce Byrd
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
> Fatal error: Class 'mysqli' not found in D:\Apache
group\Apache2\htdocs\hello.php on line 7


Check for the mysql functions by function_exists also look for it in the
phpinfo. You can make the page by using <?php phpinfo(); ?>

That should help you figure out whats not happening.

Mike
Jul 17 '05 #2

P: n/a
On Thu, 05 May 2005 02:48:08 +0000, NevrGivUp wrote:
Is there some other problem it could be besides a problem with finding a
dll or ini?


Well, if you take a look in apache log, the file error.log will tell you
exactly what the problem is.

--
Egoist: A person of low taste, more interested in themselves than in me.

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.