PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
sample code 232 How to draw a simple bar graph? (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: sample code 232 How to draw a simple bar graph?
#339
neil (User)
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
sample code 232 How to draw a simple bar graph? 4 Months, 3 Weeks ago Karma: 0  
I am trying to run 'sample code 232 How to draw a simple bar graph?' from this site.

I have cut and pasted the code as is, and run it.

I am getting the following error:
Fatal error: Call to undefined function imagecreate() in graph.php on line 25

I am using php-gtk2 installed form the downloads at: http://gtk.php.net/download.php
php-gtk-2.0.1-win32-nts.zip
php-gtk-2.0.1-win32-extensions.zip

I have set in my ini file:
extension=php_gd2.dll

but my installation does not contain this file.

Can I get a windows php-gtk2 installation which contains php_gd2.dll, or a suitable version of the file to add to my installation ?

Is this my problem ?

Neil.
 
  The administrator has disabled public write access.
#341
neil (User)
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
Re:sample code 232 How to draw a simple bar graph 4 Months, 3 Weeks ago Karma: 0  
I have now downloaded from http://www.php.net/downloads.php
PECL 5.2.6 Win32 binaries
PECL 5.2.6 Non-thread-safe Win32 binaries

This provides numerous extensions including:
php_gd2.dll

I am now getting an error message:
"This application has failed to start because php5ts.dll was not found. Re-installing the application may fix this problem".

I don't have this file in any of the downloads I have made so far.

I'll look some more ...

Neil.
 
  The administrator has disabled public write access.
#342
neil (User)
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
Re:sample code 232 How to draw a simple bar graph 4 Months, 3 Weeks ago Karma: 0  
I copied php5ts.dll from:
php-5.2.4-Win32.zip
but this is icompatible.

Error error message:

PHP Warning: PHP Startup: gd: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match

Neil.
 
  The administrator has disabled public write access.
#343
kksou (Admin)
Admin
Posts: 391
graph
User Online Now Click here to see the profile of this user
Re:sample code 232 How to draw a simple bar graph 4 Months, 3 Weeks ago Karma: 8  
Please refer to the following article:
http://www.kksou.com/php-gtk2/References/PHP-GTK-v2.0.1-with-GD2-library.php

Regards,
/kksou
 
 
Last Edit: 2008/06/28 08:57 By kksou.
  The administrator has disabled public write access.
#344
neil (User)
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
Re:sample code 232 How to draw a simple bar graph 4 Months, 3 Weeks ago Karma: 0  
Hi kksou,

Problem solved by using the php_gd2.dll you have provided.

Thanks very much.

Neil.
 
  The administrator has disabled public write access.
#963
pws442 (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Re:sample code 232 How to draw a simple bar graph 1 Month, 1 Week ago Karma: 0  
I get the same error with imagecreate. PHPinfo for version 5.2.6 shows a section for bundled GD compatible with version 2.0.34. My php extensions are in c:/php/ext. In there resides the php_gd2.dll file. In c:/windows/php.ini I have uncommented the extensions=php_gd2.dll line (obviously), and restarted apache. Other tools work fine (Hello.php, the one I just got regarding dynamically changing between a table and a tree view).

What am I missing?
 
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2008. kksou.com. All Rights Reserved