Re: [PHP-DB] 64-bit Linux -- Fatal ... undefined function mysql_connect()

[email protected] (andrew jarcho)
Newsgroups php.db
Message-ID <[email protected]>
On Tue, Mar 2, 2010 at 12:25 AM, Chris <[email protected]> wrote:
> andrew jarcho wrote:
>>
>> Hello all,
>>
>> I'm running Fedora 12 (64-bit), Apache 2.2.14, PHP 5.3.1, MySQL
>> 5.1.42, on a Dell laptop.
>
> <snip>
>
>> I get the message:
>>
>> Fatal error: Call to undefined function mysql_connect()
>
> <snip>
>
>> The output of my phpinfo() includes:
>
> Is that from command line or webpage? They may read different php.ini files.
>
> # php -i | grep mysql
>
> return anything from the command line?
>
> which config is it reading?
>
> # php -i | grep php.ini
>
> Is it the one you were editing previously?
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>

Thanks *very* much to all who replied. This question has occupied most
of my time for two full days and it's a tremendous relief to know that
I'm not alone in my struggles.

As it turns out, php *was* trying to read a different .ini file when
invoked from the command line than when invoked via browser. I say
'trying to' because I had changed the name of the alternate php.ini to
'deactivate' it. I assumed that since php still worked in the browser,
I didn't need the other .ini.

I reactivated the alternate php.ini, told it the path to mysql.so, and
everything works as advertised.

I know with this version of php, I should be using mysqli.so, so
that's my next step.

Thanks again to everybody,

Andy
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.