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

Call to undefined function

Can anyone point me in the right direction here?

I've got this little image script

<?php
$im = ImageCreate(200,200);
$white = ImageColorAllocate($im,oxFF,oxFF,oxFF);
$black = ImageColorAllocate($im,ox00,ox00,ox00);
ImageFilledRectangle($im,50,50,150,150,$black);
header("content-type: image/png");
ImagePNG($im);
?>

which gives me
Fatal error: Call to undefined function: imagecreate() in
..../imagetest.php on line 2

so I tried to check the GD status with

<?php
$gdinfo=gd_info();
foreach($gd_info as $key=>$element) {
print("<br>$key = $element");
}
?>

and got
Fatal error: Call to undefined function: gd_info() in .../php_info.php
on line 2
I read somewhere that I need libpng which I've downloaded it from
http://www.libpng.org/pub/png/libpng.html but the INSTALL file has
lost me.
My dir structure isn't the same as theirs.
It doesn't have projects/msvc so I can't take that route
I've got zlib installed but I don't have zlib/INSTALL so no go there
and I'm not sure what...

Copy the file (or files) that you need from the
scripts directory into this directory, for example

UNIX example: cp scripts/makefile.std makefile

....means. Copy them into libpng?

Any thoughts that may help me put the light on in my head (and the
images on web page) most apreciated.

Thanks
Ann
Jul 17 '05 #1
1 9965
"annie" <ba****@hotmail.com> wrote in message
news:5b**************************@posting.google.c om...
Can anyone point me in the right direction here?

I've got this little image script

<?php
$im = ImageCreate(200,200);
$white = ImageColorAllocate($im,oxFF,oxFF,oxFF);
$black = ImageColorAllocate($im,ox00,ox00,ox00);
ImageFilledRectangle($im,50,50,150,150,$black);
header("content-type: image/png");
ImagePNG($im);
?>

which gives me
Fatal error: Call to undefined function: imagecreate() in
.../imagetest.php on line 2

so I tried to check the GD status with

<?php
$gdinfo=gd_info();
foreach($gd_info as $key=>$element) {
print("<br>$key = $element");
}
?>

and got
Fatal error: Call to undefined function: gd_info() in .../php_info.php
on line 2
I read somewhere that I need libpng which I've downloaded it from
http://www.libpng.org/pub/png/libpng.html but the INSTALL file has
lost me.
My dir structure isn't the same as theirs.
It doesn't have projects/msvc so I can't take that route
I've got zlib installed but I don't have zlib/INSTALL so no go there
and I'm not sure what...

Copy the file (or files) that you need from the
scripts directory into this directory, for example

UNIX example: cp scripts/makefile.std makefile

...means. Copy them into libpng?

Any thoughts that may help me put the light on in my head (and the
images on web page) most apreciated.

Thanks
Ann


Have you uncommented the line "extension=php_gd2.dll" in php.ini?
Jul 17 '05 #2

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

Similar topics

9
by: Netocrat | last post by:
Any comments on the correctness of the statements 1, 2a, 2b, 3 and 4 in the code below? If they are correct, then the definition of an object as well as that of an lvalue is broken in C99 by the...
3
by: Cong Wang | last post by:
Hi,all! I found an interesting problem,it is that how to implement a C function which can be called once and return twice? Just like the POSIX function fork() or the library function...
7
by: RafaƂ Maj Raf256 | last post by:
There was a way to trinck program to call purly abstract non-existing method (causing undefined behaviour), I would like to try that for curiosity (how different compilers/platforms react), how to...
8
by: Cruella DeVille | last post by:
I'm writing a class to handle reading/writing from/to files like this (shortened) lass FileIO{ private $filename; private $mode; private $filePointer; private $dictionary; public function...
20
by: sam_cit | last post by:
Hi Everyone, I have the following code, int main() { int p = {10,20,30,40,50}; int *i = &p; printf("before : %p\n",(void*)i); printf("1 %d %d\n",*++i,*i++);
11
by: Felix Kater | last post by:
Hi, I can compile and run this code (see below) which twice calls the function f, first with too less, second with too much arguments. But is it legal and free of memory leaks and other...
9
by: java | last post by:
Hey there, I just removed an elderly PHP4-Installation from my Windows-Box and installed PHP 5.2.1. I used the PHP4-Module as local batchfile- interpreter by E:\ersDHCP>php ./extractLog.php ...
9
by: CryptiqueGuy | last post by:
Consider the variadic function with the following prototype: int foo(int num,...); Here 'num' specifies the number of arguments, and assume that all the arguments that should be passed to this...
5
by: kris | last post by:
Hi I have written a program which prints the hostid on a linux system. The programm uses gethostid() function call which is defined in the library file unistd.h. But my programm gets compiled...
9
by: Yannick | last post by:
Hi everyone - I am not quite sure to understand what is really going on when a function defined in one translation unit calls a function defined in a different translation unit without knowing...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.