473,387 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

PHP5 with MySQL 4.1 on Apache 2 on Win98

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
2 1881
> 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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Philipp Lenssen | last post by:
OK, I can get PHP5 running on Apache 2 installed on Windows XP Home Edition. Now I want to add MySQL4 to the package. I installed it but I'm not sure what to do now. My PHP5 scripts are running...
0
by: Dave Pham | last post by:
I just cleaned my comp, and I am trying to re-config my webserver... I am trying to setup apache 2 so it runs both php4 and php5, I also have two instances of mysql running. I know this can be...
1
by: Mike | last post by:
Last weekend I decided to install Apache 2.0.53-win32-x86-no_ssl PHP 5.0.3 Smarty 2.6.7 MySQL essential-4.1.10-win32 I have Apache up (Port 80 blocked at the router and firewall!) and I have...
1
by: Nospam | last post by:
I am trying to get mysql 4, php5, and apache to work on my winxp sp2 comp, unfortunately even though php5 and apache seems to work ok I am unable to utilise mysql with php and apache, I have yet to...
4
by: Chuck Anderson | last post by:
I am trying to install Php5 on my WindowsXP machine (at home, not on the 'net). I downloaded the Php Windows binary at php.net, unzipped it to c:/Php5, changed my Apache config file to use Php5...
3
by: long eddy | last post by:
Greetings, I'm using an old computer - Win 98. I'd like to install php/apache/mySql on it but there are many versions and some do not recommend installing on Win98. If somebody could point me...
8
by: Tony B | last post by:
Hi, I'm trying out my local copy of a site that uses php4, mysql,apache2. I've moved it from a php4 machine to a php5 machine, and it doesn't work at all now. A couple of other php4 sites I've...
2
by: tool | last post by:
I'm having a problem that I'm not sure of the source for... so I'm asking here as the Apache group doesnt seem to know anything about the error message Apache generates. The error message is...
12
by: Alan M Dunsmuir | last post by:
After having worked with Apache/MySQL/PHP for a year or so under Linux I need, purely for convenience, to set up a parallel platform under Windows. Unfortunately, since I last did this (using...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.