Call to undefined function imagecreatefromstring()

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
skymark
User
Posts: 183

Call to undefined function imagecreatefromstring()

Post by skymark »

Hi all,

We are trying to upgrade a program from phpmaker version 12 to version 2019.0.10. There is an edit page for a table with a file field. When we open it, there is an error like this:

Uncaught Error: Call to undefined function PHPThumb\imagecreatefromstring() in C:\MySite\vendor\hkvstore\phpthumb\src\PHPThumb\GD.php:93 Stack trace: #0 C:\MySite\phpfn15.php(9527): PHPThumb\GD->__construct('\x89PNG\r\n\x1A\n\x00\x00\x00\rIHD...', Array, Array) #1 C:\MySite\phpfn15.php(8759): PHPMaker2019\MyProject\ResizeBinary('\x89PNG\r\n\x1A\n\x00\x00\x00\rIHD...', 200, 0) #2 C:\MySite\classes\page1_edit.php(913): PHPMaker2019\MyProject\RenderUploadField(Object(PHPMaker2019\MyProject\DbField)) #3 C:\MySite\classes\page1_edit.php(727): PHPMaker2019\MyProject\page1_edit->renderRow() #4 C:\MySite\page1edit.php(23): PHPMaker2019\MyProject\page1_edit->run() #5 {main} thrown in C:\MySite\vendor\hkvstore\phpthumb\src\PHPThumb\GD.php on line 93

Is there a way to fix it? Thanks.


arbei
User
Posts: 9384

Post by arbei »

Make sure your PHP has the GD extension, see https://php.net/manual/en/image.installation.php.


skymark
User
Posts: 183

Post by skymark »

Thanks! It works.


Post Reply