Hi David,
Hope all is going well.
Wonder if you could help me resolve an error that's being displayed when I install PT on my hosted space. I have PT running fine on WAMP (locally) but every time I run setup.php on the hosted space I get the message:
Checking database connection...PASS
Checking database selection...FAIL check $config_databaseName value
Checking database tables...FAIL
I can see from other posts on the forum the issue is the database name value. I have checked the value in config.php and it looks fine. The hosting company tell me all is fine on their side so I wondered if you could suggest how I might resolve this.
Thanks in advance.
Regards
Chris
Hi David,
Thanks as always for the quick response.
I made the change you specified to setup.php and the result was:
Checking database connection...PASS
Checking database selection...FAIL check $config_databaseName value [Access denied for user 'uhed_717830_0001'@'%' to database 'hedgecutterreviewsc_17830_db1']
Checking database tables...FAIL [Access denied for user 'uhed_717830_0001'@'%' to database 'hedgecutterreviewsc_17830_db1']
Could you suggest what might be causing this?
Thanks in advance.
Regards
Chris
Hi Chris,
As it is an access denied error there won't be any work-around in PHP i'm afraid as MySQL accounts and their privileges are entirely managed within the database.
Copy the error message exactly as returned by MySQL to your host:
Access denied for user 'uhed_717830_0001'@'%' to database 'hedgecutterreviewsc_17830_db1
...and they should be able to correct the privileges for the "uhed_717830_0001" user so that it has access to the database hedgecutterreviewsc_17830_db1
Cheers,
David.
--
PriceTapestry.com
Hi David,
I did as you suggested and forwarded the error message above to the hosting company. They say that since I can access PHPMyAdmin with the credentials that it's working and it's a scripting error! They said that it's because setup.php is submitting the username wrongly as "'uhed_717830_0001'@'%'" to database instead of 'uhed_717830_0001'. Can you confim that the "@'%'" is not submitted? Is there any other way you could suggest I can prove to the hosting co that the problem is with them?
Thanks in advance.
Regards
Chris
Hi Chris,
Internally, MySQL expands the username provided by the mysql_connect() function (so the value you specify for $config_databaseUsername in config.php) into:
'username'@'%'
which is a fully qualified MySQL username. The part after @ is the host name, and % is a wildcard, which means all hosts - this is all described at:
http://dev.mysql.com/doc/refman/5.0/en/account-names.html
Maybe sending the above link to your host should help them understand the issue; but if they're still not able to help if you would like me to look at your phpMyAdmin and see if there are any clues I will happily do that - email me the details and a copy of your config.php and I'll check it out for you!
Cheers,
David.
--
PriceTapestry.com
Hi David,
I forwarded the link above and the hosting co helpdesk are going to 'escalate' the issue! I will let you know what the outcome is!
Thanks again for your help.
Regards
Chris
Hi David,
Just to let you know the hosting co resolved this issue at 3.30am last night!..it appears to have been a problem at their end.
Thanks again for your support in getting this resolved.
Regards
Chris
Hi Chris,
In setup.php, look for the following code at line 139:
print ($result ? "PASS" : "FAIL <strong> ".$help.($testsFailed?"":$noPreFailHelp)."</strong>");
...and REPLACE with:
print ($result ? "PASS" : "FAIL <strong> ".$help.($testsFailed?"":$noPreFailHelp)."</strong> [".mysql_error()."]");
This will display extended MySQL error information where a setup test failed. If you're still not sure let me know what is displayed (or if nothing is displayed of course) and I'll check it out further with you...
Cheers,
David.
--
PriceTapestry.com