By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,971 Members | 1,732 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,971 IT Pros & Developers. It's quick & easy.

PHP5 and MySQLi connection problem

P: n/a
Tim
I have trouble with MySQL 5 and PHP 5.0.2, using XP SP1 with IIS.

I can get PHP to access MySQL using CGI and the (older) MySQL
functions, but when I try and use ISAPI and MySQLi functions I have a
problem ....

Fatal error: Call to undefined function mysqli_connect() in (php
file name)

(this message is from just trying to do a connect).

I have checked all permissions, set-up PHP and MySQL according to the
instructions and have enabled mySQLi in the php.ini file, re-booted
but still no luck.

With it setup for CGI, the MySQL details appeared with phpinfo, but
with ISAPI no details appear with phpinfo.

Any help or ideas would be greatly appreciated.
Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
And did you copy all .dll's to windows\system32 ?
"Tim" <ti*********@mail.com> schreef in bericht
news:ea**************************@posting.google.c om...
I have trouble with MySQL 5 and PHP 5.0.2, using XP SP1 with IIS.

I can get PHP to access MySQL using CGI and the (older) MySQL
functions, but when I try and use ISAPI and MySQLi functions I have a
problem ....

Fatal error: Call to undefined function mysqli_connect() in (php
file name)

(this message is from just trying to do a connect).

I have checked all permissions, set-up PHP and MySQL according to the
instructions and have enabled mySQLi in the php.ini file, re-booted
but still no luck.

With it setup for CGI, the MySQL details appeared with phpinfo, but
with ISAPI no details appear with phpinfo.

Any help or ideas would be greatly appreciated.

Jul 17 '05 #2

P: n/a
On Sat, 9 Oct 2004 21:45:45 +0200, "Polaris" <as*********@hotmail.com> wrote:
And did you copy all .dll's to windows\system32 ?


If you did, uncopy them. Set the PATH environment variable instead, don't go
cluttering your Windows system directories (they're bad enough as they are).

Besides, you don't need ALL the DLLs anyway.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #3

P: n/a
Tim
Andy Hassall <an**@andyh.co.uk> wrote in message news:<7i********************************@4ax.com>. ..
On Sat, 9 Oct 2004 21:45:45 +0200, "Polaris" <as*********@hotmail.com> wrote:
And did you copy all .dll's to windows\system32 ?


If you did, uncopy them. Set the PATH environment variable instead, don't go
cluttering your Windows system directories (they're bad enough as they are).

Besides, you don't need ALL the DLLs anyway.


Thanks guys - I have already tried both (copying the files to Windows
out of desperation) and the paths are set. Still it doesn't work.
Jul 17 '05 #4

P: n/a
Tim
I have done some further research and have narrowed down this problem.
Other people see to have had this, but I can't see a solution yet.

MySQLi isn't working because it's not loading, because php.ini isn't
being read.

php.ini IS read if I use CGI, but not if I use ISAPI.

I have checked the obvious (it is NOT called php.ini.ini), have tried
it in various locations and restart IIS each time. PhpInfo reports
php.ini as being in c:\windows.

Any help greatly appreciated.
Jul 17 '05 #5

P: n/a
Tim
I seem to have fixed this. For information, here's what I did ....

- In IIS properties/home directory change the application protection
from it's current setting (probably pooled) to something else.

- In IIS properties/home directory/configuration untick the cache
tick-box.

- Stop and start IIS

- In IIS properties/home directory change the application protection
back to it's previous setting (probably pooled).

- In IIS properties/home directory/configuration tick the cache
tick-box.

- Stop and start IIS
It worked !! I don't know how or why, maybe something was reset.

Note this problem was experienced when using IIS with PHP4 and 5.0.2
with MySQl and MySQLi with ISAPI. CGI seemed to work OK.

Hope this helps someone.
Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.