|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
This is a standalone script which checks whether the user's browser supports various features used by UBB.threads, and displays the results. The idea is that if a user if having a problem using UBB.threads, he can run this script to help isolate the problem. The following client-side features are tested: Cookies - Cookies can be set and read. Referrer - The URL of the referring page can be read. Javascript - Javascript within a web page can be executed. Javascript read cookie - Cookies can be read using Javascript. Javascript set cookie - Cookies can be set using Javascript. Clock - The server and client clocks agree within a specified tolerance. Feedback requested. <img src="/threads/php/images/graemlins/smile.gif" alt="" /> Please test this with different platforms/browsers, and with different browser security settings. Edit: attachment updated to version 1.0.1 - made downward-compatible with PHP 4.0 Edit: attachment updated to version 1.1.0 - added Javascript cookie tests and clock test, and added a separate configuration file.[i] [i]Edit: attachment updated to version 1.2.0 - split single referrer test into three tests, changed clock difference display to use appropriate time units, added a few parameters to configuration file. Edit: attachment updated to version 1.2.1 - Fixed clock difference display to use appropriate time units for negative values. Edit: attachment updated to version 1.3.0 - Added link to Infopop's Browser Problems article on test results page. --------- Reposted here.
Last edited by Dave_L; 07/10/2003 6:05 PM.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
This sounds Really Cool!  Thanks Dave. Is there anything I need to configure? I copied it into my threads directory, but when I visit the page, I get this error: Warning: Undefined variable: _SERVER in /home/measurection/htdocs/forums/browser_check.php on line 41 Warning: Cannot add header information - headers already sent by (output started at /home/measurection/htdocs/forums/browser_check.php:41) in /home/measurection/htdocs/forums/browser_check.php on line 41
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
What version of PHP are you running?
The variable $_SERVER is only implemented in PHP 4.1+. There's a note about that in the script. I wonder if I should make it downward-compatible with PHP 4.0.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Ahhh..... Just did a PHP Info and I've got 4.0. Surprising tha I didn't read all the directions. LOL So unlike me.  Sorry. 
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
I'll go ahead and make the script compatibile with 4.0, since there are probably a lot of people still using that.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
I've never been one to upgrade "if it ain't broke".. but should I be running PHP 4.1.
I haven't fooled with any OS upgrades for fear of screwing something up that I don't undersstand... but I think Rackspace would do it for me if I filled out a ticket.
Is 4.1 a security fix?
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
I'm in the same position, except that I'm using 4.1.2, and should probably upgrade to 4.2. I had so much trouble getting PHP and MySQL working on my server, though, that I'm scared to upgrade. 
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
A good number of security fixes have been added since 4.0 
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
It looks like you're running PHP 4.0.6 here. Is that correct? I thought you were more progressive than that. 
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
I've updated the attachment in the initial post, so the script should work on PHP 4.0. The new version is 1.0.1, and the timestamp on the PHP file is 2002-10-04 0032 GMT.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
That's really cool! Thanks dave! I'm adding this to my help forum at my site.  Thanks
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
This is infopop's server... we're just happy squatters  I'll upload your new script in a second 
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Cool, works well 
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
If anyone wants to see it in action, you can here.
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
Okay mine does not pass the referer check what can I do?
Feature Description Test result Cookies Client-side cookies can be set and read. PASSED Referrer The URL of the referring page can be read. FAILED Javascript Javascript within a web page can be executed. PASSED
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
You probably need to adjust your firewall settings. See this document for more info. Usually it's Norton or Zone Alarm Pro. 
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
Actually my settings have been set correctly for a while. Now I have no problem with UBBthreads or anything. However that test does say I pass the referer check. Probally my cable modem cache but if thats the problem i would not see new content which I indeed do.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Are you testing it on your site... or my site? If it were mine you'd probably have to add www.measurection.com into the firewall settings. I don't know much about how that works. Maybe Dave_L can explain more about if the test can fail if threads still works. I guess it does if the site has the refer check off. 
|
|
|
|
Joined: Jun 2001
Posts: 176
Member
|
Member
Joined: Jun 2001
Posts: 176 |
now an idea was born . hey the browser check is good but if some stuff fails then you should have a link to a howto fix so a page needs to be made to point out firwall setting & stuff like that .
eh? what do you guy's think ?
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Thats an Excellent Idea. I think I'm going to "hack" mine to link to the How To poss I have on my site for fixing the firewall etc.... Thanks. 
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
omegatron, is that test still failing for you?
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
Issues: 1) Currently, the test-cookie set by the script has an expiration date/time of five minutes from "now". I'm wondering if that could cause problems if the user's clock is off a bit. Or maybe if that does cause the test to fail, it means that the test script is doing what it should.  2) I'm also thinking of adding a test for server date/time vs. client date/time. I'm not sure how to do this, but maybe Javascript could be used to read the client's clock. If I can get this working, what "tolerance" do you think should be used to distinguish pass/fail? 3) I think I'm going to add some more info to the displayed results, to aid in diagnosing test failures.
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
I just uploaded a new version (1.1.0) that has additional tests and a separate configuration file, which makes it easier to customize the displayed header and footer.
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
In the new version my referer also fails everything else passes.
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
1) Are you running the Browser Check script on the same server that your UBB.threads is on?
2) In your UBB.threads configuration settings, do you have "Do you want to disable the referer check?" set to (a) "No, always check referer" or (b) "Yes, disable this check." ?
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
New Version is Cool Dave! 
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
Referer is no always preform check and my browser check script is run from the same server
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
Could you try this? Edit browser_check.php and in function do_page3() at line 216, change: code: $results_display $clock_comparison_display <p><b>Click <a href='{$HTTP_SERVER_VARS['PHP_SELF']}'>HERE</a> to repeat the tests.</b>
to code: $results_display $clock_comparison_display [:"red"]<p>referrer='{$HTTP_SERVER_VARS['HTTP_REFERER']}'<br /> referrer_should_be='$referrer_should_be'</p>[/] <p><b>Click <a href='{$HTTP_SERVER_VARS['PHP_SELF']}'>HERE</a> to repeat the tests.</b>
Then copy/paste the output here, or send it to me privately. Thanks. 
Last edited by Dave_L; 10/10/2002 6:01 PM.
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
Thanks, got your PM, the info was helpful.
It's interesting that on your server, the query string portion of HTTP_REFERER was not passed.
I guess I'll need to make the referrer test more flexible.
One question: When you're viewing the postlist for a specific board within your UBB.threads, or viewing a specific thread, and you click the Search link, does it default to searching that specific board? UBB.threads (6.1.1) seems to use the query string portion of HTTP_REFERER to figure out which board to search, so I would think that would fail.
Last edited by Dave_L; 10/10/2002 8:49 PM.
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
Nope not at all. When I click search it defaults to the forum I am viewing when viewing both a thread or postlist of the specific forum. Dave I gor your private message. I beleive I answered above. To be even more clear if I am in reefs and hit search I get reefs not all forums.
Last edited by omegatron; 10/11/2002 4:57 PM.
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
Sorry for not repliying earlier, I just noticed your reply.
Hmmmm .... I don't understand how the search can behave like that with the referrer test failing.
But I've updated the script to version 1.2.0, in which I've split the referrer test into three tests. In your case, I would expect the first two referrer tests to pass, and the third to fail. The third test can be disabled in the config file if desired.
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
Updated to version 1.2.1. This is basically just a cosmetic fix.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 254
Joined: January 2000
|
|
Forums63
Topics37,575
Posts293,931
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|