You are here: Re: Fatal error: Call to undefined function: mysqli_connect() « PHP Programming Language « IT news, forums, messages
Re: Fatal error: Call to undefined function: mysqli_connect()

Posted by Jim Michaels on 10/13/53 11:39

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?

<drewmania001@gmail.com> wrote in message
news:1139030666.140839.264630@f14g2000cwb.googlegroups.com...
> i've read various info on the web including the following
>
> http://php.mirrors.ilisys.com.au/manual/en/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.php
>
> 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???
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация