From owner-freebsd-questions@FreeBSD.ORG Tue Jun 14 15:26:12 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C762106566C for ; Tue, 14 Jun 2011 15:26:12 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from mail1.sourcehosting.net (mail1.sourcehosting.net [74.205.51.45]) by mx1.freebsd.org (Postfix) with ESMTP id 127E48FC0C for ; Tue, 14 Jun 2011 15:26:11 +0000 (UTC) Received: from 68-189-245-235.dhcp.oxfr.ma.charter.com ([68.189.245.235] helo=cube.entropy.prv) by mail1.sourcehosting.net with esmtp (Exim 4.73 (FreeBSD)) (envelope-from ) id 1QWVQy-000LqG-Np; Tue, 14 Jun 2011 11:21:47 -0400 Received: from v104.entropy.prv (v104.entropy.prv [192.168.1.104]) by cube.entropy.prv (Postfix) with ESMTP id 532564F2E3A2; Tue, 14 Jun 2011 11:26:04 -0400 (EDT) Message-ID: <4DF77D8C.9060802@FreeBSD.org> Date: Tue, 14 Jun 2011 11:26:04 -0400 From: Greg Larkin Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Glenn McCalley References: <0F3C08F3CEF445EB8DC0060735DCA69D@GLENN2> <4DF771B7.4090104@my.gd> <2DA8538A0B6947089C33DB97CAF2E918@GLENN2> In-Reply-To: <2DA8538A0B6947089C33DB97CAF2E918@GLENN2> X-Enigmail-Version: 1.1.1 OpenPGP: id=1C940290 X-SA-Exim-Connect-IP: 68.189.245.235 X-SA-Exim-Mail-From: glarkin@FreeBSD.org X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail1.sourcehosting.net X-Spam-Level: *** X-Spam-Status: No, score=3.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RCVD_IN_RP_RNBL, RCVD_IN_SORBS_DUL, RDNS_DYNAMIC, TVD_RCVD_IP autolearn=no version=3.3.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: Yes (on mail1.sourcehosting.net) Cc: freebsd-questions@freebsd.org Subject: Re: mysql_connect error X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: glarkin@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2011 15:26:12 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 6/14/11 10:49 AM, Glenn McCalley wrote: > > ----- Original Message ----- From: "Damien Fleuriot" > To: > Sent: Tuesday, June 14, 2011 10:35 AM > Subject: Re: mysql_connect error > > >> On 6/14/11 2:46 PM, 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. >>> >>> Suggestions from lists/boards seem to all point to mysql.so not being in >>> the php library, yet a "find" shows it is in there. >>> >>> pkg_info shows "php5-mysql-5.3.5 The mysql shared extension for >>> php" >>> >>> extensions.ini shows "extension=mysql.so" >>> >>> Is there anywhere/anything else to look/do? >>> >>> Thanks! >>> Glenn. >>> >>> >> >> >> If I were you, I would reinstall the php5 mysql extension like so: >> >> >> cd /usr/ports/lang/php5-extensions >> make config >> # make sure you tick the MYSQL option >> make clean >> make >> make deinstall && make reinstall >> >> >> Then, restart your web server or PHP FCGI process, as applicable. >> >> You should be cool. >> > Thanks Damien, > > Did so, mysql definitely checked, no help. I did see that gd was not > checked so checked that, did the make process and that cured another > problem so I'd say the reinstall did in fact take. > > The error happens when being run from the command line. Does that make > a difference? > > Glenn. Hi Glenn, Try running this command in your shell: php -i | grep -i php.ini Does the reported path match the one reported by your phpinfo page (viewed in the web browser)? Also, is it possible you have multiple php executables installed? What is the output of the following commands? which php pkg_info -L php5-5\* Regards, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. http://twitter.com/cpucycle/ - Follow you, follow me -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk33fYwACgkQ0sRouByUApBPBACfZLyTSRQfGuFR6kg9IYts2pmJ B7gAn3CieUC57U0rOfsvIo+ZddtCltaZ =1Zbg -----END PGP SIGNATURE-----