[vox-tech] trouble generating images with PHP 4.2.2

Jared Duncan vox-tech@lists.lugod.org
Sat, 1 Mar 2003 04:33:00 -0800 (PST)


--0-72604131-1046521980=:25502
Content-Type: text/plain; charset=us-ascii
Content-Id: 
Content-Disposition: inline




__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
--0-72604131-1046521980=:25502
Content-Type: message/rfc822

X-Apparently-To: bitterangelmusic@yahoo.com via 216.136.131.206; 01 Mar 2003 04:31:46 -0800 (PST)
X-Track: 1: 100
Return-Path: <duncanj@gaia.ecs.csus.edu>
Received: from 130.86.71.150  (EHLO hera.ecs.csus.edu) (130.86.71.150)
  by mta167.mail.scd.yahoo.com with SMTP; 01 Mar 2003 04:31:46 -0800 (PST)
Received: from gaia.ecs.csus.edu (IDENT:root@gaia.ecs.csus.edu [130.86.71.9])
	by hera.ecs.csus.edu (8.11.6/8.11.1) with ESMTP id h21CVj109737
	for <bitterangelmusic@yahoo.com>; Sat, 1 Mar 2003 04:31:45 -0800
Received: from localhost (duncanj@localhost)
	by gaia.ecs.csus.edu (8.11.6/8.11.6) with ESMTP id h21CViC04672
	for <bitterangelmusic@yahoo.com>; Sat, 1 Mar 2003 04:31:44 -0800
Date: Sat, 1 Mar 2003 04:31:44 -0800 (PST)
From: Jared Michael <duncanj@ecs.csus.edu>
To: bitterangelmusic@yahoo.com
Subject: trouble generating images with PHP 4.2.2
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 1065

Hi everyone-

I'm trying to generate images for the first time with PHP and
my script's source code starts like this:
------------------
<?
  $height = 200;
  $width = 200;
  $im = ImageCreate($width, $height);
...
?>
-------------------
and then it goes on to draw the image and so forth, but that doesn't
matter at this point, because apparently my PHP build isn't supporting
any image-creating functions at all.  I get the following error:

Fatal error: Call to undefined function: imagecreate() in
/usr/local/apache/html/simplegraph.php on line 4

which is the error that everyone gets when they don't have GD installed-
BUT, as of PHP 4 *it comes bundled with php itself*-- so what gives??

I searched for hours for support groups with messages from people
experiencing similar problems, but they all were either using either php 3
or <, windows machines (GD not enabled by default for windows users),
or had my exact complaint without any replies or resolutions.

I think the problem may lie somewhere within my PHP's configuration
options, and how they may not be taking effect.  According to my phpinfo,
I used the following command to configure my php:

'./configure' '--prefix=/usr/local/php' '--with-mysql=/usr' '--with-xml'
'--with-apache=../apache_1.3.26' '--with-curl=/usr/local/curl'
'--with-pspell=/usr/local/pspell' '--enable-shared-pdflib'
'--enable-track-vars'

and I read somewhere that to use the built-in GD that comes with PHP as of
v. 4 I need to use the '--with-gd' option.  So I reran the ./configure
command exactly the same way, but this time tagging on the '--with-gd'
at the end, then make then make install, then I stopped and restarted
apache but then I still get the same error message and my phpinfo file
does NOT reflect the change that I made to my configuration options.
Could it be then that there is just something I'm doing wrong here and I'm
not fully flushing things?

I'm using RH linux 7.1...

any help is greatly appreciated.

-Jared

--0-72604131-1046521980=:25502--