468,287 Members | 1,899 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,287 developers. It's quick & easy.

PHP5 and MySQLi connection problem

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
5 2817
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
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
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
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
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.

Similar topics

reply views Thread by gunzip | last post: by
12 posts views Thread by Sarah Tanembaum | last post: by
reply views Thread by Roy Shaw | last post: by
2 posts views Thread by NevrGivUp | last post: by
1 post views Thread by soft_devjava | last post: by
13 posts views Thread by Schmidty | last post: by
21 posts views Thread by Daz | last post: by
2 posts views Thread by webcm123 | last post: by
2 posts views Thread by Michael | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.