Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jun 2011 06:15:41 -0400
From:      "Glenn McCalley" <glenn@bnetmd.net>
To:        <freebsd-questions@freebsd.org>
Subject:   Re: mysql_connect error
Message-ID:  <5B2094B3984F40BF98CE30D698431C6D@GLENN2>
References:  <0F3C08F3CEF445EB8DC0060735DCA69D@GLENN2><201106141112.42324.rjgonzale@estrads.com.ar> <it9g1h$o27$1@dough.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help

----- Original Message ----- 
From: "Michael Powell" <nightrecon@hotmail.com>
To: <freebsd-questions@freebsd.org>
Sent: Wednesday, June 15, 2011 1:30 AM
Subject: Re: mysql_connect error


> Rodrigo Gonzalez wrote:
>
>> On Tuesday, June 14, 2011 09:46:17 AM Glenn McCalley wrote:
>>> Seen other people have this problem but cannot get their resolutions to
>>> work for me.
>>>
>>> "Fatal error: Call to oundefined function mysql_connect() in etc., etc."
>>>
>>> This began happening after an upgrade to php5 using the portmaster
>>> program. phpinfo page does -not- show the mysql_connect function
>>> anywhere. phpinfo page is at www9.bnetmd.net/index.php if you have the
>>> desire to look.
>>
>> It looks good, where are you getting the error? in a web page or using
>> cli?
>>
> Type php -v at a command prompt. It should return something like this:
>
> testbed# php -v
> PHP 5.3.6 with Suhosin-Patch (cli) (built: Mar 31 2011 11:08:23)
> Copyright (c) 1997-2011 The PHP Group
> Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
>    with XCache v1.3.2-rc1, Copyright (c) 2005-2011, by mOo
>
> If it does not, go to the php-extensions port, run make config and check 
> the
> box which builds the CLI version. It is in addition to all the other
> extensions so it won't interfere with them.  The CGI build option  is also
> more commonly required when using FastCGI.
>
> I'm basing this on the report that mysql_connect works OK in a web page 
> but
> is failing when run at CLI. If I am misunderstanding something please
> excuse.
>
> -Mike
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to 
> "freebsd-questions-unsubscribe@freebsd.org"
>
Mike, your understanding is correct - works in a web page but fails from 
cli.  php -v output below:

www9# php -v
PHP 5.2.17 with SUhosin-Patch 0.9.7 (cli) (built: <ar 13 2011 17:46:12)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies

This is FreeBSD, in my ports the "Build CLI verson" option appears in the 
config for the php5 port itself, not the extensions.  It is, however, 
checked along with "Build CGI version". 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5B2094B3984F40BF98CE30D698431C6D>