Page 1 of 1

adding custom fields won't connect to database

Posted: Fri Oct 21, 2011 3:35 pm
by Nathanoj
Script URL: http://ambitechstrous-help.com/
Version of script: 2.3
Hosting company: hostgator
URL of phpinfo.php: http://ambitechstrous-help.com/phpjunkyardfiles/
URL of session_test.php: http://ambitechstrous-help.com/phpjunkyardfiles/
What terms did you try when SEARCHING for a solution:
custom fields
connect database

Write your message below:
My site is working fine until I go to the custom fields page to add a field. Then I get this message:
Could not connect to MySQL database using provided information! Please double-check your database settings

I tried turning on the debug mode, as I saw in another post, but I couldn't find where it would spit something out that was helpful.

I don't understand how the rest of the database functions can be working fine until I want to add a custom field.

Any help is appreciated. Thanks!
Jon

Re: adding custom fields won't connect to database

Posted: Fri Oct 21, 2011 3:47 pm
by Klemen
It doesn't make much sense, no.

But, if everything else works fine you can try deleting these two lines of code from file "admin_settings.save.php":

Code: Select all

$set_link = @mysql_connect($set['db_host'],$set['db_user'],$set['db_pass']) or hesk_error($hesklang['err_dbconn']);
if (!(@mysql_select_db($set['db_name'],$set_link))) {hesk_error($hesklang['err_dbsele']);}

Re: adding custom fields won't connect to database

Posted: Mon Oct 24, 2011 9:06 pm
by Nathanoj
Thanks for your help, Klemen. I took your advice and the end state is that it seemed to be a database user issue. I don't totally understand it but it's working now!

Sincerely,
Jon