|
01-20-2004, 02:08 PM | #1 |
Green Mole
Join Date: Jan 2004
Posts: 6
|
Install did not work
Installed and configured phpdig, but am getting the following error from the phpdigdir/search.php page:
Parse error: parse error, unexpected T_STRING in /<dir>/includes/connect.php on line 22 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /<dir>/libs/mysql_functions.php on line 38 Unable to check table. Check connection parameters ---------- I was receiving the previous error message on the same page: Table engine missing. Table excludes missing. Table keywords missing. Table sites missing. Table spider missing. Table tempspider missing. Table logs missing. I fixed this by looking up a thread here from someone with the same problem. I changed the following from connect.php: define('PHPDIG_DB_PREFIX','<dbprefix>'); to: define('PHPDIG_DB_PREFIX',"); However, this fix created the problem listed at the top. Any help would be suggested and I'll be glad to provide more information if it will help you. -David |
01-20-2004, 04:02 PM | #2 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. Check that the database tables exist and that the information in the connect.php file matches that for the database.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
02-04-2004, 01:09 PM | #3 |
Green Mole
Join Date: Jan 2004
Posts: 6
|
Install did not work
Here is what I pulled from mysql:
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 872 to server version: 3.23.54 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> SHOW TABLES; +------------------+ | Tables_in_phpdig | +------------------+ | engine | | excludes | | keywords | | logs | | sites | | spider | | tempspider | +------------------+ 7 rows in set (0.01 sec) mysql> Here is what I have in: /phpdigdir/includes/connect.php <?php /* -------------------------------------------------------------------------------- PhpDig Version 1.6.x This program is provided under the GNU/GPL license. See the LICENSE file for more information. All contributors are listed in the CREDITS file provided with this package. PhpDig Website : http://www.phpdig.net/ -------------------------------------------------------------------------------- */ // Connection configuration define('PHPDIG_DB_PREFIX',"); define('PHPDIG_DB_HOST','localhost'); define('PHPDIG_DB_USER','*****'); define('PHPDIG_DB_PASS','********'); define('PHPDIG_DB_NAME','phpdig'); //connection to the MySql server $id_connect = @mysql_connect(PHPDIG_DB_HOST,PHPDIG_DB_USER,PHPDIG_DB_PASS); if (!$id_connect) { die("Unable to connect to database : Check the connection script.\n"); } //Select DataBase @mysql_select_db(PHPDIG_DB_NAME,$id_connect); ?> I am still receiving the following message when I go to the search.php page: Parse error: parse error, unexpected T_STRING in /home/dplatt/public_html/chs/search/includes/connect.php on line 22 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/dplatt/public_html/chs/search/libs/mysql_functions.php on line 38 Unable to check table. Check connection parameters Please advise. -David |
02-04-2004, 09:00 PM | #4 |
Purple Mole
Join Date: Jan 2004
Posts: 694
|
Re: Install did not work
Double-check and see how your web host actually defines the database name. Mine appends my account name to the database name, so instead of the db name being phpdig, it might be:
accountname_phpdig. Also make sure you have username and password spelled correctly. Case sensitivity applies, too, so double-check that as well. Let us know if any of these suggestions help solve the problem. |
02-05-2004, 09:35 AM | #5 |
Green Mole
Join Date: Jan 2004
Posts: 6
|
I checked this. I am running Apache on my RH9 box. This wasn't required. Any other ideas? I'm going a little crazy trying to figure it out.
|
02-05-2004, 09:55 AM | #6 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. What happens when you change localhost to 127.0.0.1, or does your Hosts file contain a "127.0.0.1 localhost" line?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
02-05-2004, 10:31 AM | #7 |
Green Mole
Join Date: Jan 2004
Posts: 6
|
I continue to get the same error. Here is what I have in the hosts file. Maybe this will enlighten someone:
[root@frodo etc]# vi hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 frodo localhost.localdomain localhost Just for your information, I did try setting the DB_HOST line to both localhost, frodo, and 127.0.0.1. The phpdig database was created under localhost, which I did manually and just rechecked under phpmyadmin. Any more ideas? -David |
02-05-2004, 11:52 AM | #8 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. Do your username and/or password contain any special characters?
In connect.php replace the following: PHP Code:
PHP Code:
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
02-05-2004, 01:48 PM | #9 |
Green Mole
Join Date: Jan 2004
Posts: 6
|
I received the following by calling the connect.php directly:
Parse error: parse error, unexpected T_STRING in /home/dplatt/public_html/chs/search/includes/connect.php on line 21 Here is the code from connect.php: // Connection configuration define('PHPDIG_DB_PREFIX',"); define('PHPDIG_DB_HOST','localhost'); define('PHPDIG_DB_USER','*****'); define('PHPDIG_DB_PASS','*****'); define('PHPDIG_DB_NAME','phpdig'); //connection to the MySql server $id_connect = mysql_connect(PHPDIG_DB_HOST,PHPDIG_DB_USER,PHPDIG_DB_PASS) or die("Could not connect: " . mysql_error()); if (!$id_connect) { die("Unable to connect to database : Check the connection script.\n"); } //Select DataBase @mysql_select_db(PHPDIG_DB_NAME,$id_connect); ?> Thanks, David |
02-05-2004, 03:39 PM | #10 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. Do your username and/or password contain any special characters?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
02-05-2004, 06:05 PM | #11 |
Purple Mole
Join Date: Jan 2004
Posts: 694
|
Your code looks correct, but I suspect Charter is right. Check for special characters in your username and password, as that could cause problems.
Also, I'm not sure exactly what line number 21 is in your code, where you're getting the error, but try putting a die() statement in the code just about line 21 and include within the parenthesis whatever variable name is being referenced in line 21. That might give you a clue as to what the problem is. <added> And unless what's on line 21 is a password or other sensitive information, or the problem just leaps out at you after following my suggestion or what Charter said to do, please post the results of the die() statement. Thanks. </added> Last edited by vinyl-junkie; 02-05-2004 at 06:21 PM. |
02-06-2004, 01:15 AM | #12 |
Green Mole
Join Date: Feb 2004
Posts: 1
|
Try changing this line
// Connection configuration define('PHPDIG_DB_PREFIX',"); It looks like you have a double quote ( " ) instead of two singles. |
02-06-2004, 08:35 AM | #13 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Hi. Good eye Core! Yes, change that to two single quotes with no space inbetween.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
02-17-2004, 10:31 AM | #14 |
Green Mole
Join Date: Jan 2004
Posts: 6
|
That did it.
Gotta love discussion groups to get this stuff solved. Don't know why I didn't see two single quotes instead of double. Thank you, -David |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
not work | isababa | Troubleshooting | 3 | 08-30-2005 05:54 PM |
It doesn't work | humanitaire.ws | Script Installation | 8 | 12-15-2004 04:37 AM |
Install phpdig in a file named phpdig doesn't work | Sansnom | Script Installation | 1 | 05-09-2004 04:13 PM |
Install did not work-Can't create database. | tams | Script Installation | 10 | 03-13-2004 12:55 PM |
Install won't work | webcat | Script Installation | 1 | 02-28-2004 03:48 PM |