mySQL Connection - In SSI

This is a discussion on mySQL Connection - In SSI within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi All, I am getting the following error: Access denied for user 'root'@'localhost' (using password: NO) in /usr/local/...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-09-2006
Simon Harris
 
Posts: n/a
Default mySQL Connection - In SSI

Hi All,


I am getting the following error:

Access denied for user 'root'@'localhost' (using password: NO) in
/usr/local/psa/home/vhosts/mysite.co.uk/httpdocs/assets/ssi/shared_functions.php
on line 130

When running this function:

// Return a County name from a County ID
function GetCountyNameFromID($idCounty) {
$sql = "SELECT county_name FROM VisitorWorld.counties where
isCounty = " .$idCounty;
$result = mysql_query($sql) or die(mysql_error());
while($row = mysql_fetch_array($result)) {
return $row{'county_name'};
}
}

The function is in an SSI file called 'shared_functions.php' I include this
in my page (process_update.php) like this:

include("../assets/ssi/shared_functions.php");

All other activity on my page (process_update.php) works Ok.

Note that I have connected to the database above the shared_functions.php
include directive (which is also done in an SSI)


Any help will be appreciated.


Thanks!
Simon.

--
-
* Please reply to group for the benefit of all
* Found the answer to your own question? Post it!
* Get a useful reply to one of your posts?...post an answer to another one
* Search first, post later : http://www.google.co.uk/groups
* Want my email address? Ask me in a post...Cos2MuchSpamMakesUFat!

--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 10214 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:11 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0