adding custom fields won't connect to database

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Nathanoj
Posts: 18
Joined: Fri Sep 23, 2011 2:15 pm

adding custom fields won't connect to database

Post 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
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: adding custom fields won't connect to database

Post 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']);}
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Nathanoj
Posts: 18
Joined: Fri Sep 23, 2011 2:15 pm

Re: adding custom fields won't connect to database

Post 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
Post Reply