473,748 Members | 8,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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**@mar ston-home.demon.co.u k
mailto:To****** ***@hotmail.com
mailto:To**@ton ymarston.net
http://www.tonymarston.net

Jul 17 '05 #1
2 3358
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***@glassgian t.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***@glassgia nt.com> wrote in message
news:3F******** *******@glassgi ant.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***@glassgian t.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
1893
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. I've checked it in the US on multiple machines and it seems fine, but this problem persists for him. It may be some misconfiguration in his system, but I'd certainly like to know if it is more general. If anyone in the UK (or elsewhere) would be...
13
1620
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 on the server and not in sql server, however, the name and path of the images are stored with the text in sql server. I don't have a clue on how to load the images into the grid, so can someone please advise on how i can get started with this? ...
61
4744
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 important part ... also work with backgrounds in other tags. I fail to see any wisdom in making SVG different than say PNG (of course the implementation of the rendering code would obvious be different). --
8
9693
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
3835
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 site for a small club I belong to and one of the features I would like to include is the ability to allow users to upload image files. unfortunately the servers web root www folder only allows READ and EXECUTE permissions, which makes it...
9
1468
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 text, but in IE it seems garbled, or aliased perhaps. Can anyone confirm this, and maybe help me diagnose it? I would very much appriciate it. Here is the example: http://www.whit.info/dev/sf_toy.html Thanks in advance!
2
4708
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 MailMessage.Body and adding all the referred images using MailMessage.Attachments.Add(). The images referred using <IMG SRC="Logo.png" /are displaying properly in the email, but the image referred by <TABLE...
2
2587
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 in mozilla but not appearing in IE. When i see the view source of the code i get something given below: <div style="position:relative;left:5px; float: left: width: 5%" id="addBookshelfSrcs"> <span id="addBttnEnabled" style="FLOAT: left;...
8
1978
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 been using it for a couple of years now without problem. but now with this new install, the text in the editor field is all garbled up. Screenshots: hi-quality (128K png)
0
8991
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9541
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9321
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8242
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2782
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.