473,387 Members | 1,638 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,387 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 3344
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.