Posted on: 03/31/04 08:22pm
By: Anonymous (kaptainkaffeine)
I'm having some trouble with the http_referer plugin. It worked a while ago, then I decided to perform a new install of geeklog 1.3.9. Now that 1.3.9 is installed and working properly, http_referer won't work. I've placed all the files in all of the necessary directories, then head to http://mysite.com/admin/plugins/http_referer/install.php. I'm faced with my geeklog site (blocks, that is) with an empty middle section. Nothing I've tried will make it install. I have deleted the MySQL tables it used, thinking that it might be running into existing ones, but still nothing. Just nothing. Thanks in advance for the help!
HTTP_REFERER won't install in 1.3.9
Posted on: 03/31/04 11:50pm
By: Peter_Apockotos
What errors are you getting? I installed this on a fresh install of 1.3.9 and it is working fine.
HTTP_REFERER won't install in 1.3.9
Posted on: 04/01/04 12:59am
By: Anonymous (kaptainkaffeine)
[QUOTE BY= Peter_Apockotos] What errors are you getting? I installed this on a fresh install of 1.3.9 and it is working fine.[/QUOTE]
Absolutely none, that's the weird thing. All I get are the geeklog blocks and a blank middle area. No errors whatsoever. It never says "Trying to..." anything. It's like it's not even executing the .php.
HTTP_REFERER won't install in 1.3.9
Posted on: 04/20/04 08:52pm
By: machinari
here is an error for you...
Warning: Wrong parameter count for str_replace() in "/pathtogeeklogpublic_html/plugins/http_referer/functions.inc on line 208"
any ideas.. installed on a clean 1.3.9 GL
HTTP_REFERER won't install in 1.3.9
Posted on: 04/21/04 02:02am
By: Peter_Apockotos
This is what is around line 208 of the functions.inc:
// Unregister the plugin with Geeklog
// Always attempt to remove these entries or lib-common.php would still
// try and read our functions.inc file ...
COM_errorLog('Attempting to unregister the plugin from Geeklog',1);
DB_query("DELETE FROM {$_TABLES['plugins']} WHERE pi_name = 'http_referer'");
COM_errorLog('...success',1);
COM_errorLog('leaving plugin_uninstall_http_referer',1);
return true;
Which tells me that you had a previous version and did not follow the instructions before (re)installing the plugin.
4) Uninstallation
In order to prevent accidental uninstallation, a row is added to gl_var. The
var name is http_referer, if this is set to 1, you can NOT uninstall the plugin.
Delete this row, or set to 0 to uninstall the plugin, then delete using the
plugin admin option. Simple.
HTTP_REFERER won't install in 1.3.9
Posted on: 04/21/04 04:20pm
By: machinari
never installed this plugin before... first time (on this site)
and as far as i can tell, there was no line created in the db for this.
HTTP_REFERER won't install in 1.3.9
Posted on: 04/21/04 04:42pm
By: Peter_Apockotos
The first time I installed this plugin I accidentally hit install twice and it didn't work. So look for the following then uninstall it and remove all instances of the plugin on your web server and reinstall it.
4) Uninstallation
In order to prevent accidental uninstallation, a row is added to gl_var. The
var name is http_referer, if this is set to 1, you can NOT uninstall the plugin.
Delete this row, or set to 0 to uninstall the plugin, then delete using the
plugin admin option. Simple.
HTTP_REFERER won't install in 1.3.9
Posted on: 04/21/04 05:31pm
By: machinari
found it! the row wasn't added to gl_vars, but to gl_plugins.
thanks, tis all good. at least till i give it another shot.
HTTP_REFERER won't install in 1.3.9
Posted on: 04/22/04 04:38am
By: machinari
well, i dunno what file you're looking at, but line 208 in functions.inc says
$urlwww = str_replace( 'www.', '', $_CONF['site_url'], 1 )
the context is
/**
* http_referer_log()
* Log the HTTP_REFERER to the table <prefix>Http_referer
*/
function http_referer_log()
{
global $_CONF,$_TABLES;
$referer = getenv("HTTP_REFERER");
// Ignore the following
$urlwww = str_replace( 'www.', '', $_CONF['site_url'], 1 );
if(
$referer == "" // No referer
OR eregi( "^unknown", $referer ) // Unknown referer
OR substr( $referer, 0, strlen( $_CONF['site_url'] ) ) == $_CONF['site_url'] // starts with site url
OR substr( $referer, 0, strlen( $urlwww ) ) == $urlwww // site url with www. removed
)
{
} else {
// Searches:
if( $_CONF['http_referer_qsp'] == 1 )
{
http_referer_check_queries( $referer );
}
$referer = substr( $referer, 0, 255 );
$ipaddress = $_SERVER['REMOTE_ADDR'];
$timestamp = time();
$sql = "insert into ".$_TABLES['http_referer']." (referer, ipaddress,"
. "tstamp ) VALUES ('$referer','$ipaddress','$timestamp')";
$result = DB_query( $sql );
}
}
so anyways, i made sure everything was outa the database, and started over. no luck on 2 out of 3 sites all using GL_1.3.9
all i can figure is that maybe the INT parameter is not supported by the version of php on my host (but i really dunno what that 1 is doing there anyway). hmmm.. 4.3.5 works but 4.3.4 and 4.3.3 don't.
I remain clueless
HTTP_REFERER won't install in 1.3.9
Posted on: 08/17/04 05:00pm
By: jbpaul17
I'm getting the same error on my site (www.jeffandcrystal.com):
Warning: Wrong parameter count for str_replace() in /home/*******/public_html/plugins/http_referer/functions.inc on line 208.
I'm running the most current version of GL and PHP version 4.3.8.
Any thoughts?