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 5 1648
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
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)?
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 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
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)?
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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: erikbower65 |
last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps:
1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal.
2. Connect to...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: kcodez |
last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |