You are here: Re: MySQLi Problem with PHP 5.2.0 « PHP Programming Language « IT news, forums, messages
Re: MySQLi Problem with PHP 5.2.0

Posted by Curtis on 12/11/06 22:52

Andy Hassall wrote:
> On 10 Dec 2006 02:39:42 -0800, "Curtis" <dyer85@gmail.com> wrote:
>
> >Recently, I decided to upgrade to PHP 5.2.0. I have C:\php5 in the
> >Windows XP PATH, so upgrading is quite painless; just unzip new
> >release, and restart Apache! Usually it goes off without a hitch, but I
> >noticed that phpMyAdmin was not able to utilize the MySQLi library
> >(which was working with my last 5.1.x release). As I was looking
> >through php_info(), I noticed that MySQLi didn't even load. However,
> >when I restarted Apache after installing and setting up php.ini, there
> >was NO error displayed, nor logged. Actually, I do get an error in the
> >actual PHP code during runtime, which informs me that the mysqli class
> >doesn't exist. Neither does the procedural forms of MySQLi.
> >
> >Some information: I run Apache 2.0.54 on Windows XP Pro. Last night, I
> >upgraded to MySQL 5.0.27, in an attempt to see if it would improve the
> >situation (previously, I ran on 4.1.x).
> >
> >php.net doesn't seem to make any special note about installing for
> >5.2.0 (with the exception of Apache 2.2.x), so I'm not even sure how to
> >go about troubleshooting, since I don't even have an error to go by.
> >
> >Other modules that load are: CURL, mbstring, mcrypt, mysql (standard
> >mysql), and xsl. php_mysqli.dll was packed with my install, and is
> >located in the same directory as the above modules which load.
> >
> >If anyone can point me in the right direction, I would be very
> >grateful.
>
> Some places to start that often sort this sort of thing out:
>
> Try the command-line version of PHP. Start off with just "php -v" - you may
> see some errors here which could shine some light on the situation.
>
> Download Dependency Walker, and load php_mysqli.dll into it. This may
> highlight missing dependencies that cause it to fail to load. (You can
> _usually_ ignore delay-load dependency modules, if it complains about those).
> You can see which libmysql.dll it's picking up as well.
>
> The other factor tends to be that the webserver runs under a different
> environment to your user; both in environment variables and filesystem
> permissions, so check they're consistent and that the relevant DLLs are
> accessible to whatever user Apache is running as.
>
> For what it's worth, both the mysql and mysqli extensions load fine here on
> PHP 5.2.0, Apache, Windows XP, MySQL 5.0.22 so it's not fundamentally broken in
> 5.2.0 as far as I can see.
>
> --
> Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
> http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

Hello Andy:

Thanks for the reply - very helpful. When I read your information about
how the environment variable could be a problem, I decided to check
that first, and my friend also suggested to put libmysql.dll in my
system dir, which I did. After restarting apache, I went to my
php_info, and lo and behold, mysqli info right before mine own eyes!

I'm glad it works, but C:\php5 is in the System PATH variable, so I
figured that means the directory would be available to all users' Path.
However, I have been noticing some strange behavior in that I'm having
trouble running PHP and Perl scripts from the command line (but that's
a different issue, so I won't go into that here).

Thanks again, at least I know where the problem is at.

Curtis

 

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

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