View Full Version : Unable to connect to database : Check the connection script.

Wayne McBryde
10-27-2003, 06:51 PM
Trying to install on a Cobalt RAQ4 server, Linux 2.2, PHP 4.1.2-3, MySQL 3.23.54-1, phpMyAdmin 2.2.6.

I managed to install the database and tables using the manual install outlined in the instructions. When I enter domain.com/phpdig/index.php I get “Unable to connect to database : Check the connection script”.

Using phpMyAdmin, I can verify the database and tables are there.

Using Shell, I can enter “SHOW DATABASES” and the database is there. “SHOW TABLES” verifies the tables are there. I do this using the same user id / P/W that is setup in phpdig files “connect.php” and “config.php”.

Please help! I would really like to get this working.


10-28-2003, 07:08 PM
Hi. Did you add a prefix to the tables?

Wayne McBryde
10-29-2003, 05:24 AM
no prefix. the files are in a folder called "phpdig" in the root of the web.

Other thoughts:
1, I uploaded the files with Microsoft FrontPage. Could this be a problem? I am planning to retry the install using wsftp later today. I will post the results of this approach.

2, I need to be able to index 1000 to 2000 web sites. Will this be a problem?


11-02-2003, 03:02 PM
I have exacly the same problem. After trying to install, i can't go back to instll.php- no connection to database-

is perhaps the open_basedir in the server configuration the point of problem ?

Wayne McBryde
11-03-2003, 05:49 AM
More info here:

11-03-2003, 07:26 PM
linux file permissions are called chmod. I was getting the same error and I fixed it by chmoding my connect.php file and the includes folder to 777. Works like a charm now. Perhaps the phpdig guys should mention these permissions in the documentation section.

11-04-2003, 09:03 AM
In all fairness, it does say in the documentation:

...set the file permissions to writable on the following directories, for the suid Apache server is running :



Setting a file or folder to writable means to CHMOD it to 777. But I think it would be a better idea to mention the CHMOD 777 in the document to prevent anyone from overlooking it.

CHMOD 777 will allow you to 'write' into the connect.php script the required information to connect to your database. If it is not 'writable', then basically your install script will fail, and no information will help you connect to your SQL database.

11-04-2003, 11:08 AM
i solved this problem by upload the files to the root directory. the installation works fine.