CCount doesn't work on Chrome?

Post your Click counter digestion problems here
Post Reply
henryconcise
Posts: 6
Joined: Fri Dec 19, 2014 8:32 pm

CCount doesn't work on Chrome?

Post by henryconcise »

Script URL: https://www.concise-courses dot com/hacking-tools/
Version of script: Latest
Hosting company: Fused Hosting
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

The script works great on every browser except for Chrome. I've tried on several machines and it's the same.

The display count for clicks and ID's is not shown...

What could the problem be? Any ideas? Fix this and I'll 100% buy the license. Thanks
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Re: CCount doesn't work on Chrome?

Post by Henrie »

When i look at the console of Chrome in the developers tools, it shows the following error:
Refused to execute script from 'https://www.concise-courses.com/php-lin ... isplay.php' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

So that is the error you need to fix.
You can try and see if the following helps
Change

Code: Select all

<script src="https://www.concise-courses.com/php-link-counter/display.php"></script>
to

Code: Select all

<script type="text/javascript" src="https://www.concise-courses.com/php-link-counter/display.php"></script> 
and all occurences of

Code: Select all

<script>ccount_display('countername')</script>
to

Code: Select all

<script type="text/javascript">ccount_display('countername')</script>

Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
henryconcise
Posts: 6
Joined: Fri Dec 19, 2014 8:32 pm

Re: CCount doesn't work on Chrome?

Post by henryconcise »

Hey thanks! I tried that but unfortunately still no joy...maybe I should try and disable strict MIME types but that might be a security problem...

Any other ideas?
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: CCount doesn't work on Chrome?

Post by Klemen »

How about if you do as Henrie said AND add this to your display.php file, just under "define('IN_SCRIPT',1);" line:

Code: Select all

header("Content-type: text/javascript");
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: CCount doesn't work on Chrome?

Post by Klemen »

P.s.: the strict mime types are up to the browser to enforce or not. A hacker would be using other tools anyway and completely ignore the "X-Content-Type-Options: nosniff" header the server sends.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
henryconcise
Posts: 6
Joined: Fri Dec 19, 2014 8:32 pm

Re: CCount doesn't work on Chrome?

Post by henryconcise »

I made changes:

1. Uploaded new display.php with the added line of 'header("Content-type: text/javascript");'
2. Changed the display code (where clicks are displayed) to: '<script type="text/javascript">ccount_display('nbtscan')</script>' (with matched ID name)
3. Changed the header javascript call to: '<script type="text/javascript" src="https://www.concise-courses dot com/php-link-counter/ display.php"></script>'

All the above changes worked in Firefox but Chrome still refuses to play nice.

Do you think I need to add a meta tag on the page to switch the MIME type?

Thanks again and Happy Xmas/ Holidays
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: CCount doesn't work on Chrome?

Post by Klemen »

I tested with Chrome and your page now displays fine for me.

Try clearing your browser cache and force refresh the page (Shift + F5).
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
henryconcise
Posts: 6
Joined: Fri Dec 19, 2014 8:32 pm

Re: CCount doesn't work on Chrome?

Post by henryconcise »

CORRECTION!

The above DOES work.

So for those with a similar problem or issue with Sniffer Scripts and Chrome - the above will likely help.

Big thank you to Klemen and Henrie.
Post Reply