Hello, i cant connect to my database....
> if i click phpmyadmin from cpanel i get in just
> fine and can add tables ect., but trying to connect
> thruogh my php script i get connection errors....
> I known my script is fine, ive used it for a few
> years on other servers.
>
> server status on my acount page shows this.
> MySQLOffline
>
> and heres errors i get from my site.
> Warning: mysql_select_db()
> [function.mysql-select-db]: Access denied for user
> ********(using password: NO) in
> /home/cohan79/public_html/s1/fix.php on line 11
>
>
> Warning: mysql_select_db()
> [function.mysql-select-db]: A link to the server
> could not be established in
> /home/cohan79/public_html/s1/fix.php on line 11
>
> also i have my own domain www.the-global-wars.com,
> and when trying to set it as my domian from my
> acount page , it says the feature is down...
> gwars.x10hosting.com is the sub domain i signed up
> with.
php script That should connect????????
and yes $dbhost,$dbuser,$dbpass, and $dbname are defined as they should be... also works on my devel. pc with the same ver. php and same ver. of mysql as this sever runs.............
if ($REQUEST_URI)
if (!$link = @mysql_connect($dbhost,$dbuser,$dbpass))
{
print "Error! Database unavailable!\n";
exit;
}
mysql_select_db($dbname);
Could someone please fix this for me!
it cant be my script......
and change my domain.its be like this for about a week now
>
> My site is a simple browser text game that will
> not do nothing without being able to connect to
> mysql. please help!
> if i click phpmyadmin from cpanel i get in just
> fine and can add tables ect., but trying to connect
> thruogh my php script i get connection errors....
> I known my script is fine, ive used it for a few
> years on other servers.
>
> server status on my acount page shows this.
> MySQLOffline
>
> and heres errors i get from my site.
> Warning: mysql_select_db()
> [function.mysql-select-db]: Access denied for user
> ********(using password: NO) in
> /home/cohan79/public_html/s1/fix.php on line 11
>
>
> Warning: mysql_select_db()
> [function.mysql-select-db]: A link to the server
> could not be established in
> /home/cohan79/public_html/s1/fix.php on line 11
>
> also i have my own domain www.the-global-wars.com,
> and when trying to set it as my domian from my
> acount page , it says the feature is down...
> gwars.x10hosting.com is the sub domain i signed up
> with.
php script That should connect????????
and yes $dbhost,$dbuser,$dbpass, and $dbname are defined as they should be... also works on my devel. pc with the same ver. php and same ver. of mysql as this sever runs.............
if ($REQUEST_URI)
if (!$link = @mysql_connect($dbhost,$dbuser,$dbpass))
{
print "Error! Database unavailable!\n";
exit;
}
mysql_select_db($dbname);
Could someone please fix this for me!
it cant be my script......
and change my domain.its be like this for about a week now
>
> My site is a simple browser text game that will
> not do nothing without being able to connect to
> mysql. please help!