From: rwh at lim dot com Operating system: RH9 PHP version: 4.3.4 PHP Bug Type: GD related Bug description: PHP Fatal error: Call to undefined function: imagepsloadfont() in /XXX/X.php
Description: ------------ PHP is compiled as an Apache 1.3 DSO; ./configure --with-apxs=/path/to/apxs --with-gd --with-zlib-dir=/path/to/dir I just upgraded the PHP engine from 3.0.x to 4.3.4 and I'm debugging the php3 code. According to http://php.net/imagepsloadfont, imagepsloadfont() is a built-in function, so I don't understand the Fatal Error. Here is the line from my apache log: [Wed Nov 5 18:33:04 2003] [error] PHP Fatal error: Call to undefined function: imagepsloadfont() in /path/to/chart.inc on line 322 Reproduce code: --------------- Here is line 322 of chart.inc: -------------------------------------- 313 function render ($log = false, $cache = false) { if(!$this->is_chart) return false; $this->rescale(); if ($log) $this->log = $log; 322 $fgc = imagepsloadfont(_fontpath . "/type1/FGC_____.pfb"); $im = imagecreate($this->x, $this->y); $bgcolor = ImageColorAllocate($im, 255, 255, 255); $fgcolor[0] = ImageColorAllocate($im, 0, 0, 0); $fgcolor[1] = ImageColorAllocate($im, 0, 0, 255); $hicolor = ImageColorAllocate($im, 255, 0, 0); $bdcolor = ImageColorAllocate($im, 229, 227, 204); 330 $gridcolor = ImageColorAllocate($im, 192, 192, 192); --------------------------------- Also: --------------------------------- 15 define('_fontpath', '/path/to/fonts'); --------------------------------- Expected result: ---------------- I expect the code to make it through the engine without a Fatal Error. The function is a built-in so I don't see how it would be undefined. Actual result: -------------- Here is the line from my apache log: [Wed Nov 5 18:33:04 2003] [error] PHP Fatal error: Call to undefined function: imagepsloadfont() in /path/to/chart.inc on line 322 -- Edit bug report at http://bugs.php.net/?id=26147&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26147&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26147&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26147&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26147&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26147&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26147&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26147&r=support Expected behavior: http://bugs.php.net/fix.php?id=26147&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26147&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26147&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26147&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26147&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26147&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26147&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26147&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26147&r=float