Posted on: 02/04/07 04:05pm
By: AA6QN
I have a fresh install of Geeklog 1.4.1 When I try to change data in the My Accounts personal section I get the error below.
2 - strpos() [function.strpos]: Empty delimiter. @ /some-location/geeklog/plugins/spamx/SLVbase.class.php line 159
If I disable the SPAMX plugin, the personal updates work fine.
The install went well. The only difference is that I am using: $_CONF['site_url'] = ''; for site url in the /geeklog/config.php since the server is headless in a DMZ.
Other than the error above all seems to be working 5x5
Best Regards, JohnF
Re: SPAMX Empty delimiter error
Posted on: 02/04/07 04:17pm
By: Dirk
Quote by: AA6QNIThe only difference is that I am using: $_CONF['site_url'] = ''; for site url in the /geeklog/config.php since the server is headless in a DMZ.
And that's the problem exactly, since the error occurs where it checks if the links contain the site's URL so as not to report them to SLV.
Try this:
Text Formatted Code
if (!empty ($_CONF['site_url']) && strpos ($url, $_CONF['site_url']) === 0) {
(for line 159 in SLVbase.class.php)
You should also add your site's domain name to the SLV whitelist then.
bye, Dirk
Re: SPAMX Empty delimiter error
Posted on: 02/04/07 04:26pm
By: AA6QN
Your fast!!
Yes I did take at look at:
* Extract links
*
* Extracts all the links from a post; expects HTML links, i.e. <a> tags
*
* @param string $comment The post to check
* @return array All the URLs in the post
*
*/
function getLinks ($comment)
{
global $_CONF;
$links = array();
preg_match_all( "/<a[^>]*href=[\"']([^\"']*)[\"'][^>]*>(.*?)<\/a>/i",
$comment, $matches );
for ($i = 0; $i < count ($matches[0]); $i++) {
$url = $matches[1][$i];
if (strpos ($url, $_CONF['site_url']) === 0) {
// skip links to our own site
continue;
} else {
$links[] = $url;
}
}
return $links;
}
And figured something was amiss with the missing site url.
I will give your patch a go and I did add the site to the whitelist.
Blessings, JohnF
Re: SPAMX Empty delimiter error
Posted on: 02/04/07 04:37pm
By: AA6QN
That appears to be working. Thank you a whole bunch!
JohnF