I’m using php gd library to generate image/jpeg.
I’m getting the error message:
image xyz.php cannot be displayed because it contains errors
How can I get the specific error?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
When you are outputting the image to browser, there should be no output before and neither ater.
Comment out the line where you print image (
imagejpeg()), and there should be no output. If there is, you have a problem.Side note: And make sure you are not doing the mistake of outputing the image into the HTML document directly. You have to make separate PHP file for image, and then link it into document like this: