Re: Problem connecting to db on Linux

From: Date: Mon, 18 Feb 2002 14:08:45 +0000
Subject: Re: Problem connecting to db on Linux
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-17022@lists.php.net to get a copy of this message
> I've been working with PHP/MySQL on Win NT and Win 2000 for a few weeks. > I've now set up a Linux machine (Mandrake 8.1 on Dell laptop) and have moved > my files across. > > I use an include file which logs on to the MySQL server and then connects to > the database. It performs the login ok but not the select db part. > > I tried creating a db using a php script and then selecting it and got the > same problem. > > I'm new on Linux so it might be something in the configuration which needs > working on. > > Any suggestions? Well, if you had posted some code, someone might have seen the error... :( Anyway, here is how i do it: if($db = mysql_pconnect($dbhost, $dbuser, $dbpasswd)){ mysql_select_db($dbname, $db); } else { echo mysql_error(); exit; } ------------------------------------------------------------------------ Greg Donald - http://destiney.com/ http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/ ------------------------------------------------------------------------

« previous php.db (#17022) next »