Fatal error: Call to undefined function: imagecreate()
P粉459578805
2023-08-27 18:26:11
<p>I'm trying to put some graphics on a web page, and on a prototype on my computer, it's working fine on localhost. But now I'm uploading the file to the server and I'm having trouble drawing some graphics. On my computer they are drawn, but not on the server. </p>
<p>I get this error
<code>Fatal error: Call to undefined function ImageCreate() in /home/t1g01/phplot.php line 248</code> </p>
<p>Line 248</p>
<p><code>$this->img = ImageCreate($this->image_width, $this->image_height);</code> </p>
<p>I am using phplot and I uploaded files from phplot as well. Can anyone help me? </p>
<p>We apologize for any errors in the English and thank you in advance. </p>
If you are using a Linux computer, execute this command from the console:
Install the php_gd2.dll extension. It will start working after Apache is restarted.
PS: You should first check your current php version
As for me:
So, my PHP version is 7.3, so, the command for my version is:
This means that your installation of php does not have the gd library installed/enabled.
http://www.php.net/manual/en/image. install.php