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

"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.

Apr 17 '06 #1
3 5108
du*******@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.


Apr 17 '06 #2
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)

Apr 21 '06 #3
la********@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.
js*******@attglobal.net
==================
Apr 22 '06 #4

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

Similar topics

2
by: inonzuk | last post by:
why strange you ask? here goes: I have been working with Php and Mysql for a week without any problems. Today I tried executing a php page that connects to mysql and creates a new database, I...
3
by: ¤ Alias | last post by:
I have a function named getID3info (lvwDiscInfo.SelectedItem). What is the difference between getID3info (lvwDiscInfo.SelectedItem) and Call getID3info(lvwDiscInfo.SelectedItem) ?
3
by: Steven T. Hatton | last post by:
Scroll to the bottom and read the last part first. I've been trying very diligently to 'modularize' the code from TC++PL3E found here: http://www.research.att.com/~bs/matrix.c I keep getting...
13
by: Don Vaillancourt | last post by:
What's going on with Javascript. At the beginning there was the "undefined" value which represented an object which really didn't exist then came the null keyword. But yesterday I stumbled...
25
by: Nitin Bhardwaj | last post by:
Well, i'm a relatively new into C( strictly speaking : well i'm a student and have been doing & studying C programming for the last 4 years).....and also a regular reader of "comp.lang.c" I...
49
by: matty | last post by:
Hi, I recently got very confused (well that's my life) about the "undefined" value. I looked in the FAQ and didn't see anything about it. On...
3
by: news | last post by:
Hi all, hope you can help me. I have recently set up a mysql database of local pubs, with a web form to add new listings (using PHP to generate an INSERT query). I've just been doing a bit of...
5
by: Jason | last post by:
Hello, I am trying to dynamically create a table, then set its <td>'s onclick: var table = document.createElement("table"); var row = table.insertRow(-1); var td = row.insertCell(-1);...
7
by: runsun pan | last post by:
I wanna check if an object is the *arguments* object of a function, is that possible? When we do: typeof(arguments) it always returns "object", doesn't seem to be helpful.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.