home resources search newsjoinmembers: 6968
PHP Flash Java Ruby Windows Linux
Hiveminds's picture

Hiveminds | Fri, 2006-02-03 20:03  tags:

This is driving me crazy because I don't know if it is the server or something in Drupals code or php5. I tend to believe it is the server since things worked okay before. But the solution to the problem is the same one that I used for includes. For some reason the server is adding spaces of content from the buffer whenever a header of any type is called. This is effecting the size of zip files and images and they will not open after the corruption. So doing:

<?php

   
/*This is necessary before any type of header can be sent*/
   
$clean ob_get_contents();
   
ob_end_clean();
   
//sent your headers. Remember printing also send a header so
// you have do this just before printing to screen also. For some
// reason ob_end_clean or ob_end_flush alone is not working (php5 bug?).
//An explicit call to get the contents is needed before a dump will happen.
?>

Now all downloads and rss feeds are working again. But I am very disappointed to see that people are constantly downloading and finding out that zip files are corrupted and not informing me or anyone else of the problem. If it were not for me seeing Dan Shafers nick at Drupal.org and surfing the site a bit, I would have never known about this problem.

So speak up people!! You can even leave an anonymous comment now and again.

Hiveminds's picture
This article brought to you by the Hiveminds Magazine - Staff. Contact us if you want to post an article or announcement anonymously
tesla.nicoli... posted on: Sun, 2005-09-25 10:19.

Sorry,

I meant to email you about the rss feeds but got busy with something else and forgot.

off-topic:
I talked to Anders and he is not ready to make staticHTML public (unencrypted) until he gets his grades. We should be getting them in november. After that it is your decision.

 
CMS Comparison Matrix

Newsletter

Get updates on Hiveminds services, articles and downloads by signing up for the newsletter.

Editor's choice

Some of the better articles, stories and tutorials found at Hiveminds.

Find more

Find more of Hiveminds articles, stories, tutorials and user comments by searching.




Picked links

Hand picked websites and articles from around the web that provide quality reading.