PDA

View Full Version : No Results... No clue why


blackcorvidae
12-14-2004, 07:07 AM
I installed phpdig 1.8.5 on Apache 2 with Php 4.3.1 and Mysql 4.0.11.
So, everything is great, the DB is cool, the spider indexes a ton of pages and there's plenty of info to search, thousands of keywords and stuff to see in Mysql.

But...
any and all search strings from the search.php page come up with no results.

I had a previous version of phpdig (1.6.2) working fine before.

I dropped everything and started from scratch, only dealing with one site.

Anyways,
take a look, any ideas?
http://eclipse.hsclib.temple.edu/search/phpdig-1.8.5/search.php

Oh, when I submit a search, I get the "did you mean" thing and it's always exactly the same word I just searched.

What does that mean?

I'm confused.

Charter
12-14-2004, 12:13 PM
Did you change any config file settings?

blackcorvidae
12-15-2004, 09:40 AM
I didn't change anything...I would have if everything was working for templates and all, but no.

Charter
12-15-2004, 10:19 AM
Check to see whether there is a conflict between the old version and new version (maybe re-FTP the PHP files) and whether the seach is making queries to the correct tables (compare connect.php files). Also, try running the "clean" options from the admin panel.

blackcorvidae
12-15-2004, 10:25 AM
This was a clean install.
I dropped tables from the get-go and even did away with the old distro files all together.

I can query the tables with the mysql command-line client and see whatever I like, but I'll check again to see if the right tables are being queried.

I ran all the clean commands from admin, but it didn't help.

blackcorvidae
12-15-2004, 10:47 AM
Ok, I went into my php.ini file and turned on all error messages (usually suppress warnings), and I'm getting this error on the search.php page:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/html/search/phpdig-1.8.5/libs/search_function.php on line 273

Charter
12-15-2004, 10:55 AM
Okay, in search_function.php find:

$num_res_temp = mysql_num_rows($result);

And right beforehand add:

if (!$num_res_temp) {
echo "The error is: ".mysql_error();
}

And try another search and see what it shows onscreen.

blackcorvidae
12-15-2004, 10:59 AM
Ok, now here's the message:

Notice: Undefined variable: num_res_temp in /var/www/html/search/phpdig-1.8.5/libs/search_function.php on line 273
The error is: Can't create/write to file '/root/tmp/#sql_76b9_0.MYI' (Errcode: 13)
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/html/search/phpdig-1.8.5/libs/search_function.php on line 276


A permission problem?

Charter
12-15-2004, 11:05 AM
The undefined variable is just because the query barfed. The query barfed because it looks like the /tmp directory is not set to writable permission.

blackcorvidae
12-15-2004, 11:22 AM
for some reason Mandrake is using /root/tmp instead of /tmp

I'll change that, fiddle with it and see....

thanks