473,224 Members | 1,280 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

Why are my images coming out as garbled text?

I have just moved my website to a new hosting provider as the previous one
went belly-up. Everything is now fine except for one thing - my counter
script which generates a PNG image is sending out garbled text instead of an
image.

This script has been working for months on my desktop and my laptop, and
worked at my previous web host, but is failing with my new hosting company.

PHP version 4.3.3
GD library is reported as 2.0.15 in PHPINFO()

Any ideas out there?

--
Tony Marston

mailto:to**@marston-home.demon.co.uk
mailto:To*********@hotmail.com
mailto:To**@tonymarston.net
http://www.tonymarston.net

Jul 17 '05 #1
2 3337
Tony Marston wrote:

I have just moved my website to a new hosting provider as the previous one
went belly-up. Everything is now fine except for one thing - my counter
script which generates a PNG image is sending out garbled text instead of an
image.

This script has been working for months on my desktop and my laptop, and
worked at my previous web host, but is failing with my new hosting company.

PHP version 4.3.3
GD library is reported as 2.0.15 in PHPINFO()

Any ideas out there?


You might want to post some code snippets. Does PNG Support = "enabled" in
phpinfo()?
Try commenting out the header("Content-type... line and put
error_reporting(E_ALL); at the top of your script. That should hopefully give
you an error message.

Regards,
Shawn

--
Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com
Jul 17 '05 #2
It's OK now, I have found the problem. My script used the include()
statement to bring in my database username and password, but somehow when
this include file was uploaded to my host's server an extra blank line
appeared at the end. This blank line was being written to the output stream
before anything else and causing my "header: ('Content-type: image/png');"
to be ignored.

This same include file on my local PC did not have this extra blank line, so
it did not cause a problem.

Tony Marston

http://www.tonymarston.net/

"Shawn Wilson" <sh***@glassgiant.com> wrote in message
news:3F***************@glassgiant.com...
Tony Marston wrote:

I have just moved my website to a new hosting provider as the previous one went belly-up. Everything is now fine except for one thing - my counter
script which generates a PNG image is sending out garbled text instead of an image.

This script has been working for months on my desktop and my laptop, and
worked at my previous web host, but is failing with my new hosting company.
PHP version 4.3.3
GD library is reported as 2.0.15 in PHPINFO()

Any ideas out there?
You might want to post some code snippets. Does PNG Support = "enabled"

in phpinfo()?
Try commenting out the header("Content-type... line and put
error_reporting(E_ALL); at the top of your script. That should hopefully give you an error message.

Regards,
Shawn

--
Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Robert J. O'Hara | last post by:
I maintain an academic website called "The Collegiate Way" at: http://collegiateway.org A colleague in the UK who is using IE6 tells me that the site keeps coming up with jumbled characters....
13
by: moondaddy | last post by:
Happy Holidays All! I want to load a datagrid with images and text (Image, text, image, text, etc...). The data for this datagrid will be coming from sql server and the images are stored as files...
61
by: phil-news-nospam | last post by:
Why does SVG need a different tag than other images? IMHO, SVG should be implemented as an image type just like any other image type, allowing it to work with <img> tags, and ... here is the...
8
by: Yourself | last post by:
Is there anyway of disabling images in javascript, so that the alternative text appears instead of the images? I'm trying to do a text-only version of my site.
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
9
by: pengypenguin | last post by:
I've made this little example script for a project I'm working on, and the text that gets output seems to be chewed up in IE for Windows. Every other (major) browser has no problem rendering the...
2
by: Aneesh Pulukkul[MCSD.Net] | last post by:
Hi, I have a HTML page and associated images. I need to send the HTML as email -the email should also display the images at respective places. So am sending the content of HTML file as...
2
by: plsHelpMe | last post by:
Hi All, I am trying to have some images(images of button) on my web page. This image replicate an image of a button having text as Add. I ahve codded it in JSP, i can see this image as expected...
8
by: mechphisto | last post by:
(The Zend Web site doesn't have any forum; if someone knows of a Web forum for Zend, please let me know.) I'm using the latest Zend Studio 5.5.1. Just installed it on a fresh Fedora 9 box. I've...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.