PDA

View Full Version : Can't connect to Database


liquidice
01-05-2005, 10:04 AM
I am trying to get this going on a different machine. What version of Mysql do I need.

vinyl-junkie
01-05-2005, 08:16 PM
Here's something from the phpdig documentation (http://www.phpdig.net/navigation.php?action=doc#toc4):

PhpDig requires a Web server (Apache is my preference) with Php (module or cgi), and a MySql database server.

The following configurations were tested :
Php/4.1.1, Apache/1.3.20 (Win32), Windows 2000 ;
Php/4.1.2, Apache/1.3.23 (Unix) mod_ssl/2.8.7, Linux kernel 2.4.3 ;
Php/4.3.0, Apache/2.0.44 (Unix) OpenSSL/0.9.6g, Linux kernel 2.4.18;
Php/4.3.1, Apache/2.0.44 (Win32), Windows 2000 .

liquidice
01-11-2005, 03:01 AM
This the exact same setup that I have been using. I only got this message after trying to upgrade.

Charter
01-11-2005, 04:19 AM
What is the exact error message? Try checking that the connect.php file has the correct database information and also see the following link: http://www.phpdig.net/navigation.php?action=doc#toc5

liquidice
01-12-2005, 02:50 AM
can't connect to database
verify connection datas.

Charter
01-12-2005, 12:58 PM
That message appears when you don't enter the correct information in the install page form for your database.

liquidice
01-13-2005, 01:48 AM
So what information do I need to enter to get it to work?

Charter
01-13-2005, 02:21 AM
It is your database information to enter, so I have no idea what you should enter.

liquidice
01-13-2005, 02:55 AM
host name = localhost
Port = none
sock = none
username = my username
password = my password
phpdig database = phpdig
tables prfix = I left it blank.


Hope this information helps

Charter
01-13-2005, 03:18 AM
If you do not use port or sock, then leave port and sock blank, i.e., do not stick the word none in those text fields. If that doesn't work, you'll need to check with your host for the correct information.

liquidice
01-13-2005, 04:20 AM
I am hosting this from my own machine. I left the sock and port blank and it still gave me the same error message.

Charter
01-13-2005, 05:21 AM
The install script cannot mysql_connect(...) to your database, so you need to figure out the correct values to enter in the install form. I cannot tell you the values, as it's your machine.

liquidice
01-15-2005, 12:25 AM
I think I filled in all the correct info that it needs. Now is giving me an error of
Unable to connect to database : Check the connection script.

What do I need to modify in the connection script in order to go further?

Charter
01-15-2005, 05:07 AM
Look at PHPDIG_DB_HOST, PHPDIG_DB_USER, and PHPDIG_DB_PASS in the connect.php file, as at least one of them is wrong.

liquidice
01-15-2005, 11:59 PM
these are values for connect.php

define('PHPDIG_DB_PREFIX','');
define('PHPDIG_DB_HOST','<192.168.1.102>');
define('PHPDIG_DB_USER','<myusername>');
define('PHPDIG_DB_PASS','<mypassword>');
define('PHPDIG_DB_NAME','<phpdig>');


I think these values are correct, but I am unsure. I think it might have to do with my MYSQL server.

Charter
01-16-2005, 12:40 PM
It looks like you have < and > in the constant definitions. See section 3.5 of the documentation (http://www.phpdig.net/navigation.php?action=doc#toc3) for further information.

liquidice
01-16-2005, 11:17 PM
Charter

thanks for your help. I am skipping 1.8.6 and going to 7, which I already installed. 1.8.7 works better. Again thanks for all your help.