You are here: Re: PHP not supporting MySQL « PHP Programming Language « IT news, forums, messages
Re: PHP not supporting MySQL

Posted by Siegfreed on 02/09/07 04:08

Jerry Stuckle wrote:
> Siegfreed wrote:
>
>> My PHP version is obviously not compiled with MySQL support,
>> consequently I get the following message:-
>>
>> Fatal error: Call to undefined function mysql_connect() in
>> C:\http-dir\board\connect.php on line 3
>>
>> Question:- How do I instruct PHP to support MySQL?
>>
>> Please note:-
>>
>> extension=php_mysql.dll
>> extension=php_pdo_mysql.dll
>>
>> in php.ini are enabled, and php.ini is located in the php root directory.
>>
>> Thank you.
>
>
> First of all, there's no need to change the registry if you have your
> php.ini file in the right place.
>
> Secondly, there are three extensions you could be interested in.
>
> extension=php_mysql.dll // (older) mysql_xxx interface
> extension=php_mysqli.dll // (newer) mysqli_xxx objects
> extension=php_pdo_mysql.dll // (newest) PDO interface for MySQL
> extension=php_pdo.dll // also required for PDO
>
> (note: the last, PHP Data Objects, is an abstraction layer for data
> access. It's relatively new, so you probably won't see much existing
> code using it.
>
> Most sites use the mysql_xxx interface, while there are some going to
> the mysqli_interface.
>
> And the interfaces are quite compatible - you can load all three and
> pick whichever one you want to use in your code.
>
I think you are right in saying: "there's no need to change the registry
if you have your php.ini file in the right place". By moving the
"php.ini" to "c:\windows", the "fatal error" message was eliminated.

In addition, I copied "libmysql.dll" to "c:\windows", it appears to work
fine so far.

Thank you.

 

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

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