Jump to content

Recommended Posts

12 minutes ago, Jack_mcs said:

@mendohIf you haven't made this change, please try it.

Jack, hello and thanks.

I have made the change your suggested and this is what happened: 

  1. after making the change I could get the "page counts" page displayed
  2. I clicked on YES (blue dot changes position from NO to YES)
  3. the SQL error is up again
  4. I cannot get the "page counts" page displayed again any more, and the SQL error is there again...😳

Share this post


Link to post
Share on other sites
1 hour ago, mendoh said:

I clicked on YES (blue dot changes position from NO to YES)

Thanks for mentioning this since I was able to see the problem by using it. The problem is that a placeholder, gg, is added to avoid false errors in the osc sec addon. I don't know if that addon is used much anymore so the placeholder is probably not needed but the following change will bypass it for this report.

In the admin/includes/modules/view_counter/view_counter_report_page_count.php file.

Find

 $sortByTmp = (strpos($sortBy, 'view_count') !== FALSE ? str_replace('view_count', 'cnt', $sortBy) : $sortBy);

Add beneath it:

 $sortByTmp = str_replace('gg', ' ', $sortByTmp); 

 

Share this post


Link to post
Share on other sites
13 minutes ago, Jack_mcs said:

Find


 $sortByTmp = (strpos($sortBy, 'view_count') !== FALSE ? str_replace('view_count', 'cnt', $sortBy) : $sortBy);

Add beneath it:


 $sortByTmp = str_replace('gg', ' ', $sortByTmp); 

 

Jack, you're welcome. 

I have performed the file modification you suggested and the result is that the SQL error is gone, but so is the "page counts" page as well: I am getting nothing more than a fully blank page now, with only the header and drop-down menu displayed as follows:

View Counter Reports
 
Select a ReportEmailFast ClicksFlag CountsHacker AttemptsIP CountsPage CountsPages not VistedPath TrackerReferrersSkimmersTraffic AnalyzerUser AgentsWord Tracker

This report shows the pages on the site that have been visited and the count for each.

Share this post


Link to post
Share on other sites

A blank page means there is an error in the code. Please doublecheck that you changed the correct file. If you did, check the error_log file in the admin directory, assuming that option is enabled, to see if it reports anything with this addon.

Share this post


Link to post
Share on other sites
12 minutes ago, Jack_mcs said:

A blank page means there is an error in the code. Please doublecheck that you changed the correct file. If you did, check the error_log file in the admin directory, assuming that option is enabled, to see if it reports anything with this addon.

Error is this: 

PHP Parse error:  syntax error, unexpected '$view_query_numrows' (T_VARIABLE) in /xx/xx/xx/xx/xx/includes/modules/view_counter/view_counter_report_page_count.php on line 17

but I swear I did not touch that line...

Share this post


Link to post
Share on other sites
2 hours ago, mendoh said:

but I swear I did not touch that line...

It's because the line above it is the one you added, or should be, and it is missing the closing semi-colon ( ; ).

Share this post


Link to post
Share on other sites
21 hours ago, Jack_mcs said:

It's because the line above it is the one you added, or should be, and it is missing the closing semi-colon ( ; ).

Well, I checked both and I can confirm the closing semi-colon was definitely there for both lines:

image.thumb.png.27b0d4c558ef1b7dd6a333e0619a2535.png

so I guess we are back to the point as the error is still there?

Also, I would have another question for you: I have what appears to be a skimmer bot which is apparently doing nothing but wasting site bandwidth. After banning its many IP addresses, the number of simultaneously connected IPs from the same both dropped from 20 to 4. 

The odd thing is that even if I banned ALL the IPs (which all belong to the same network), the first four IPs in that network (i.e. xxx.xxx.xxx.1/2/3/4) still show up on a regular basis (while the other 16 have gone for good) and whenever I see them again I try to ban them again but they are still there while the system tells me they have already been banned. Would you know the reason for those banned IPs to still be able to visit despite they have been banned already along with the other ones that do not show up any more?

Thank you

Share this post


Link to post
Share on other sites
46 minutes ago, mendoh said:

Well, I checked both and I can confirm the closing semi-colon was definitely there for both lines:

The problem is that is something missing or extra before the line that is failing, I can't tell for sure from your image but is there an apostrophe before the $ on the failing line )17)? If so, then that is the problem. If not, then try typing in the new line manually and deleting the other that was added. It may be picking up a hidden character in the copy/paste.

I don't know what the problem might be with the IP's. If an IP is in the banned list it should be blocked. I plan on releasing an update soon with a number of fixes so maybe it will fix the problem.

Share this post


Link to post
Share on other sites
17 minutes ago, Jack_mcs said:

If not, then try typing in the new line manually and deleting the other that was added. It may be picking up a hidden character in the copy/paste.

It probably was, because typing and deleting according to your suggestion actually solved the blank page issue and I could get the page counts displayed correctly with all the counts for various pages. 

Then, I clicked on YES once again and the following new SQL error appeared:

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'gasc' at line 1

select count(file_name) as cnt, isbot, file_name, arg, inet_ntoa(ip_number) as ip from `view_counter` where isbot = 0 group by file_name, arg order by ar gasc

[TEP STOP]

 

after getting the new error, I am unable to get back to the previous page counts with "NO" blue button, exactly as before...

Share this post


Link to post
Share on other sites
29 minutes ago, Jack_mcs said:

I don't know what the problem might be with the IP's. If an IP is in the banned list it should be blocked. I plan on releasing an update soon with a number of fixes so maybe it will fix the problem.

For the record: the four banned IPs continue to visit and show up on the "monitor" page. As opposed to the other ones that have been successfully banned,  they still also still appear on the "Tools/Who's online" page...

 

Share this post


Link to post
Share on other sites
9 minutes ago, mendoh said:

order by ar gasc

That part is invalid. It is generated by the code that was added. Please check to make sure there is a space between the '' in that code.

Share this post


Link to post
Share on other sites
3 minutes ago, Jack_mcs said:

Please check to make sure there is a space between the '' in that code.

If you mean here:  image.png.2c0b6810581fd0f00487aa6c575b23be.png    , in between the two '   ', then I confirm a space is actually present (handtyped as previously suggested)...

Share this post


Link to post
Share on other sites
1 minute ago, mendoh said:

As opposed to the other ones that have been successfully banned,  they still also still appear on the "Tools/Who's online" page...

If VC is loading after Who's Online, Who's Online will report the connection since it is made before VC blocks it. You can use the rebuild .htaccess file in Tools to stop that. Though it ill increase the size of that file which will slow the site down if it gets too large.

Share this post


Link to post
Share on other sites
1 minute ago, mendoh said:

then I confirm a space is actually present (handtyped as previously suggested)...

Then I don't know what it might be. It is working fine here and in the shops I have it installed in.

Share this post


Link to post
Share on other sites
54 minutes ago, Jack_mcs said:

If VC is loading after Who's Online, Who's Online will report the connection since it is made before VC blocks it

Understood. The point, however, is that the same IPs also continue to show up on VC monitor page even if they have already been banned:

image.png.8dc6d7b19e7cd556d8b84a08da90d6e4.png

image.png

Share this post


Link to post
Share on other sites
54 minutes ago, Jack_mcs said:

Then I don't know what it might be. It is working fine here and in the shops I have it installed in.

What puzzles me more is that the "page counts" page was actually working before clicking on YES and now I am totally unable to restore its previous "blue-dotted-NO" operation...

Share this post


Link to post
Share on other sites
10 minutes ago, mendoh said:
1 hour ago, Jack_mcs said:

 

What puzzles me more is that the "page counts" page was actually working before clicking on YES and now I am totally unable to restore its previous "blue-dotted-NO" operation...

Odd enough....the error went away and it strated to show the (YES) details after deactivating two security plugins, hitting CTRL+F5 and re-uploading the modified view_counter_pager_report.php file to server again...not sure about which one actually did the trick, though...

Share this post


Link to post
Share on other sites
21 hours ago, mendoh said:

after deactivating two security plugins,

Please let me know what they are so I can try to duplicate the problem.

Share this post


Link to post
Share on other sites
4 hours ago, Jack_mcs said:

Please let me know what they are so I can try to duplicate the problem.

They are two Wordpress plugins as the Phoenix website is nested into a WP install and the two WP plugins seem to have "jurisdiction" on the whole domain...at the moment, this is the only issue I am having:

the same IPs also continue to show up on VC monitor page even if they have already been banned:

image.png.8dc6d7b19e7cd556d8b84a08da90d6e4.png

 

 

Share this post


Link to post
Share on other sites
On 1/9/2021 at 8:04 PM, Jack_mcs said:

If VC is loading after Who's Online, Who's Online will report the connection since it is made before VC blocks it. You can use the rebuild .htaccess file in Tools to stop that. Though it ill increase the size of that file which will slow the site down if it gets too large.

Hello Jack, I think I have found where the issue lies with the after-ban lingering IPs: I checked the VC "banned list" and realized the lingering IPs were simply not there, as opposed to the other ones. 

Since clicking on "ban" for each lingering IP kept on causing an "IP already banned" message to show but the "supposedly already banned" IP is nowhere to be found on the banned list, I decided to check the .htaccess file: it actually contained all the previously and successfully banned IPs from the same botnet, except the lingering ones, which I had to add manually. After adding them manually, they do not appear on VC control panel any more. 

Have you got any idea on how that could have happened? 

Share this post


Link to post
Share on other sites
38 minutes ago, mendoh said:

Have you got any idea on how that could have happened?

If the IP is in a range (CIDR) of IP's, VC will show the IP as blocked but you won't see it in the list. Use the "IP in CIDR" box to check that. Although, if the IP is in a CIDR, it should still be blocked so I don't know why it wasn't. You can use the Rebuild htacces or Rebuild Banned list tool to sync the .htaccess file and the banned list, though that should not be necessary as far as blocking is concerned.

Share this post


Link to post
Share on other sites
38 minutes ago, Jack_mcs said:

If the IP is in a range (CIDR) of IP's, VC will show the IP as blocked but you won't see it in the list. Use the "IP in CIDR" box to check that. Although, if the IP is in a CIDR, it should still be blocked so I don't know why it wasn't. You can use the Rebuild htacces or Rebuild Banned list tool to sync the .htaccess file and the banned list, though that should not be necessary as far as blocking is concerned.

Thanks Jack.

After hitting the "Rebuild Htaccess"  button the after-ban lingering IPs have actually been added to the banned IPs list. 
I will drop you a line if the issue comes up again exactly as before...

Share this post


Link to post
Share on other sites

Just updated to Phoenix 1.0.7.13 and the BAN/IGNORE/DELETE/KICK function seems not to work any more: when I click on each option, the blue button hangs right there (there is no way to clear it up unless refreshing the page) and absolutely no (corresponding) action is performed...

Share this post


Link to post
Share on other sites

I haven't tried it in that version yet so I can't offer any suggestions. The next version will work for it but I don't know when that will be.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×