"Call to undefined function mysqli_connect()" again

This is a discussion on "Call to undefined function mysqli_connect()" again within the PHP Language forums, part of the PHP Programming Forums category; Hi All, I know this comes up lots but I have tried the previously posted solutions and they are not ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2006
dumbledad@gmail.com
 
Posts: n/a
Default "Call to undefined function mysqli_connect()" again

Hi All,

I know this comes up lots but I have tried the previously posted
solutions and they are not working for me. I have a new installation of
MySQL and PHP running on Windows Server 2003 SP2 with IIS 6. I
installed MySQL 5.0.20 from the installer in mysql-5.0.20-win32.zip at
http://dev.mysql.com/downloads/mysql/5.0.html (and administrator 1.1.9
and query browser 1.1.20). I installed PHP 5.1.2 from the installer
php-5.1.2-installer.exe at http://www.php.net/downloads.php.

The install steps I took for PHP were:
1) Run the installer.
2) Add the installed path (C:\PHP) to the windows path and reboot
3) Unpack the pecl extension, the mysql, and the mysqli dlls into
C:\PHP\ext
4) Edit C:\PHP\php.ini to include
- the reference to doc_root at c:\inetpub\wwwroot
- the reference to extension_dir at c:\php\ext
- remove the commenting out of extension=php_mysql.dll
- add extension=php_mysqli.dll
5) Configure IIS following the instructions for IIS 6 at
http://uk2.php.net/manual/en/install.windows.iis.php
6) Copy libmysql.dll from php_5.1.2_mysqli_5.0.18-win32.zip into both
C:\PHP and C:\WINDOWS\system32
7) Restart IIS and the server.

But, when I go to my page http://213.199.145.32/HPfGUCatalogueT1/ I get
the error message:
Call to undefined function mysqli_connect()

What have I done wrong or failed to do? Does anyone have hints on how I
can diagnose the problem? Judging by the forums and newsgroups it seems
to be a problem that occurs repeatedly, but none of the solutions
suggested before that I have found (e.g. making sure the php.ini file
is correct, adding c:\php to the path, copying libmysql.dll into
C:\WINDOWS\system32, ...) work for me.

Cheers,

Tim.

PS I wasn't sure where to post this so I've cross-posted it in
nntp://comp.lang.php and in http://forums.mysql.com/ I'll copy any
solution over.

Reply With Quote
  #2 (permalink)  
Old 04-17-2006
Erwin Moller
 
Posts: n/a
Default Re: "Call to undefined function mysqli_connect()" again

dumbledad@gmail.com wrote:

> Hi All,
>
> I know this comes up lots but I have tried the previously posted
> solutions and they are not working for me. I have a new installation of
> MySQL and PHP running on Windows Server 2003 SP2 with IIS 6. I
> installed MySQL 5.0.20 from the installer in mysql-5.0.20-win32.zip at
> http://dev.mysql.com/downloads/mysql/5.0.html (and administrator 1.1.9
> and query browser 1.1.20). I installed PHP 5.1.2 from the installer
> php-5.1.2-installer.exe at http://www.php.net/downloads.php.
>
> The install steps I took for PHP were:
> 1) Run the installer.


Did you read Fine Manual?

While I always encourage people to read the newsgroups (via googlegroups
searching, old deja news) for similar questions, I think the best place to
start is the official installation manual, as can be found on the PHP
website:
http://nl2.php.net/manual/en/install.windows.php

If you read that, you'll see:
____________________________________
Windows Installer

The Windows PHP installer is available from the downloads page at
/downloads.php. This installs the CGI version of PHP and for IIS, PWS, and
Xitami, it configures the web server as well. The installer does not
include any extra external PHP extensions (php_*.dll) as you'll only find
those in the Windows Zip Package and PECL downloads.

Note: While the Windows installer is an easy way to make PHP work, it is
restricted in many aspects as, for example, the automatic setup of
extensions is not supported. Use of the installer isn't the preferred
method for installing PHP.
____________________________________

The note says that you should not use it if you are planning on extending
the install, as you just did by adding mysql.

Solution:
1) Uninstall it,
2) read the installationmanual at www.php.net
3) Install by hand.

Regards,
Erwin Moller

> 2) Add the installed path (C:\PHP) to the windows path and reboot
> 3) Unpack the pecl extension, the mysql, and the mysqli dlls into
> C:\PHP\ext
> 4) Edit C:\PHP\php.ini to include
> - the reference to doc_root at c:\inetpub\wwwroot
> - the reference to extension_dir at c:\php\ext
> - remove the commenting out of extension=php_mysql.dll
> - add extension=php_mysqli.dll
> 5) Configure IIS following the instructions for IIS 6 at
> http://uk2.php.net/manual/en/install.windows.iis.php
> 6) Copy libmysql.dll from php_5.1.2_mysqli_5.0.18-win32.zip into both
> C:\PHP and C:\WINDOWS\system32
> 7) Restart IIS and the server.
>
> But, when I go to my page http://213.199.145.32/HPfGUCatalogueT1/ I get
> the error message:
> Call to undefined function mysqli_connect()
>
> What have I done wrong or failed to do? Does anyone have hints on how I
> can diagnose the problem? Judging by the forums and newsgroups it seems
> to be a problem that occurs repeatedly, but none of the solutions
> suggested before that I have found (e.g. making sure the php.ini file
> is correct, adding c:\php to the path, copying libmysql.dll into
> C:\WINDOWS\system32, ...) work for me.
>
> Cheers,
>
> Tim.
>
> PS I wasn't sure where to post this so I've cross-posted it in
> nntp://comp.lang.php and in http://forums.mysql.com/ I'll copy any
> solution over.


Reply With Quote
  #3 (permalink)  
Old 04-21-2006
langhammer@gmail.com
 
Posts: n/a
Default Re: "Call to undefined function mysqli_connect()" again

If you configured the php.ini right it could be a simple error.


there is a function you named mysql (i !!!) and not mysql (without i at
the end)

Reply With Quote
  #4 (permalink)  
Old 04-22-2006
Jerry Stuckle
 
Posts: n/a
Default Re: "Call to undefined function mysqli_connect()" again

langhammer@gmail.com wrote:
> If you configured the php.ini right it could be a simple error.
>
>
> there is a function you named mysql (i !!!) and not mysql (without i at
> the end)
>


No, mysqli_connect is part of the improved mysql interface and is perfectly
valid since PHP 4.something. You just need to ensure the extension is loaded.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:14 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0