Advertisement:

Author Topic: httpBL  (Read 375396 times)

Offline snoopy_virtual

  • Sophist Member
  • *****
  • Posts: 1,155
  • Gender: Male
    • jcredondosnoopy on Facebook
    • Snoopy Virtual Studio
Re: httpBL
« Reply #320 on: September 23, 2010, 05:45:16 AM »
It looks like you have a problem with memcache in your server.

Check with your host to see why memcache is not working and, in the mean time, deactivate it in you SMF configuration. The way to do that is different depending on the SMF version you are using and I think you forgot to tell us which one you have.

Ooops sorry about that, its RC 2.0 I think - our site's down at the moment due to a hosting issue.

Will get back to you when I try the above and on all the other stuff.

Thanks

Thing2

In SMF 1.x you need Memcached or any other kind of cache system in your server to be able to activate SMF caching, but in SMF 2.0 you don't need it at all, because SMF 2.0 has its own internal cache system already implemented inside it.

I am actually working on a system to implement the same kind of internal cache system for SMF 1.x (because that's what I use in almost all my forums) but it's not finished yet.

Anyway, as your forum is SMF 2.0 you don't have the same problem I have. The only thing you need to do is activate the internal SMF caching system and deactivate Memcache.

To do that, as soon as your site if on-line again, navigate to:

Admin => Configuration => Server Settings => Caching

Set the "Caching Level" at "Level Caching 1" and leave empty the "Memcache settings".

Or, if you can, contact your host to ask them if Memcached is activated in your server and (if it is) which ones are exactly the Memcache settings you need to use here, but as I said, you don't really need it. The cache will work a little faster with Memcache but only a little more, and I don't think the difference is worth the hassle.
El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

Offline thing2

  • Semi-Newbie
  • *
  • Posts: 19
Re: httpBL
« Reply #321 on: September 23, 2010, 11:12:32 PM »
The server is back up again, was getting a little worried  :(

I had a look and we are already at Level 1 and the memcache settings are blank.  I did notice in the text above this that right at the bottom in red it says: "SMF has not been able to detect a compatible accelerator on your server."  I wonder if this could be the issue?

Thing2

Offline snoopy_virtual

  • Sophist Member
  • *****
  • Posts: 1,155
  • Gender: Male
    • jcredondosnoopy on Facebook
    • Snoopy Virtual Studio
Re: httpBL
« Reply #322 on: September 24, 2010, 10:35:57 AM »
The server is back up again, was getting a little worried  :(

I had a look and we are already at Level 1 and the memcache settings are blank.  I did notice in the text above this that right at the bottom in red it says: "SMF has not been able to detect a compatible accelerator on your server."  I wonder if this could be the issue?

Thing2

I don't understand it.

In SMF 1.x you definitely need a compatible accelerator to be able to activate SMF cache, but in SMF 2.0 you don't need it.

At least (as far as I know) you don't need it if you want Level 1

Have you tried to search the SMF 2.0 support forum to see if anybody else has a similar problem? (or to ask them for help with the cache system)

Maybe after all there is something wrong with your SMF installation.
El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

Offline snoopy_virtual

  • Sophist Member
  • *****
  • Posts: 1,155
  • Gender: Male
    • jcredondosnoopy on Facebook
    • Snoopy Virtual Studio
Re: httpBL
« Reply #323 on: October 02, 2010, 04:43:55 AM »
MOD httpBL v2.4
============


  • Author:
snoopy_virtual
  • Version:
2.4
  • Release:
2nd October 2010
  • Languages:
  • Compatible With:
SMF 1.1.1 - 1.1.11
SMF 2 RC2 - RC3

After so many months busy with other things, I had found finally some time to work for a while in this mod.

I have sorted all the bugs we have been talking about lately here in this thread, I have implemented most of the features requested here as well and I have developed some ideas from my own.

The full list of all the changes in this new version is:

Quote
Version 2.4 - 2nd October 2010
  +Added a new system so now you can decide what group of members you don't
want to be scanned never by the mod
  !Sorted the bug in RC3 we talked about in the support forum. (See here) (and here)
  *Small change in the template file to make the mod compatible with SimplePortal
for people using SMF 1.1.11 (See here)
  !Sorted a bug inside the logs (See here)
  *Changed the design of the page warning.php as requested by giveaway365.com
(here) and discussed in some other places in the support forum
  !Sorted the bug "Undefined index: response" reported so many
times (for example here)
  +Added a system to check if the mod is ON, if it is up-to-date and if the
connexion with HoneyPot's DB is OK
  +Added 2 columns in view-log for "Operative System" and "Browser" using the
Mod OS & Browser Detection
  +Added OS & Browser Detection to the "Who's Online" page
  +Added a checkbox to the config page to decide if you want to view OS & Browser
data in "Who's Online" page
If you want to see these last 3 features you need either to:
  +Added cache values to session so it works if cookies and cache are off
  *Changed completely the system to store and retrieve data from cache and/or session
  +Added a value to the config page to set the amount of minutes to keep the data
in the cache and/or session
  *Replaced my function httpBL_look_for_empty_ip() for the function
httpBL_get_real_ip_address() made by butchs (here)
  *Changed 2 lines and added 20 new lines in language files
  ?Unistall old version and install new one
  ?No need to edit manually any template file if you are updating from version 2.x
unless you are not using the default Theme and you have the file
Who.template.php inside the folder of the particular Theme
you are using
  ?For new installations, as always, you need to edit manually the file index.template.php
if you are not using the default Theme and you will have to edit also the file
Who.template.php if you have it inside the folder of the particular Theme
you are using
Quote
Legend
oFeature
*Change
+Added
-Eliminated
!Bug Fixed
?How to Update

There are too many changes to explain all of them here in detail just now, so I suppose it would be better if you read the explanations I wrote already in my own site.

As you know, in my personal forum I have a section for "Programming - Coding", and inside there I have a section for this MOD httpBL: http://www.snoopyvirtualstudio.com/foro/index.php?board=30.0

Inside that section there is a thread called "For Developers Only" where I write always all the changes I do to the mod and also other developers-programmers give me a hand sorting bugs, testing new features, talking about new ideas, etc.

During the last 10 days I have been implementing all the new features inside this new version and I have published in that thread 3 different "developer" versions of this mod, talking about them with Wizzlefits and butchs, testing them, etc.

So it's better if you read the explanations I wrote in that thread for the 3 "developer" versions:


You can also read the rest of the conversation we had there about these new versions. Some parts maybe are too techy, but even if you don't know too much code you can get the idea.

After that, if you have any questions (or if you find a bug) tell us here.

===============

I want also to say to the guys who already had translated this mod to different languages "I'm very sorry about this": I have changed 2 lines and added 20 new ones in the languages files, so now all the translations are not completed.

It's more work for everybody, but I hope you will enjoy the new features and will think that it was worth the effort.  ;)

Cheers
El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

Offline EL34xyz

  • Semi-Newbie
  • *
  • Posts: 63
Re: httpBL
« Reply #324 on: October 02, 2010, 09:31:10 AM »
Hi Snoop
I just installed 2.4
I see this error in my forum error log file
I xxx'd out the important info

8: Undefined index: REQUEST_URI
File: D:\hshome\xxxx\xxxx.com\Forum\Sources\httpBL_Subs.php
Line: 721

The mod installed without any errors
It accepted my api key and honey pot page url

At the top of the admin mod page it says this
Mod httpBL is ON, it is up-to-date and the connection with HoneyPot is perfect
« Last Edit: October 02, 2010, 09:36:06 AM by EL34xyz »

Offline snoopy_virtual

  • Sophist Member
  • *****
  • Posts: 1,155
  • Gender: Male
    • jcredondosnoopy on Facebook
    • Snoopy Virtual Studio
Re: httpBL
« Reply #325 on: October 02, 2010, 10:22:10 AM »
Hi Snoop
I just installed 2.4
I see this error in my forum error log file
I xxx'd out the important info

8: Undefined index: REQUEST_URI
File: D:\hshome\xxxx\xxxx.com\Forum\Sources\httpBL_Subs.php
Line: 721

Interesting...

So it means sometimes in certain circumstances the global $_SERVER['REQUEST_URI'] is not defined. I hadn't seen that before.

Maybe that's why sometimes we get some "unknown" values.

Luckily that bug is easy to sort (yes butchs, before you say anything the answer is obvious: Using your new function httpBL_get_env()) and maybe at the same time it's going to sort most of the "unknown" values (hope).

Anyway, as soon as I published this version I started thinking in a few things I would have liked to add as well to the mod but realized too late.

Now I have the excuse to do a minor update with this bug sorted plus the couple of things I have been thinking about.

Anyway I will wait for a while just in case somebody else find another bug.   8)

The mod installed without any errors
It accepted my api key and honey pot page url

At the top of the admin mod page it says this
Mod httpBL is ON, it is up-to-date and the connection with HoneyPot is perfect

Glad to hear it. Now just wait a couple of hours and take a look at the logs. You will see how the mod start catching bad guys pretty soon.   ;D
El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

Offline EL34xyz

  • Semi-Newbie
  • *
  • Posts: 63
Re: httpBL
« Reply #326 on: October 02, 2010, 03:32:56 PM »
cool, thanks
I'll wait for an update on the mod

I hope it is soon because I have to reset the forum error log frequently
Every member is creating another one of the error messages
The forum error log becomes huge in a short time

Since I reset the error log this morning, there are six pages of errors

BTW, If you want me to test a patch before you release a new version, just say so
I can edit some variables or whatever to see if the fix works.
« Last Edit: October 02, 2010, 03:40:28 PM by EL34xyz »

Offline snoopy_virtual

  • Sophist Member
  • *****
  • Posts: 1,155
  • Gender: Male
    • jcredondosnoopy on Facebook
    • Snoopy Virtual Studio
Re: httpBL
« Reply #327 on: October 02, 2010, 04:00:36 PM »
BTW, If you want me to test a patch before you release a new version, just say so
I can edit some variables or whatever to see if the fix works.

OK. Try this:

Inside the file httpBL_Subs.php in your Sources folder, around line 721, find this code:

Code: [Select]
$values['url'] = $_SERVER['REQUEST_URI'];
$values['user_agent'] = $_SERVER['HTTP_USER_AGENT'];

Replace it with:

Code: [Select]
$httpBL_url = httpBL_get_env('REQUEST_URI');
$values['url'] = $httpBL_url != '' ? $httpBL_url : '/';
$httpBL_user_agent = httpBL_get_env('HTTP_USER_AGENT');

I think that should sort tour problem.
El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

Offline butchs

  • SMF Hero
  • ******
  • Posts: 1,712
  • Lost 7GB bandwidth!
    • EastCoastRollingThunder
Re: httpBL
« Reply #328 on: October 02, 2010, 05:11:50 PM »
Luckily that bug is easy to sort (yes butchs, before you say anything the answer is obvious: Using your new function httpBL_get_env()) and maybe at the same time it's going to sort most of the "unknown" values (hope).

Sorry, I did not know you were going to release it so fast.  I was not done with the IP code and made comments at your site today.  With updates a few min ago.  I think todays post is the best but it may need some sorting and or movement of the REMOTE_ADDR.

My URI code is different.  I take in account the IIS variations.
« Last Edit: October 02, 2010, 05:22:48 PM by butchs »
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Offline EL34

  • Jr. Member
  • **
  • Posts: 264
Re: httpBL
« Reply #329 on: October 03, 2010, 12:35:53 AM »
Code: [Select]
Inside the file httpBL_Subs.php in your Sources folder, around line 721,

find this code:
$values['url'] = $_SERVER['REQUEST_URI'];
$values['user_agent'] = $_SERVER['HTTP_USER_AGENT'];

Replace it with:
$httpBL_url = httpBL_get_env('REQUEST_URI');
$values['url'] = $httpBL_url != '' ? $httpBL_url : '/';
$httpBL_user_agent = httpBL_get_env('HTTP_USER_AGENT');

Ok snoop
that seems to have worked
The forum error log does not report that error any more

btw, my forum is on a windows server if that makes any difference
« Last Edit: October 03, 2010, 12:39:28 AM by EL34 »
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.14

Offline butchs

  • SMF Hero
  • ******
  • Posts: 1,712
  • Lost 7GB bandwidth!
    • EastCoastRollingThunder
Re: httpBL
« Reply #330 on: October 03, 2010, 09:10:51 AM »
btw, my forum is on a windows server if that makes any difference

Are you using Internet Information Services (IIS) f/k/a Internet Information Server?  If so, it does make a difference.  I just gave sir snoopy some code that should work for it that he may like to test on your server.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Offline EL34

  • Jr. Member
  • **
  • Posts: 264
Re: httpBL
« Reply #331 on: October 03, 2010, 12:43:12 PM »
I am not up on the server tech stuff.

But I have two servers for two different web sites that I rent from a web host
They are not Linux boxes.

Both are Windows servers because I still like to use some of the features of front page extentions for my html editor software, Web expressions 2.

I believe that both servers are both IIS, but how can I tell?
« Last Edit: October 03, 2010, 12:46:22 PM by EL34 »
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.14

Offline butchs

  • SMF Hero
  • ******
  • Posts: 1,712
  • Lost 7GB bandwidth!
    • EastCoastRollingThunder
Re: httpBL
« Reply #332 on: October 03, 2010, 02:42:40 PM »
I am not 100% sure if this test will work or not but here we go...

Take the attached and place it in your root directory.  Run it (ie.  "http://www.yourdomain.com/IIS_test.php").  Copy and paste the text from the top of your screen and post it here.

Do not forget to delete the file afterwards.
« Last Edit: October 03, 2010, 07:34:41 PM by butchs »
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Offline EL34

  • Jr. Member
  • **
  • Posts: 264
Re: httpBL
« Reply #333 on: October 03, 2010, 07:05:24 PM »
Here is what your php script says when accessed in a browser

Quote
You have IIS server

script has been deleted
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.14

Offline snoopy_virtual

  • Sophist Member
  • *****
  • Posts: 1,155
  • Gender: Male
    • jcredondosnoopy on Facebook
    • Snoopy Virtual Studio
Re: httpBL
« Reply #334 on: October 03, 2010, 07:26:31 PM »
Sorry

I was out for a while because I got a customer.

Luckily (for you, unfortunately for me) I got no more customers now, so I'm back.  ;D

@EL34: Apparently your problem with the error logs is sorted now. Leave this small change I told you for now (so you don't get any more error messages) until we finish the next version.

@butchs: I saw yesterday the things you wrote on my site, but was too busy to study them properly. I'm going to look at them now and will answer you there.
El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

Offline butchs

  • SMF Hero
  • ******
  • Posts: 1,712
  • Lost 7GB bandwidth!
    • EastCoastRollingThunder
Re: httpBL
« Reply #335 on: October 03, 2010, 07:35:52 PM »
Quote
You have IIS server

Thanks for checking.  That means there is a good chance my code works.  yay!  :)
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Offline snoopy_virtual

  • Sophist Member
  • *****
  • Posts: 1,155
  • Gender: Male
    • jcredondosnoopy on Facebook
    • Snoopy Virtual Studio
Re: httpBL
« Reply #336 on: October 03, 2010, 07:57:58 PM »
Sorry, I did not know you were going to release it so fast.  I was not done with the IP code and made comments at your site today. 

I released it before we started talking about IPs, and when I released it I marked the checkbox "Send an email to the people using this mod".

You must have missed it or maybe you turned out the "notification" in your profile.

El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.

Offline EL34

  • Jr. Member
  • **
  • Posts: 264
Re: httpBL
« Reply #337 on: October 03, 2010, 08:45:58 PM »
Thanks guys

I am leaving the code that snoop gave me in place for now

There has been no more errors in the forum error log since I changed the code.
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.14

Offline EL34

  • Jr. Member
  • **
  • Posts: 264
Re: httpBL
« Reply #338 on: October 04, 2010, 07:59:41 PM »
Snoop,
I am editing the warning.php to only display english only
I am editing all the table and getting rid of the right side of the screen that currently has spanish text.
I noticed that there is a blank.gif inside a <td> </td>in all the tables.

Do I need to leave that gif there or can I get rid of it?
Wanted to check first in case it is important.

Also, just a FYI

Dynamic is spelled with a Y. Just a heads up.
Forum History -> EZBoard -> YABB -> SMF 1.1.19 -> SMF 2.0.14

Offline snoopy_virtual

  • Sophist Member
  • *****
  • Posts: 1,155
  • Gender: Male
    • jcredondosnoopy on Facebook
    • Snoopy Virtual Studio
Re: httpBL
« Reply #339 on: October 05, 2010, 09:32:11 AM »
Snoop,
I am editing the warning.php to only display english only
I am editing all the table and getting rid of the right side of the screen that currently has spanish text.
I noticed that there is a blank.gif inside a <td> </td>in all the tables.

Do I need to leave that gif there or can I get rid of it?
Wanted to check first in case it is important.

Also, just a FYI

Dynamic is spelled with a Y. Just a heads up.

You only get English speaking visitors?

On my site I get visitors from all over the world, so I have put there by default the 2 more commonly spoken languages just in case. If anybody arrives to my site and cannot understand any of them, I'm sorry, but that's that languages I speak.

But of course it's up to you if you want to change it.

The <td> in the middle of both languages is there just to separate them, and it has a blank.gif inside with a width of 10 pixels to be sure both languages are properly separated. If you are going to erase one language you can erase that <td> as well.
El verdadero sabio es aquel que lo ve todo, lo estudia todo, lo analiza todo y molesta poco.
A true wise man is he who sees everything, studies everything, analyses everything and hardly ever annoys.