You are here: Re: [PHP] Problem: mysqli class not found « PHP « IT news, forums, messages
Re: [PHP] Problem: mysqli class not found

Posted by Sylikc on 02/23/05 04:06

David,


> I have an install of PHP 5 on Windows 2003 Server with Apache 2 and when I
> reference mysqli in my php code, I get an error that the mysqli class is not
> found.

I've wrestled with Windows 2000 Server with Apache 2 configuration,
and hopefully this will apply for 2003 as well.


> I looked at the php.ini file and I added a line for php_mysqli in the
> extensions section and I edited the extension_dir directive to point to
> c:\php\ext folder (I used "/php/ext" as the value assigned to the directive.
>
> I made sure that the c:\php\ext folder actually had a file called
> php_mysqli.dll, which it did.

Somehow PHP ISAPI can't seem to find your extensions folder. In my
setup, I also have PHP installed into c:\php\ext, and in effect, in my
PHP.INI I set

extension_dir = C:\php\ext

....which works just fine. I don't think you need to use the UNIX path
structure, and that may be the root of your problem.

Another thing to check would be NTFS permissions on the PHP.INI file.
If the user that Apache2 is running under cannot read the PHP.INI
file, then none of your extra configuration directives would appy.

Also, I think there is a bulletproof way to ensure everything works,
just in case you installed some additional extension that requires
some extra DLLs you don't want to drop into your SYSTEM32 directory.
You can add "c:\php\ext" into your global windows environment
variable. I've found that to work out well in the long run if you
have additional extensions and dependencies.


> No I can't start my Apache server.
>
> I had done a default install of both Apache 2 and PHP 5.
>
> Any ideas as to how I can get the mysqli class identified and allow my
> Apache server to start.

Apache can't start properly when the extension can't be found. But,
if the above works and you're able to start up Apache, write a small
script and put in

<? phpinfo(); ?>

and run through the wealth of information that is displayed to make
sure "mysqli" is installed as an extension.


/sylikc

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация