473,385 Members | 1,707 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,385 software developers and data experts.

GD Installation problem

Hi,

I'm haveing some problems I'm trying to generate bar charts dynamically by
pulling data from an MS Access databasae using an ODBC connection and then
generating the bar charts, this is all on WinXP Pro by the way. I have no
problems with getting the data out of the database and sorting it. I was
using this tutorial
http://www.phpbuilder.com/columns/wi...r20001218.php3 as a guidline to
generating the images, but nothing seems to be working for me.
My problem is that I cannot generate any images using any of the
GD image functions. I have loaded the php_gd2.dll in the php.ini file and I
can see that the dll is loaded when I do a phpinfo(); the probelm is that
none of the pages are generating any images.
I would be greatful if somebody would be able to assist.

Thanks,

Tony


Jul 17 '05 #1
5 1671
On Wed, 10 Nov 2004 21:18:24 -0000, "Tony Clarke" <cl*****@eircom.net> wrote:
I'm haveing some problems I'm trying to generate bar charts dynamically by
pulling data from an MS Access databasae using an ODBC connection and then
generating the bar charts, this is all on WinXP Pro by the way. I have no
problems with getting the data out of the database and sorting it. I was
using this tutorial
http://www.phpbuilder.com/columns/wi...r20001218.php3 as a guidline to
generating the images, but nothing seems to be working for me.
My problem is that I cannot generate any images using any of the
GD image functions. I have loaded the php_gd2.dll in the php.ini file and I
can see that the dll is loaded when I do a phpinfo(); the probelm is that
none of the pages are generating any images.
I would be greatful if somebody would be able to assist.


Example code? What errors do you get? What happens when you try to view the
images? Have you sent the right content-type header? Are there PHP error
messages being produced (this corrupts the image)?

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2
I dont get any errors, doing a phpinfo(); shows GD installed. I use a html
with an <img> tag to call the php file that is supposed to generate the
image. Example code below is saved in a file called chart.php and use the
img src tag to call it. On the html page I just get a space as if the html
page could not find the image. Any help would be greatly appreciated.

<HTML>
<BODY>
<H1>RMAs Raised</H1>
<IMG SRC="test1.php" HEIGHT="250" WIDTH="480">
</BODY>
</HTML>
<?php
//-------------------- chart.php file
header ("Content-type: image/png");
$img_handle = ImageCreate (230, 20) or die ("Cannot Create image");
$back_color = ImageColorAllocate ($img_handle, 0, 10, 10);
$txt_color = ImageColorAllocate ($img_handle, 233, 114, 191);
ImageString ($img_handle, 31, 5, 5, "My first Program with GD",
$txt_color);
ImagePng ($img_handle);
?>

"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:i8********************************@4ax.com...
On Wed, 10 Nov 2004 21:18:24 -0000, "Tony Clarke" <cl*****@eircom.net> wrote:
I'm haveing some problems I'm trying to generate bar charts dynamically bypulling data from an MS Access databasae using an ODBC connection and thengenerating the bar charts, this is all on WinXP Pro by the way. I have noproblems with getting the data out of the database and sorting it. I was
using this tutorial
http://www.phpbuilder.com/columns/wi...r20001218.php3 as a guidline togenerating the images, but nothing seems to be working for me.
My problem is that I cannot generate any images using any of theGD image functions. I have loaded the php_gd2.dll in the php.ini file and Ican see that the dll is loaded when I do a phpinfo(); the probelm is that
none of the pages are generating any images.
I would be greatful if somebody would be able to assist.

Example code? What errors do you get? What happens when you try to view the images? Have you sent the right content-type header? Are there PHP error
messages being produced (this corrupts the image)?

Jul 17 '05 #3
Sorry, that image tag below should be
<IMG SRC="chart.php" HEIGHT="250" WIDTH="480">


"Tony Clarke" <cl*****@eircom.net> wrote in message
news:gY*******************@news.indigo.ie...
I dont get any errors, doing a phpinfo(); shows GD installed. I use a html
with an <img> tag to call the php file that is supposed to generate the
image. Example code below is saved in a file called chart.php and use the
img src tag to call it. On the html page I just get a space as if the html
page could not find the image. Any help would be greatly appreciated.

<HTML>
<BODY>
<H1>RMAs Raised</H1>
<IMG SRC="test1.php" HEIGHT="250" WIDTH="480">
</BODY>
</HTML>
<?php
//-------------------- chart.php file
header ("Content-type: image/png");
$img_handle = ImageCreate (230, 20) or die ("Cannot Create image"); $back_color = ImageColorAllocate ($img_handle, 0, 10, 10);
$txt_color = ImageColorAllocate ($img_handle, 233, 114, 191);
ImageString ($img_handle, 31, 5, 5, "My first Program with GD",
$txt_color);
ImagePng ($img_handle);
?>

"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:i8********************************@4ax.com...
On Wed, 10 Nov 2004 21:18:24 -0000, "Tony Clarke" <cl*****@eircom.net> wrote:
I'm haveing some problems I'm trying to generate bar charts dynamically by
pulling data from an MS Access databasae using an ODBC connection and thengenerating the bar charts, this is all on WinXP Pro by the way. I have noproblems with getting the data out of the database and sorting it. I
wasusing this tutorial
http://www.phpbuilder.com/columns/wi...r20001218.php3 as a guidline
togenerating the images, but nothing seems to be working for me.
My problem is that I cannot generate any images using any
of
theGD image functions. I have loaded the php_gd2.dll in the php.ini file
and
Ican see that the dll is loaded when I do a phpinfo(); the probelm is

thatnone of the pages are generating any images.
I would be greatful if somebody would be able to assist.

