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

  • Home
  • SEARCH
  • 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 7581811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:17:03+00:00 2026-05-30T18:17:03+00:00

ok , When i try to execute this routine , retrieves GD Error :

  • 0

ok , When i try to execute this routine , retrieves GD Error :

Function foo ()
{  
    $file_name = 'image1.jpg';
    $type = 'image/jpeg';
    drupal_set_header('Content-Type:'.$type);
    drupal_set_header('Content-Length: ' . filesize($file_name));
    readfile($file_name); 
}

Error :

The image http://192.168.1.190/parsegard/trackback/check/perm?pic=sites/default/files/imagecache/large/content_types/food_nutrition/2470/image1.jpg becuase it contains errors.
  • 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-30T18:17:05+00:00Added an answer on May 30, 2026 at 6:17 pm

    You should make absolutely sure there is no other output on the page, not even leading or trailing spaces. This is the most common cause of this kind of error. Also turn off error outputting, log errors to a file instead. PHP errors can easily cause binary output to be corrupted too.

    Locating the source of the unwanted output would be the optimal solution, but if you absolutely can’t and just want it to work you could use output control as a workaround. Call ob_start() at the absolute beginning of your script (no preceding whitespace or other PHP code allowed), and ob_end_clean() at the absolute end of your script. Then place a call to ob_clean() at the beginning of your image outputting function, and a call to ob_flush() at the end of the function.

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

Sidebar

Related Questions

Try loading this normal .jpg file in Internet Explorer 6.0. I get an error
My framework is raising a syntax error when I try to execute this code:
<form action=somesite.com name=somename> <input type=text name=data value=> </form> If I try to execute this
When I try to execute this Sql-Statement I have this error : * Fatal
I get a shmget: Invalid argument error while i try to execute this part
When I try to execute this statement in Oracle SQL Developer 2.1 a dialog
I keep getting this error when I try to commit a group of executed
When I try to execute my code, I'm getting an error dialog: 'Show Disassembly'
I get the following error when I try and execute the code down below.
I try to execute this query $qb = $this->_em->createQueryBuilder(); $qb->select(array('c', 'ld')) ->from('Model\Entity\Company', 'c') ->leftJoin('c.legaldetails',

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.