0

I feel pretty stupid asking this... but I have a small php script that generates a image based on some GETs and output's it to the browser.

It works fine on my server, but I moved it over to the client's server and I get a 404 error instead of the image. Problem is I have no ideea how to see what is wrong.

Normaly I get an error in the browser so I know what is going on... but not beacase the output is an image I get nothing.

LE: I tried this, at the begining of the script:

error_reporting(E_ALL);
ini_set('display_errors', true);

but nothing.

1
  • Try to read the source containing your .php image and call it directly to see what's wrong. You may also remove the @header("Content-Type ...) so you can read the errors through the big chunk of data. Commented Feb 22, 2011 at 14:35

1 Answer 1

3

If you get a 404, the PHP script is either not found or redirects to another resource (a generated and cached image file?) but the path to it is wrong (or the image file can't be generated because of right issues?).

As suggested, remove the header() if any (it's also probaly using a header if the script redirects to the real file after generation).

If the script is delivering the image directly without any redirect, then enabling errors won't help on a not found URL ;-)

Sign up to request clarification or add additional context in comments.

1 Comment

Ahh... obviously, remove the header() call, why haven't I taughtof that.Thanks guys that probably saved me a lot of time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.