Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Thursday, May 23 2013 @ 02:53 PM EDT


 Forum Index > Support > Plugin Support New Topic Post Reply
 HTTP_REFERER won't install in 1.3.9
   
Anonymous: kaptainkaffeine
 03/31/04 08:22PM (Read 6126 times)  



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!

 
 Quote
Peter_Apockotos
 03/31/04 11:50PM  
++---
Junior

Status: offline


Registered: 03/18/04
Posts: 29
What errors are you getting? I installed this on a fresh install of 1.3.9 and it is working fine.

 
Profile Email Website
 Quote
Anonymous: kaptainkaffeine
 04/01/04 12:59AM  



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.


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.

 
 Quote
machinari
 04/20/04 08:52PM  
+++++
Full Member

Status: offline


Registered: 03/22/04
Posts: 1512
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

 
Profile Email
 Quote
Peter_Apockotos
 04/21/04 02:02AM  
++---
Junior

Status: offline


Registered: 03/18/04
Posts: 29
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.

 
Profile Email Website
 Quote
machinari
 04/21/04 04:20PM  
+++++
Full Member

Status: offline


Registered: 03/22/04
Posts: 1512
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.

 
Profile Email
 Quote
Peter_Apockotos
 04/21/04 04:42PM  
++---
Junior

Status: offline


Registered: 03/18/04
Posts: 29
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.

 
Profile Email Website
 Quote
machinari
 04/21/04 05:31PM  
+++++
Full Member

Status: offline


Registered: 03/22/04
Posts: 1512
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.

 
Profile Email
 Quote
machinari
 04/22/04 04:38AM  
+++++
Full Member

Status: offline


Registered: 03/22/04
Posts: 1512
well, i dunno what file you're looking at, but line 208 in functions.inc says
PHP Formatted Code
$urlwww = str_replace( 'www.', '', $_CONF['site_url'], 1 )
 

the context is
PHP Formatted Code
/**
  * 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

 
Profile Email
 Quote
jbpaul17
 08/17/04 05:00PM  
+++--
Chatty
confused

Status: offline


Registered: 05/14/04
Posts: 49
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?

 
Profile Email Website
 Quote
Content generated in: 0.84 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content