PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Troubleshooting

Reply
 
Thread Tools
Old 02-24-2006, 02:56 PM   #1
cpeter
Green Mole
 
Join Date: Feb 2006
Posts: 1
Exclamation Spider problem, Search mb_ereg_replace problem. (Fixed?!)

Hi,

I would really like to use phpdig to index my pages but it's very complicated to make actually work.

After a fresh install: Suse 9.3, Apache 2.0, PHP 5.1.1 the spider stopped after displaying the wait .. message.
I say that at
admin/robots_functions.php line 650 (
if (!mb_eregi('[0-9a-z[:space:]'.$lotsa_chars.']+',$answer)) { ) the script died.
Once I saved this file as UTF-8 the script worked at that line, but then I had other problem. Headers ware not sent becouse output already started becouse of the UTF-8 chars at the beginning of the file.

This I solved by adding ob_start(); at the begining of config.php.

At this step the spider was able to find the links and find the pages from the site, BUT keywords ware not processed.

Digging further I saw that
libs/phpdig_functions.php, phpdigEpureText function has two lines:
$text = mb_ereg_replace("^([\x00-\x1f]|[\x21-\x2f]|[\x3a-\x40]|[\x5b-\x60]|[\x7b-\x7f])+","",$text); //off front only
$text = mb_ereg_replace("([\x00-\x1f]|[\x21-\x2f]|[\x3a-\x40]|[\x5b-\x60]|[\x7b-\x7f])+$","",$text); //off back only

These two lines maked the $text emty for some reason.
When I removed these two lines the keywords ware found and indexed.

Now when I try to search something I get the warnings
Warning: mb_ereg_replace() [function.mb-ereg-replace]: mbregex compile err: premature end of char-class
Damn ... I tought it'll work after so much trouble.

If I disable (comment) the lines in libs/search_functions.php
$query_to_parse = mb_ereg_replace("^([\x00-\x1f]|[\x21-\x2c]|[\x2e-\x2f]|[\x3a-\x40]|[\x5b-\x60]|[\x7b-\x7f])+","",$query_to_parse); //off front only
$query_to_parse = mb_ereg_replace("([\x00-\x1f]|[\x21-\x2c]|[\x2e-\x2f]|[\x3a-\x40]|[\x5b-\x60]|[\x7b-\x7f])+$","",$query_to_parse); //off back only
$query_to_parse = trim(mb_ereg_replace(" ([\x00-\x1f]|[\x21-\x2c]|[\x2e-\x2f]|[\x3a-\x40]|[\x5b-\x60]|[\x7b-\x7f])+"," ",$query_to_parse));
$query_to_parse = trim(mb_ereg_replace("([\x00-\x1f]|[\x21-\x2c]|[\x2e-\x2f]|[\x3a-\x40]|[\x5b-\x60]|[\x7b-\x7f])+ "," ",$query_to_parse));

search will work just fine.

.htaccess has the lines:
PHP_VALUE default_charset UTF-8
PHP_VALUE mbstring.func_overload 0
PHP_VALUE mbstring.encoding_translation On
(phpinfo() confirms this. mbstring is loaded)

Can anybody tell me what I made wrong to have so much problem with the install? I don't beleave that everybody had so many problems installing phpdig becouse then very few would use it. Maybee the author of the script can give a hint how to solve this issue (i'm willing to help him to test on my server).

Any suggestion is greatly apreciated!
Bes tregards,
Peter Csaba
www.webnova.ro
cpeter 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
spider.php problem digdug Script Installation 8 10-18-2006 08:25 AM
Problem running spider from Command Line joshuag200 Troubleshooting 17 09-13-2004 08:57 PM
phpdig spider hangs (a powerpoint file problem) davideyre Troubleshooting 1 03-29-2004 01:35 PM
Indexing problem: PhpDig will not spider all of the site mih Troubleshooting 5 03-25-2004 12:54 AM
Spider Problem i_am_cam Troubleshooting 11 12-29-2003 08:45 AM


All times are GMT -8. The time now is 12:30 AM.


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