For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > October 2004 > newbie question regarding mysql_connect









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author newbie question regarding mysql_connect
John T

2004-10-30, 8:55 pm

this piece of php:


<?php
require($_SERVER["DOCUMENT_ROOT"]."/config/db_config.php");
$connection = mysql_connect($db_host, $db_user, $db_password) or die("Error connecting");
echo "Connection made!";
?>
presents me with a blank page. It's picking up the variables ok from db_config.php, because if I replace
the;

$connection = mysql_connect($db_host, $db_user, $db_password) or die("Error connecting");
echo "Connection made!";

lines to just echo the host, user and password, they all appear on screen fine.

I'm using Mysql 4.0.1.8-nt with Apache2 webserver and PHP5

I'm new to this and i'm guessing that MySQL, apache or PHP is mis-configured somewhere.... but I can't
track it down.

Any help appreciated.



All the Best,
John

<< In Birmingham - The Industrial Riviera..! >>
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com