Re: problem encountered moving from IIS to Apache on WinNT
| From: | Justin Patrin | Date: | Fri, 19 Nov 2004 17:46:38 +0000 |
| Subject: | Re: problem encountered moving from IIS to Apache on WinNT | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15691@lists.php.net to get a copy of this message | ||
On Fri, 19 Nov 2004 12:45:33 -0000, George Pitcher
<george.pitcher@ingenta.com> wrote:
> Hi,
>
> I'm in the process of moving my site from IIS to Apache. I'm keeping my
> MySQL database on what is currently the IIS server and that will eventually
> become a single-purpose db server.
>
> I have my own config file that sets up paths for Smarty, my includes and
> Pear DB as well as establishing the $db connection. This is called by most
> files as an include.
>
> I've troubleshooted the config file and the problem is in the following line
>
> >>> $db =& DB::connect( "mysql://$dbuser:$dbpass@$dbhost/$dbname" );
> >>> <<<
Are you sure the DSN is correct? Try:
echo "mysql://$dbuser:$dbpass@$dbhost/$dbname";
Perhaps the $dbhost is not correct since it's now a different machine?
>
> I've tested the connection with mysql_connect() and mysql_select_db() and
> they work fine,
>
> Any ideas on solving this problem?
>
> George in Oxford
>
--
Justin Patrin