Previous Thread
Next Thread
Print Thread
Hop To
#40802 06/03/2004 5:37 PM
Joined: Jan 2004
Posts: 11
S
stranger
stranger
S Offline
Joined: Jan 2004
Posts: 11
I have never been able to get proper behavior our of ubbttopthreads.php in any version.

When I run the script directly from the browser, i get proper results - a nice formatted list of the hot topics.

However, when I try to include it on my .shtml homepage, I get the following gibberish:

Code
 ‹Ì•ÁnÔ0†ï<Å4 ‡nv›¤¥(ëUw£Ò•Pl9#;™l¬:žÈvjåíq ]¨ª8  


The code with which I am including the script is as follows (/path/to/ of course is just for reference sake, the proper path is used on my page):
Code
<!--#include virtual="/path/to/ubbttopthreads.php" -->

Any help would be appreciated. I'm at a loss.

Last edited by David Dreezer; 06/03/2004 6:23 PM.
Joined: Jul 2006
Posts: 2,143
Pooh-Bah
Pooh-Bah
Joined: Jul 2006
Posts: 2,143
I edited your post so as not to stretch my page out.



What you have here is output from the php file being gzipped and then passed through the .shtml page, which is not gzipped. Turn off default gzip handling of php.

When you call a php directly php gzips it, and sets teh header accordingly. Your browser ungzips it, because the http header tells it to. When you include php into a .shtml page the header of that page is not telling your broswer it is gzipped, so your browser doesn't know to ungzip it. Thus that horrid looking mess. Your browser does what the parent tells it to. In this case the parent is an ungzipped .thml page.

The other thing you could do is install mod_gzip and have it gzip encode .shtml pages. But that gets even messier.


This thread for sale. Click here! [Linked Image from navaho.infopop.cc]
Joined: Jun 2006
Posts: 346
J
enthusiast
enthusiast
J Offline
Joined: Jun 2006
Posts: 346
I use it with great results. One trick is to make the page using the addon a .php page, this removes a lot of problems.


Sample


--
Website Development and Management
www.jcswebdev.com
Joined: Jan 2004
Posts: 11
S
stranger
stranger
S Offline
Joined: Jan 2004
Posts: 11
Thanks for both of the prompt and informative replies. Never would've considered gzip to be the culprit. But it makes sense. It worked long ago in the days of wwwthreads, and no longer after the php version started to support zipped pages.

I am totally devoid of the skills necessary to make a php page, so I'm going to have to stick with my shtml stuff. I think the best idea for me is to just pull it into an inline frame, whicih appears to be working in early tests.

Thanks guys!


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
Who's Online Now
0 members (), 416 guests, and 191 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)