|
Posted by Jim Moore on 05/15/06 23:51
I was having the same problem, took the advise to install WAMP and had no
success. I searched on Google and the link
http://www.faqts.com/knowledge_base/view.phtml/aid/23162/fid/1150 reports
that PHP 5 does not add support for MySQL automatically. To use it, you
have to edit php.ini and move the dll identified.
Jim Moore
"plato" <platoTAKETHISOUT@telpacific.com.au> wrote in message
news:445de81e$1@news.rivernet.com.au...
>
> "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
>
>
Navigation:
[Reply to this message]
|