PHP 8 error

1,119 views
Skip to first unread message

IXBONE IXBONE

unread,
Sep 17, 2021, 4:40:22 AM9/17/21
to JpGraph

Fatal error: Uncaught Error: Undefined constant "IMG_PNG" in C:\PHP\jpgraph\src\jpgraph_errhandler.inc.php:282 Stack trace: #0 C:\PHP\jpgraph\src\jpgraph_errhandler.inc.php(156): JpGraphErrObjectImg->Raise('This PHP instal...') #1 C:\PHP\jpgraph\src\jpgraph_errhandler.inc.php(161): JpGraphException->Stroke() #2 [internal function]: JpGraphException::defaultHandler(Object(JpGraphExceptionL)) #3 {main} thrown in C:\PHP\jpgraph\src\jpgraph_errhandler.inc.php on line 282

Any suggestions? Thanks!

w1djm...@gmail.com

unread,
Sep 17, 2021, 8:02:35 AM9/17/21
to JpGraph
In jpgraph.php near line 162 you may try adding the code shown below. None of the image types were defined so using another image type would throw an error too. Not 100% sure this will solve the issue but it should.

define('IMG_JPG',false);
define('IMG_GIF',false);
define('IMG_PNG',false);
define('IMG_WBMP',false);
define('IMG_XPM',false);
Reply all
Reply to author
Forward
0 new messages