473,396 Members | 1,997 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,396 software developers and data experts.

Fatal error: Call to undefined function: mysqli_connect()

i've read various info on the web including the following

http://php.mirrors.ilisys.com.au/man...ref.mysqli.php

mySQL Version 4.1.16
PHP Version 5.1.2
with Zend Engine v2.1.0
OS Windows NT SERVER(2003) 5.2 build 3790

see http://drew.bounceme.net/phpinfo.php for more details

Configuration File (php.ini) Path C:\WINDOWS\php.ini
sql.safe_mode Off-local Off-master

--------------------------------------------------------------------

when trying to load phpmyadmin i get the following
Cannot load mysql extension

when trying to call msqli_connect() i get the following
Fatal error: Call to undefined function: mysqli_connect()

obviously sql functions have not been loaded for php, so as i
understand it i need to load these at run time.

the problem is i cant get it working!

i've tried the folowing in my php.ini file

extension=php_mysql.dll

but i'm not sure if that will work for my version of sql

should i be using the libmySQL.dll file or a call to this file?

i've also tried dl('libmySQL.dll');

Warning: dl() [function.dl]: Invalid library (maybe not a PHP library)
'libmySQL.dll' in in
C:\mahserver\apache\Apache2\htdocs\web\mesne\sql.p hp

and dl('php_mysql.dll');

Warning: dl() [function.dl]: Unable to load dynamic library
'C:\mahserver\PHP\extentions\php_mysql.dll'

i know i'm doing lots of the wrong thing but i also know i'm so close!
can anyone tell me how to properly use 'libmySQL.dll' or if i should be
using someting else???

Feb 4 '06 #1
1 18025
you aren't trying this from the command-line are you? The command-line
version disables the MySQL libraries (and many more). until you enable it
as an extension in php.ini.
I've seen this same problem on another post here somewhere, but didn't see
an answer.
One version of libmysql.dll comes with MySQL DB install. and a different
version comes with PHP. One May come with apache. Sounds to me like you
may have a dll version mismatch problem.
have you considered XAMPP http://www.apachefriends.org/en/xampp.html for an
easy install of MySQL/PHP/Apache?
when I installed PHP, it created an ext subdirectory where all the dlls are
located. so your extension= line should look like
extension=ext/php_mysql.dll

libmysql.dll should be in your PATH.
to set your path (your platform may vary from XP), look in the control
panel, performance and maint,system,advanced tab,environment variables.
if you are running PHP as part of a web server, append to the System's PATH.
otherwise, append to the current user's PATH.
If you *are* running into versioning problems, you may have a newer
libmysql.dll provided by MySQL and some package like Apache supplying a
different one.
if all else fails, Try using the MySQL dll (in your PATH hopefully) by
renaming PHP's libmysql.dll to libmysql.dll_ so it won't load and see if you
can run a test db script.
The trick is to get your MySQL clientware >= MySQL Server.

I don't have any great answers because I am using MySQL 5 and it works out
of the box with PHP 5.1.2.
Thanks to your mentioning the extensions= line, someone's earlier post about
disabling of MySQL now seems trivial. duh. why didn't I notice that earlier?

<dr**********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
i've read various info on the web including the following

http://php.mirrors.ilisys.com.au/man...ref.mysqli.php

mySQL Version 4.1.16
PHP Version 5.1.2
with Zend Engine v2.1.0
OS Windows NT SERVER(2003) 5.2 build 3790

see http://drew.bounceme.net/phpinfo.php for more details

Configuration File (php.ini) Path C:\WINDOWS\php.ini
sql.safe_mode Off-local Off-master

--------------------------------------------------------------------

when trying to load phpmyadmin i get the following
Cannot load mysql extension

when trying to call msqli_connect() i get the following
Fatal error: Call to undefined function: mysqli_connect()

obviously sql functions have not been loaded for php, so as i
understand it i need to load these at run time.

the problem is i cant get it working!

i've tried the folowing in my php.ini file

extension=php_mysql.dll

but i'm not sure if that will work for my version of sql

should i be using the libmySQL.dll file or a call to this file?

i've also tried dl('libmySQL.dll');

Warning: dl() [function.dl]: Invalid library (maybe not a PHP library)
'libmySQL.dll' in in
C:\mahserver\apache\Apache2\htdocs\web\mesne\sql.p hp

and dl('php_mysql.dll');

Warning: dl() [function.dl]: Unable to load dynamic library
'C:\mahserver\PHP\extentions\php_mysql.dll'

i know i'm doing lots of the wrong thing but i also know i'm so close!
can anyone tell me how to properly use 'libmySQL.dll' or if i should be
using someting else???

Feb 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Daniel Hansen | last post by:
I am getting a "Fatal error: Call to undefined function: imagecreatefromjpeg() in..." error in one of my scripts, and after doing a bit of searching on the 'net I found various messages relating to...
5
by: Randell D. | last post by:
Folks, I feel like pulling my hair out - I tried unsuccessfully over the past few days to install ImagMagick but because of version conflicts and missing libraries I had to give up. I originally...
4
by: gc | last post by:
I'm a PHP and MySQL newbie. I have a feeling a lot of you may have seen this before. I'm teaching myself PHP/MySQL and trying to setup a guestbook. I'm running latest versions of Apache, PHP and...
8
by: Tim Tyler | last post by:
I'm getting fatal errors when executing code - and my error handler is failing to trap them - so I get no stack backtrace :-( The error I am getting is: "Fatal error: Call to a member function...
2
by: salvadorvp | last post by:
Hi, I have the following code that gives me this odd error message at a line of code inside the PEAR libraries: "Fatal error: Call to undefined function: MDB2_Driver_mssql::getMessage(). in...
9
by: java | last post by:
Hey there, I just removed an elderly PHP4-Installation from my Windows-Box and installed PHP 5.2.1. I used the PHP4-Module as local batchfile- interpreter by E:\ersDHCP>php ./extractLog.php ...
2
by: geevaa | last post by:
Hi group, My program is <?php mysqli_connect('ns1','tdphp8','tdphp8')or die('connection error'); print'hai'; ?> =========================================================== my output is
3
by: Ming | last post by:
I am new to php5 programming :) I redirect users to another server to login. After they login successfully, they will be redirected to test.php. The server provides xml_rpc interface so I can...
4
by: nickyspace | last post by:
HI all I have a little issue with this php code. Below is the code CODE: PHP 1.<?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.