Error: Cannot connect to the database

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
stevemine1
Posts: 2
Joined: Fri Jan 25, 2013 11:09 am

Error: Cannot connect to the database

Post by stevemine1 »

Script URL: http://www. unionregistrarsng.com/servicedesk
Version of script: 2.3
Hosting company: ixwebhosting.com
URL of phpinfo.php: http://www.unionregistrarsng.com/phpinfo.php
URL of session_test.php:
What terms did you try when SEARCHING for a solution: Error: Can't connect to database

Write your message below:
I bought a license last year and all had been well, but recently the site was hacked and the hesk directory deleted. So i had to re-install the same old hesk download and applied the old license again. Problem is, it is not connecting to the database.

I need urgent help cos the client is not happy at all.

Steve
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Error: Cannot connect to the database

Post by Klemen »

Try this:

1. download file hesk_settings.inc.php from the server

2. open it in a text editor and change

Code: Select all

$hesk_settings['debug_mode']=0;
to

Code: Select all

$hesk_settings['debug_mode']=1;
3. also, verify values you have set for database connection, located in lines starting with
$hesk_settings['db_host']
$hesk_settings['db_name']
$hesk_settings['db_user']
$hesk_settings['db_pass']
$hesk_settings['db_pfix']

4. save, upload and test - what exact error message do you get now?
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
stevemine1
Posts: 2
Joined: Fri Jan 25, 2013 11:09 am

Re: Error: Cannot connect to the database

Post by stevemine1 »

I made changes as recommended, and even re-created d database with new user and password. Surprisingly, everything worked well. I didnt make any changes but i thank you.
steve
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Error: Cannot connect to the database

Post by Klemen »

If everything is fine make sure you have debug mode turned off (admin panel > Settings > Help Desk tab > Features > Debug mode).
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
Post Reply