Can't connect to database! ERROR

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
allielopez
Posts: 8
Joined: Fri Mar 06, 2009 6:46 pm

Can't connect to database! ERROR

Post by allielopez »

Script URL: http://www.phpjunkyard.com/free-helpdesk-software.php
Version of script: 2.0
Hosting company: Network Solutions
URL of phpinfo.php: http://www.mercuryresort.com/helpdesk/admin.php
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Hi Everybody,

I am getting this database error when I try and log into my admin panel. Does anyone know how to fix it?

Thank you!!

Allie
YankeePicker
Posts: 16
Joined: Fri Mar 06, 2009 4:48 pm

Post by YankeePicker »

When I go to: http://www.mercuryresort.com/helpdesk/admin.php I see this error:

Code: Select all

Error

 

Can't connect to database! Please notify webmaster at support@Mercuryresort.com!
Are you able to access the other help desk functions without error? This error indicates the app can't find the MYSQL DB.

*EDIT I just looked around on your support pages, it looks like you have a database problem, check to make sure your MYSQL server is running
allielopez
Posts: 8
Joined: Fri Mar 06, 2009 6:46 pm

Post by allielopez »

Is there a file on there where I could fix that? We recently moved servers...We went from IX Web Hosting to Network Solutions so I had to create a new mySQL database.

I named it "hdesk" because Network Solutions wouldn't let me name it "heldesk". I am not sure what it was called before since I didn't install the original script...not to mention I have no idea about php. Our person got cut and that's why I have the unfortunate luck of trying to fix this. :cry:


This is the process I used:

1.) I re-installed the php script on our new Network Solutions server
2.) I saw the generic help desk so I know it was working
3.) I copied over the files from our old server (is this where things went wrong?)
4.) I see what our old help desk did look like....it's just now with an error.

This is what another one of our help desk is like (still on the old server):
http://www.hotelshelley.com/helpdesk.html
YankeePicker
Posts: 16
Joined: Fri Mar 06, 2009 4:48 pm

Post by YankeePicker »

allielopez wrote:Is there a file on there where I could fix that? We recently moved servers...We went from IX Web Hosting to Network Solutions so I had to create a new mySQL database.

I named it "hdesk" because Network Solutions wouldn't let me name it "heldesk". I am not sure what it was called before since I didn't install the original script...not to mention I have no idea about php. Our person got cut and that's why I have the unfortunate luck of trying to fix this. :cry:
Did it work after changing servers? If not see below. If it did work, something else has changed.

If you changed servers, and renamed the database you will need to make changes to the Hesk config file.

Look for a file named "hesk_settings.inc.php"

Inside of that file you will find a section called "/* Database settings */"

Edit the database settings to match your new server, and you should be OK.
allielopez
Posts: 8
Joined: Fri Mar 06, 2009 6:46 pm

Post by allielopez »

Thank you, Thank you, Thank you!!!!!! That worked!!!!! :D
YankeePicker
Posts: 16
Joined: Fri Mar 06, 2009 4:48 pm

Post by YankeePicker »

Glad to help, best of luck to you.
[color=red]Caution:[/color] YankeePicker may appear smarter than he really is. Advice not to be taken internally. Ask your Doctor if YankeePicker is right for you.
allielopez
Posts: 8
Joined: Fri Mar 06, 2009 6:46 pm

Post by allielopez »

Could I ask you 2 more questions....

Question 1: On Network Solutions, I am only allowed 1 free MySQL database. Is it okay for me to put all the helpdesk tables for 7 hotels on 1 database? Or do I have to buy a separate database for each hotel helpdesk?

Question 2: I didn't figure out that you needed a unique table name for each helpdesk installation until I installed the one for our 3rd hotel and it wouldn't let me re-use the same table name. I'm thinking I must have named the first 2 each different names because it didn't give me that error message before.

Also do you have to have to do the underscore for table names....I have:
  • hdesk
    hdesk_
    hdesk1_
Thank you!!!!!!
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

You can have all the tables in 1 database, just give each installation a unique table prefix. It doesn't matter if it's with an underscore or not.
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
allielopez
Posts: 8
Joined: Fri Mar 06, 2009 6:46 pm

Post by allielopez »

Thank you!!! :D
allielopez
Posts: 8
Joined: Fri Mar 06, 2009 6:46 pm

Post by allielopez »

And one itsy bitsy more question....So I thought everything was working fine until I realized. On some of my sites all the inquiry categories copied over fine. For example here:

http://www.thechesterfieldhotel.com/helpdesk.html


But on others it didn't:

http://www.hotelshelley.com/helpdesk.html


What could I do to correct this?

Thank you!!!!!!
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

The second script is probably reading from the wrong database.
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
allielopez
Posts: 8
Joined: Fri Mar 06, 2009 6:46 pm

Post by allielopez »

Oh okay I see it. So I changed my server path on the Shelley one to this:

$hesk_settings['server_path']='/data/18/1/128/34/1780197/user/1925442/htdocs/hotelshelley/helpdesk';


Is that the only place I need to change it? I still don't see the old categories up.

Thank you for you help!!
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

No, the problem is probably DATABASE name, username and password (the second copy of the script reads from a database which hasn't got any other categories, just the default one.).
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
allielopez
Posts: 8
Joined: Fri Mar 06, 2009 6:46 pm

Post by allielopez »

Ohh, so that doesn't automatically update with just copying over the old files to the new server? Is that something I have to update in the admin panel?

I think I see what you mean when I compare the old php admin panel to the new one....It looks like if in the old one the tables have alot more ids, fields, etc.

Is it safe for me to assume that we better ask the people who installed the first one to re-install this one?

Thank you!!!!
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Exactly, the database is not copied automatically, you need to copy it manually using a tool like phpMyAdmin.
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