Simple Machines Community Forum

SMF Support => Server Performance and Configuration => Topic started by: dsbsci on February 22, 2006, 03:20:57 PM

Title: Mozilla and Firefox Renders Junk - other browsers ok
Post by: dsbsci on February 22, 2006, 03:20:57 PM
(Originally posted on Mozilla Forum; got no responses after 5 days)

I was using Mozilla 1.7.2 (and have since Upgraded to 1.7.8 ) on a Mandrake 10.1 system. On my LAN, I have an http server that has a development Simple Machines Forum 1.0.6 site running also on a Mandrake 10.1 box. Everything was working fine, until while adding some banner code to index.template.php file (for the 'classic' theme) to customize the site, I forgot to close a quote in the php code.

The error itself of course threw a php error on the server.  But, since fixing that error, Mozilla only renders what appears to be random junk for that site.

snip --
Ÿ0¸%xÚp%ÆCøðÆ.ÆÔv½€ (ÊÃh·¨Y$> FA»£Sz¥nDBÿãn,,Û"¾-B»ŸŒ¾MC>f~CØôÊUj\»lÌDÃaCù²¡ëÕ? cЋ/6lzÐ{X«=ØÛ›Ò;÷AbC¢Ð'ý²ÜÔm>N8²}*,,gÝ o ‹ûièŠH«Ñ
--snip

The junk changes with a page reload. I copied a pristine index.template.php file from the archive I used to install SMF over the one I was editing and still got this behavior.

I thought maybe apache had some hiccup due to the unclosed quote so I restarted it. I also checked the data in the MySQL db to make sure it was not corrupted data. I've deleted all relevant cookies, wiped the cache (using Edit->Preferences->Advanced->Cache->Clear Cache in Mozilla) and even killed the history just to do it. I've rebooted both the Mandrake client box and the server with no help.

I logged into the client box as a different user and Mozilla did the same thing, so it does not seem to be a specific user problem.

I've tried the site with Konqueror on both the server and the Mandrake client, I've used lynx on the client and I've used lynx on a server external to my LAN that I have ssh rights to. All of these alternate browsers work just fine, so I don't think it is anything on the server.  I thought it was exclusive to my client box, but a friend running Firefox 1.0.4 on a Windows box (external to my LAN) saw the same behavior.  He said it renders fine in IE.

If I create a virtual host one directory level up from the site's doc root,

problematic 'mysite' at doc root = /var/www/html/mysite
new virtual host 'test' at doc root = /var/www/html

then I can access the main page in Moz using the url http://test/mysite/index.php just fine. But any attempts to load the page using http://mysite or http://mysite/index.php result in random characters.

Can someone point me in the right direction of how I might correct this issue?  Right now I'm considering the only fix is to reinstall SMF, which I'd like to avoid if there is a 'cleaner' fix.

The forum is brand new, and can be viewed at www.scdeerhunter.com (http://www.scdeerhunter.com) to test/verify this behavior.
Title: Re: Mozilla and Firefox Renders Junk - other browsers ok
Post by: kegobeer on February 22, 2006, 03:51:46 PM
What version of SMF are you running?  If you change themes, does this problem persist?
Title: Re: Mozilla and Firefox Renders Junk - other browsers ok
Post by: dsbsci on February 22, 2006, 03:56:22 PM
Quote from: kegobeer on February 22, 2006, 03:51:46 PM
What version of SMF are you running?  If you change themes, does this problem persist?

SMF Version 1.0.6.

Yes, if I change themes, the problem persists.  Sorry; I should have mentioned that in the original post.
Title: Re: Mozilla and Firefox Renders Junk - other browsers ok
Post by: dsbsci on February 22, 2006, 08:33:16 PM
Just a follow-up:  I upgraded to 1.1 RC2.  Before I made any changes to any files, I checked it with Mozilla.  The issue persists.
Title: Re: Mozilla and Firefox Renders Junk - other browsers ok
Post by: kegobeer on February 22, 2006, 08:58:19 PM
Man, that is one strange problem.  I have no idea why this is happening.  If you make a simple php script and upload it to the same directory as SMF, do you get garbage output from that file too?
Title: Re: Mozilla and Firefox Renders Junk - other browsers ok
Post by: dsbsci on February 22, 2006, 09:09:50 PM
Quote from: kegobeer on February 22, 2006, 08:58:19 PM
If you make a simple php script and upload it to the same directory as SMF, do you get garbage output from that file too?

I saved php script


<html>
<body>

<?php

    
echo 'Testing.  Is this working in Mozilla?';

?>


</body>
</html>


so that it can be accessed by www.scdeerhunter.com/dummy.php (http://www.scdeerhunter.com/dummy.php) and it worked just fine.

I should point out, too, that OTHER virtual hosts, also using php and mysql db backends (but not SMF's) are working fine with Mozilla.  Ruby on Rails apps on that host are working as well.

It's just that one 'site.'
Title: Re: Mozilla and Firefox Renders Junk - other browsers ok
Post by: Dannii on February 22, 2006, 09:47:52 PM
Could your zlib not be working properly?
Title: Re: Mozilla and Firefox Renders Junk - other browsers ok
Post by: Ben_S on February 23, 2006, 06:28:34 AM
Disable output compression. Admin > Server Settings > Feature Configuration.
Title: Re: Mozilla and Firefox Renders Junk - other browsers ok
Post by: dsbsci on February 23, 2006, 11:11:19 AM
Quote from: Ben_S on February 23, 2006, 06:28:34 AM
Disable output compression. Admin > Server Settings > Feature Configuration.

Did that; now get a blank page.  http://www.scdeerhunter.com  That's progress.   :)

Though I checked the db for glaring, obvious errors, I am wondering if there is something that got written to the db a little odd that Mozilla does not deal with properly.  The other browsers are obviously ignoring it.

Rather than blindly look through the raw data in the db, is there a flow diagram that succinctly shows in what order data is retrieved from the db for SMF?
Title: Re: Mozilla and Firefox Renders Junk - other browsers ok
Post by: Oldiesmann on February 23, 2006, 03:21:09 PM
I was able to get in through ssi_examples.php

It looks like your default theme's URL is incorrect:
<script language="JavaScript" type="text/javascript" src="http://caromel/scdeerhunter/Themes/default/script.js?rc2"></script>

You can use repair_settings.php (in the "converters" section of the downloads area) to fix that.
Title: Re: Mozilla and Firefox Renders Junk - other browsers ok
Post by: dsbsci on February 23, 2006, 04:11:57 PM
Thank-you, Oldiesmann (and everybody else!).  I ran the repair_settings script and fixed those urls.  Another run of the repair_settings showed correct urls and directory paths for everything.

However Mozilla still displays a 'blank' page with compression off.  I checked the apache log for one of those Mozilla GET requests, and I get a response code of 200 and 23296 bytes transferred.  The server is sending something to Moz, but Moz is not displaying it.  There's nothing going into apache's error log.  So, my question is 'what' is apache sending that may be causing Mozilla to die?

I'm in the middle of creating a 'mirror' of that site on another box.  With clean install of SMF 1.0.6, everything is cool.  I am going to try to mysqldump the db over to the other box and see what that produces.

Also, I got a ethereal dump if anyone cares to see that;  the


</body>
</html>


tags were transfered, so I assume the 'full' html page is being sent.  Beyond that, I 've not examined the tcp data yet.
Title: Re: Mozilla and Firefox Renders Junk - other browsers ok
Post by: dsbsci on February 23, 2006, 05:31:42 PM
Okay, it's not bad data in the db; the 'mirror' site on another box worked.   :)  Mozilla sees the pages just fine, with each theme selected.

In the interest of quick-fix, I think it's time for a reinstall.

Title: Re: Mozilla and Firefox Renders Junk - other browsers ok
Post by: dsbsci on February 23, 2006, 09:10:50 PM
Well, I want to thank everyone here for their attention, but I don't believe this is an SMF issue at all.  I deleted SMF entirely from the server, wiped the db and reinstalled.  It still did not work.

I also uninstalled apache and all of its associated packages. I reinstalled apache, and still no-go.

So, though I'm at a loss at the moment, but it is clear that the issue is NOT SMF.

Thanks again!
Title: Re: Mozilla and Firefox Renders Junk - other browsers ok
Post by: dsbsci on February 24, 2006, 12:46:45 PM
 :)

I got it fixed, and wanted to post here just in case anyone else runs into an issue like this.  The problem was apache's disk-caching; the corrupt file (created with the open quote in PHP) got cached, and for some reason, that's the only page Apache was serving.

Disabled apache's disk cache and all is well.  It probably should not have been enabled on a development server, anyway. :-[

Mozilla browsers were the only ones to have a problem with it, which may actually say something good about Mozilla.

Thanks again!
Title: Re: Mozilla and Firefox Renders Junk - other browsers ok
Post by: Dannii on February 24, 2006, 08:53:12 PM
Glad you got it working.