Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6127877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:33:46+00:00 2026-05-23T16:33:46+00:00

I have a configuration that doesn’t seem too common on the Internets (PHP with

  • 0

I have a configuration that doesn’t seem too common on the Internets (PHP with IIS), and so far I have not been able to find a solution for my problem because of this.

Basically when I’m sending a manual 404 header on my php page:

header('HTTP/1.0 404 Not Found');

The problem is that I then always get encoding errors, which I’ve determined has something to do with gzip being enabled.

When I curl with –compressed I get:

HTTP/1.1 404 Not Found
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 3560
Content-Type: text/html
Content-Encoding: gzip
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Vary: Accept-Encoding
Server: Microsoft-IIS/6.0
Set-Cookie: PHPSESSID=b0ueqhtc3o4p7m2luqss170fr3; path=/
Date: Mon, 11 Jul 2011 16:15:40 GMT

curl: (61) Error while processing content unencoding: invalid code lengths set

Is it possible to disable compression just for this one page? Or is there some other solution for this that I’m missing? I don’t want to disable compression for the entire site.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:33:47+00:00Added an answer on May 23, 2026 at 4:33 pm

    This is simple, just use the ini set like so:

    <?php 
        if(ini_get('zlib.output_compression')){ 
            ini_set('zlib.output_compression', 'Off'); 
        }
        header('HTTP/1.0 404 Not Found');
    ?>
    

    Simple as that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project where there are multiple applications that have some common configuration
I have some configuration data that I'd like to model in code as so:
I have a structuremap configuration that has me scratching my head. I have a
I have a configuration file that I consider to be my base configuration. I'd
I have some configuration data in a config file that I read off disk
Question We have a large number of xml configuration files that we want merged
HI, I want to have set configuration settings for a unit test project that
I have a Windows Forms project in Visual Studio that reads configuration files from
I am told that the configuration below is possible, but have had significant difficulty
I have a project that requires some configuration files. I want to keep the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.