Trying to get started with Teechart for PHP, downloaded today, I immediately run into problems.
None of the exmples works and the short PHP-code below crashes. Commenting out the rendering line lets the program survive, but no graph.
That I have the proper file-permissions is demonstrated by the line that is commented works when uncommented.
What do I do wrong?
Thanks in advance for any tip.
Håkan
<?php
require_once "../teechart/sources/libTeeChart.php";
$tchart = new TChart(500,300);
#shell_exec ( "touch tchart.png" );
$tchart->render("tchart.png");
?>
Now, some html lines are required to display the image at the same page :
<body>
<img alt="bug" src="tchart.png" style="border: 0px solid gray;"/>
</body>
I can't render the simplest of graphs in Teechart for PHP
Re: I can't render the simplest of graphs in Teechart for PHP
Hello Håkan,
Your code works fine for me here with EasyPHP 5.3.8.1. I only had to change the path for the libTeeChart.php to fit my configuration.
Have you tried with EasyPHP or another machine?
Your code works fine for me here with EasyPHP 5.3.8.1. I only had to change the path for the libTeeChart.php to fit my configuration.
Have you tried with EasyPHP or another machine?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: I can't render the simplest of graphs in Teechart for PHP
My problem seems to be with the ubuntu distribution of GD, several functions utilised by Teechart are missing.
After downloading and installing PHP 5.3.8 with the following:
./configure --with-mysql --with-gd --with-jpeg-dir --enable-gd-native-ttf --with-png-dir --with-freetype-dir
I can get the script working with the php command line client but Apache2 gives me the following message:
Fatal error: Call to undefined function imagecreatetruecolor() in /var/www/teechart/sources/GraphicsGD.php on line 1012
(after restart and including
ini_set('display_errors', 'On');
error_reporting(E_ALL);
in the script).
So now I think it has to do with my Apache settings. Any tip? My phpinfo is attached.
Håkan
Ps When your program doesn't work out of the box with at least one of the major distributions I guess it would be wise to be a bit more detailled in your installation instructions.
After downloading and installing PHP 5.3.8 with the following:
./configure --with-mysql --with-gd --with-jpeg-dir --enable-gd-native-ttf --with-png-dir --with-freetype-dir
I can get the script working with the php command line client but Apache2 gives me the following message:
Fatal error: Call to undefined function imagecreatetruecolor() in /var/www/teechart/sources/GraphicsGD.php on line 1012
(after restart and including
ini_set('display_errors', 'On');
error_reporting(E_ALL);
in the script).
So now I think it has to do with my Apache settings. Any tip? My phpinfo is attached.
Håkan
Ps When your program doesn't work out of the box with at least one of the major distributions I guess it would be wise to be a bit more detailled in your installation instructions.
- Attachments
-
- phpinfo().rar
- (7.87 KiB) Downloaded 2523 times
Re: I can't render the simplest of graphs in Teechart for PHP
Hello,
I also found the problem with imagecreatetruecolor some time ago. Find here the instructions I wrote:
http://www.teechart.net/support/viewtop ... etruecolor
If you still find problems with it, please don't hesitate to let us know.
I also found the problem with imagecreatetruecolor some time ago. Find here the instructions I wrote:
http://www.teechart.net/support/viewtop ... etruecolor
If you still find problems with it, please don't hesitate to let us know.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |