473,320 Members | 1,841 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,320 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 9954
"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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.