|
Posted by plato on 05/07/06 15:30
"Nospam" <nospam@home.com> wrote in message
news:hOt4g.40429$tc.11969@fe2.news.blueyonder.co.uk...
> i have apache 2.0.55, mysql 5.0.2 and php 5.1.2 I have gone through all
the
> steps, renaming phpinidist to php.ini and amending httpconf in the apache
> folder with localhost, 127.0.0.1 admin email, however on running this
sample
> php script to determine if mysql is working fine:
> <?
> // connect to the server:
> $cn = mysql_connect("127.0.0.1","root","pass");
>
> // run a simple query
> $sql = "SELECT 'done' as my_field LIMIT 1";
> $result = mysql_query($sql,$cn);
>
> if($result)
> {
> // if it worked, print the result to screen
> echo mysql_result($result,"my_field");
> } else {
> // otherwise, either the server isn't running
> // or the username/password are wrong
> echo mysql_error()."<br />You should see an error message above you?";
> }
> ?>
>
> on running it with http://localhost/mysql.php
>
> I receive Fatal error: Call to undefined function mysql_connect() in
> C:\webroot\mysql.php on line 3
>
> I am a little stuck as to where to go from now
>
Save yourself a headache...don't waste your time download WAMP and it will
install the whole 3 for you with a minimum of fuss....
Go here: www.en.wampserver.com
cheers
[Back to original message]
|