PDA

View Full Version : php code result that I do not understand??


Richard Diedrick
07-09-2010, 06:35 AM
The page results and below that the php code that generated it and I guess I am just to dense to understand how. Help!!

Web page info
Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'rdied_richard'@'74.53.185.149' (using password: YES)
in /home/rdied/public_html/rdiedrick.com/Connections/Remote.php on line 9
Fatal error: Access denied for user 'rdied_richard'@'74.53.185.149' (using password: YES)
in /home/rdied/public_html/rdiedrick.com/Connections/Remote.php on line 9

php code that generated the above response?

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_Remote = "74.53.185.149";
$database_Remote = "rdied_osc1";
$username_Remote = "rdied_richard";
$password_Remote = "rd9149";
$Remote = mysql_pconnect($hostname_Remote, $username_Remote, $password_Remote) or trigger_error(mysql_error(),E_USER_ERROR);
?>
How?

edbr
07-09-2010, 07:29 AM
try localhost instead of "74.53.185.149"

Richard Diedrick
07-09-2010, 01:15 PM
Thanks for the reply but if I use localhost I get the mySQL table that I use for testing on my Wamp server. The site address 74.53.185.149 gets me to the correct database my real question is how the password rd9149 which is correct is being turned into YES??

edbr
07-10-2010, 02:25 AM
ah dint get that. that is the ip address yes? then try mysql.74.53.185.149 which may be the mysql server . if you have enabled remote access on your server your connection details should be given by your hoster, assuming they allow remote access, some dont for security reasons

Richard Diedrick
07-10-2010, 08:15 AM
The site allows connection and have set up all of the required info at the server the problem is the the code below
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_Remote = "74.53.185.149";
$database_Remote = "rdied_osc1";
$username_Remote = "rdied_richard";
$password_Remote = "rd9149";
$Remote = mysql_pconnect($hostname_Remote, $username_Remote, $password_Remote) or trigger_error(mysql_error(),E_USER_ERROR);
?>
is generating a password of YES instead of rd9149 which is what the sever is expecting and I do not understand based on the code above why it is generating the wrong password?

edbr
07-10-2010, 07:40 PM
YES is confirmation you use a password not the password itself

Richard Diedrick
07-10-2010, 07:51 PM
Again thanks for the reply but still does not explain why acccess is being denied. If the YES means a password was used ok there was but still no acceses which is the real problem. Any idea why? Is there a property or setting in Dreamweaver for authentication? I get the following error when trying to create a database connection;mysql error#2000 mysql cannot connect to my sql 4.1+ using old authentication. Any ideas would be greatly appreciated thanks

edbr
07-12-2010, 02:23 AM
i would say the problem is on your server.
as a matter of course check all paramaters, the server address-user name password with the details given when you created the user on your server, did you give the correct permissions etc.
does the connection work on your server live?