PHP5 and MySQLi connection problem

This is a discussion on PHP5 and MySQLi connection problem within the PHP Language forums, part of the PHP Programming Forums category; I have trouble with MySQL 5 and PHP 5.0.2, using XP SP1 with IIS. I can get PHP ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-09-2004
Tim
 
Posts: n/a
Default PHP5 and MySQLi connection problem

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.
Reply With Quote
  #2 (permalink)  
Old 10-09-2004
Polaris
 
Posts: n/a
Default Re: PHP5 and MySQLi connection problem

And did you copy all .dll's to windows\system32 ?


"Tim" <tim.bullock@mail.com> schreef in bericht
news:ea684cfc.0410090339.3a634afa@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.



Reply With Quote
  #3 (permalink)  
Old 10-09-2004
Andy Hassall
 
Posts: n/a
Default Re: PHP5 and MySQLi connection problem

On Sat, 9 Oct 2004 21:45:45 +0200, "Polaris" <ask4polaris@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 / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Reply With Quote
  #4 (permalink)  
Old 10-10-2004
Tim
 
Posts: n/a
Default Re: PHP5 and MySQLi connection problem

Andy Hassall <andy@andyh.co.uk> wrote in message news:<7ikgm09fgd1oaodupe7foef2rakodil83h@4ax.com>. ..
> On Sat, 9 Oct 2004 21:45:45 +0200, "Polaris" <ask4polaris@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.
Reply With Quote
  #5 (permalink)  
Old 10-13-2004
Tim
 
Posts: n/a
Default Re: PHP5 and MySQLi connection problem

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.
Reply With Quote
  #6 (permalink)  
Old 10-13-2004
Tim
 
Posts: n/a
Default Re: PHP5 and MySQLi connection problem

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.
Reply With Quote
Reply


Thread Tools
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

vB 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 05:40 PM.


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