[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PHP: mysql_connect() undefined function



Hello,

I seem to be having this same error with my VPS(Virtual Private Server) which runs Debian Sarge.  It uses the Apache2 Web Server and PHP4.  Yet, I have another VPS located at a different hosting company which hasn't given me any problems with this.  Plus the VPS which is having the very same problem which your experiencing can also use PHPMyAdmin but cannot connect to the MySQL server in anyother scripts.

I have been using PHP for awhile now, and just now I have found a problem which I cannot debug.  Only because it's not related to PHP coding.  I'm also more fluent in Apache1.3 than I am in the Next generation Apache Servers.  I am guessing it must be related to Apache2 and the way it handles php4.  If I ever figure out how to fix this problem on my VPS, I will be sure to drop you an Email on how I fixed this problem.

Kevin.

On Wed, 16 Aug 2006 12:33:26 -0400
Stephen <stephen.d.allen@gmail.com> wrote:

> On Wed, Aug 16, 2006 at 05:52:46PM +0200 or thereabouts, Paolo Pantaleo wrote:
> > 2006/8/16, Stephen <stephen.d.allen@gmail.com>:
> > >On Wed, Aug 16, 2006 at 05:24:44PM +0200 or thereabouts, Paolo Pantaleo 
> 
> > >> Any suggestion?
> > >
> > >I suspect that php4-mysql isn't installed and/or activated.
> > >
> > >Therefore try 'aptitude install php4-mysql' or 'apt-get install
> > >php4-mysql'.
> > 
> > Well I installed php5 (and php5-mysql), should I use php4 (I have testing) ?
> 
> No. 
> 
> I find it very strange that PHPMyAdmin will connect to the same host though. 
> This error you've received is indicative of PHP not able to connect to the 
> MySQL socket, so it's very strange that it works with PHPMyAdmin connecting 
> to the same host. Is the database on the same server as Apache ?
> 
> Sorry, I'm out of ideas.
> 
> -- 
> Regards
> Stephen
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Hell is empty and all the devils are here.
> 		-- Wm. Shakespeare, "The Tempest"
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 



Reply to: