PHP5 with MySQL 4.1 on Apache 2 on Win98

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

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"

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

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

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

/* close connection */

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"

I read all the posts at the bottom of the pages on 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?


Bryce Byrd

Re: PHP5 with MySQL 4.1 on Apache 2 on Win98

Quoted text here. Click to load it

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.


Re: PHP5 with MySQL 4.1 on Apache 2 on Win98

On Thu, 05 May 2005 02:48:08 +0000, NevrGivUp wrote:

Quoted text here. Click to load it

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.

Site Timeline