PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Troubleshooting

Reply
 
Thread Tools
Old 01-24-2006, 07:18 AM   #1
sealless
Green Mole
 
Join Date: Jan 2006
Posts: 3
Local install just not spidering

I've been going through this forum over the past two days looking for a solution to my problem. So far I haven't found it. Here's my situation:

I have installed phpdig in a WAMP set up : Apache running on a Win 2K box with php and MySQL of course. Installation was without incident. Spidering... well that never works. Regardless of URI entered I get the same immdiate results

Spidering in progress... [Stop spider]
Optimizing tables...
Indexing complete !

Nothing except an entry in the tempspider table. I get the same results if the URI is http://localhost/some/uri, and if it is some external URI, http://www.somewhere.com. I figured this can't be so hard, right? and so I uploaded the phpdig to my domain.... and it works fine with the same exact configuration. Spiders like crazy, search results are as expected. So at least I know I am not completely losing it.

Anyway... is there something really basic that I am missing with my local configuration? I am at a loss to explain why it works remotely but not locally (and I really need to use it locally).
sealless is offline   Reply With Quote
Old 01-24-2006, 08:47 AM   #2
sealless
Green Mole
 
Join Date: Jan 2006
Posts: 3
oops - I forgot to add :

Apache 2.0.55, php 5.0.5, MySQL 5.0.15 and phpDig 1.8.8.
sealless is offline   Reply With Quote
Old 01-25-2006, 09:25 AM   #3
sealless
Green Mole
 
Join Date: Jan 2006
Posts: 3
Talking

First some more clarification:

The remote system where everything was working:

php 4.3.11
MySQL 4.1.14

Now as to the source of the problem : admin/robot_functions.php,
function phpdigGetSiteFromUrl

Code:
    if ($pu['port'] == 0 || $pu['port'] == 80) {
         $pu['port'] = '';
    }
    else {
         settype($pu['port'],'integer');
    }
Seems harmless enough. But eventually $pu['port'] gets used in this query

Code:
$query = "INSERT INTO ".PHPDIG_DB_PREFIX."sites SET site_url='$url',upddate=NOW(),username='".$pu['user']."',password='".$pu['pass']."',port='".$pu['port']."'";
Field port in the sites table is defined as smallint and when you try to executed this query in MySQL 5 you get this message

Quote:
#1366 - Incorrect integer value: '' for column 'port' at row 1
In MySQL4 the row is inserted with a value of zero for the port, no questions asked. That's why it worked on my remote host but not on my local PC. I would presume this is a "bug" but it could also just be some MySQL configuration issue that can be resolved without a change to the code. In my case I am going to make this quick and dirty change

Code:
    if ($pu['port'] == 0 || $pu['port'] == 80) {
         $pu['port'] = 0;
    }
    else {
         settype($pu['port'],'integer');
    }
to get by.
sealless is offline   Reply With Quote
Old 02-03-2006, 04:06 AM   #4
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Good spot.

Haven't had a chance to test PhpDig on MySQL 5, thread stuck.
__________________
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.
Charter is offline   Reply With Quote
Old 02-04-2006, 08:33 AM   #5
bugmenot
Awaiting Email
 
Join Date: Aug 2005
Location: a
Posts: 4
Thank you for sorting this bug out. Your fix did the trick for me!
bugmenot is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Local Index Not working BiJae Troubleshooting 1 11-13-2006 01:30 PM
Local install just not spidering zuzu Troubleshooting 0 02-28-2006 03:53 AM
Local MacOSX permissions yoyopoc Script Installation 1 07-18-2005 05:07 PM
local index xorex How-to Forum 3 07-25-2004 06:46 PM
On a local network guy Mod Requests 1 04-20-2004 02:07 PM


All times are GMT -8. The time now is 11:50 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.