Jump to content

images not showing


makf

Recommended Posts

I have just set up php on my laptop. I am running apache server and mysql on windows xp. My problem is that when testing the set up  with phpinfo() program, the images were not showing. Only the text was showing. From phpinfo() page, i could see that the gd libraries are also enabled as i intended but when i tried out some code with gd in hopes of displaying the image i got some weired text instead of the rectangle i was trying to draw. Can someone help me with setting up my programs so as to display the images. ( i am using apache 2.2.4, mysql 4.0.15 and php4.3.3)

Link to comment
Share on other sites

Guest prozente

What is the weird text that is displayed?

From what you've said it sounds like you haven't output the content-type header

 

Check that you have mod_mime loaded and that you have mime.types accessible.

 

In the  script you created ensure you have the content-type header, here are some of the more common ones

 

//For GIF
header('Content-type: image/gif');

//For JPEG
header('Content-type: image/jpeg');

//For PNG
header('Content-type: image/png');

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.