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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
|
|||
|
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. |
|
|||
|
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 |
|
|||
|
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. |
|
|||
|
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. |
|
|||
|
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. |