Example code? What errors do you get? What happens when you try to view

the
images? Have you sent the right content-type header? Are there PHP error
messages being produced (this corrupts the image)?


Jul 17 '05 #4


Tony Clarke wrote:

I dont get any errors, doing a phpinfo(); shows GD installed. I use a html
with an <img> tag to call the php file that is supposed to generate the
image. Example code below is saved in a file called chart.php and use the
img src tag to call it. On the html page I just get a space as if the html
page could not find the image. Any help would be greatly appreciated.

<HTML>
<BODY>
<H1>RMAs Raised</H1>
<IMG SRC="test1.php" HEIGHT="250" WIDTH="480">
</BODY>
</HTML>

<?php
//-------------------- chart.php file
header ("Content-type: image/png");
$img_handle = ImageCreate (230, 20) or die ("Cannot Create image");
$back_color = ImageColorAllocate ($img_handle, 0, 10, 10);
$txt_color = ImageColorAllocate ($img_handle, 233, 114, 191);
ImageString ($img_handle, 31, 5, 5, "My first Program with GD",
$txt_color);
ImagePng ($img_handle);
?>

"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:i8********************************@4ax.com...
On Wed, 10 Nov 2004 21:18:24 -0000, "Tony Clarke" <cl*****@eircom.net>

wrote:
I'm haveing some problems I'm trying to generate bar charts dynamically bypulling data from an MS Access databasae using an ODBC connection and thengenerating the bar charts, this is all on WinXP Pro by the way. I have noproblems with getting the data out of the database and sorting it. I was
using this tutorial
http://www.phpbuilder.com/columns/wi...r20001218.php3 as a guidline togenerating the images, but nothing seems to be working for me.
My problem is that I cannot generate any images using any of theGD image functions. I have loaded the php_gd2.dll in the php.ini file and Ican see that the dll is loaded when I do a phpinfo(); the probelm is that
none of the pages are generating any images.
I would be greatful if somebody would be able to assist.

Example code? What errors do you get? What happens when you try to view

the
images? Have you sent the right content-type header? Are there PHP error
messages being produced (this corrupts the image)?


Try commenting out the header() line, make sure error reporting is on and see
what's up. That should give you a human-readable error. I'm asssuming you have
your paths right (your 2 files have to be in the same directory)...

Shawn
--
Shawn Wilson
sh***@glassgiant.com
http://www.glassgiant.com
Jul 17 '05 #5
On Wed, 10 Nov 2004 22:51:36 -0000, "Tony Clarke" <cl*****@eircom.net> wrote:
I dont get any errors, doing a phpinfo(); shows GD installed. I use a html
with an <img> tag to call the php file that is supposed to generate the
image. Example code below is saved in a file called chart.php and use the
img src tag to call it. On the html page I just get a space as if the html
page could not find the image. Any help would be greatly appreciated.

<HTML>
<BODY>
<H1>RMAs Raised</H1>
<IMG SRC="test1.php" HEIGHT="250" WIDTH="480">
</BODY>
</HTML>
<?php
//-------------------- chart.php file
These are two separate files, right?
Also the <img> references test1.php whereas the comment says this is
chart.php.
header ("Content-type: image/png");
If image creation is going wrong, it can be useful to comment out the
content-type header line so you get it dumped out as text - that way you'll see
any error messages.
$img_handle = ImageCreate (230, 20) or die ("Cannot Create image");
$back_color = ImageColorAllocate ($img_handle, 0, 10, 10);
$txt_color = ImageColorAllocate ($img_handle, 233, 114, 191);
ImageString ($img_handle, 31, 5, 5, "My first Program with GD",
$txt_color);
ImagePng ($img_handle);
?>


--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #6

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

Similar topics

3
by: Rob Brown | last post by:
I put together an installation program and it works great the first time. The problem I have is that we want the users to be able to rerun the installation without needing to uninstall the older...
0
by: MichaƂ Januszczyk | last post by:
Hello. I've got the following problem: I created a windows installer project that installs my application. The application works with some files. I want to include some example files with the...
1
by: 3f | last post by:
Hello; We have made a web application that people can download from our web site and installed on: Windows XP Windows 2000 Professional Windows 2003 Server Windows 2000 Server
2
by: mb12036 | last post by:
All- Having a problem installing a DB2 client on a machine running AIX version 5.0. Client appeared to install one time succesfully, then was uninstalled and a reinstall was attempted. For...
2
by: news.symantec.com | last post by:
Hi All, I'm trying to install DB2 Enterprise Edition 8.1 (partitioned installation) onto a clean Win 2k SP4 advanced server box. The problem is the partitioned installation requires a "Domain...
4
by: Will Honea | last post by:
Wanting to look at V9, I attempted to install Db2 Express-C on a Suse Linux box I use as a sandbox. Since I was less that thorough when removing previous installations of V8 and V7, the...
4
by: James | last post by:
I am going to install DB2 version 9 on Windows XP workstation. But I can not continue the installation after I issue the command "setup /i en". System shows me that "A major error occoured while...
2
by: =?Utf-8?B?R3JlZw==?= | last post by:
I have no idea where to post this question, or even if its appropriate for me to post it here. I don't know if installing a VB.Net program has caused the problem I'm having or not. All I know is I...
0
by: Now You Know | last post by:
Best Christmas Lights Decoration Sale Installation in Los Angeles 818-386-1022 (These types of Innovative lights will definetly add to your Christmas decor) Here are the tips to use: The most...
0
by: Now You Know | last post by:
Best Christmas Lights Decoration Sale Installation in Los Angeles 818-386-1022 (These types of Innovative lights will definetly add to your Christmas decor) Here are the tips to use: The most...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.