i want to run this code: PHP: $folder = $this->getDataFolder()."Image/";$colores = [];$imagen = @imagecreatefrompng($folder."Rules.png");if ($imagen === false) { $sender->sendMessage(T::RED."Error with image!"); return true;}$r = 0;$g = 0;$b = 0;$ancho = 128;$altura = 128;$imagen = imagescale($imagen, $ancho, $altura, IMG_NEAREST_NEIGHBOUR);imagepng($imagen, $folder . "Rules-new.png");for ($y = 0; $y < $altura; ++$y) { for ($x = 0; $x < $ancho; ++$x) { $rgb = imagecolorat($imagen, $x, $y); $color = imagecolorsforindex($imagen, $rgb); $r = $color["red"]; $g = $color["green"]; $b = $color["blue"]; $colores[$y][$x] = new Color($r, $g, $b, 0xff); }}$map = Item::get(Item::FILLED_MAP);$map->setCustomName("§cRules");$sender->getInventory()->remove($map);$map = Item::get(Item::FILLED_MAP);$map->setCount(1);$key = 18293883;$tag = new CompoundTag("", []);$tag->setString("map_uuid", $key);$map->setCompoundTag($tag);$map->setCustomName("§cRules");$sender->getInventory()->setItem(3, $map); i think it works but because the gd extension is disable it doesn't work, so i think i should run it with gd extension, if you can please tell me how?
The more information you provide, the more likely you'll get an answer, and so far you didn't actually answer Muqsit's question, so we have no way of knowing what's going on. Do you have the console output of the php build script that "didn't work"? When you run "/path/to/your/pmmp/php/bin/php -m" what do you see? What error does your script show?
This: PHP: Last failed login: Thu May 24 14:27:00 CEST 2018 from 58.242.83.42 on ssh:nottyThere were 4168 failed login attempts since the last successful login.Last login: Thu May 24 07:33:17 2018 from 151.64.100.7[root@minetest ~]# cd /home[root@minetest home]# cd minecraf-bash: cd: minecraf: No such file or directory[root@minetest home]# cd minecraft[root@minetest minecraft]# cd multicraft[root@minetest multicraft]# cd jar[root@minetest jar]# cs pocket-bash: cs: command not found[root@minetest jar]# cd pocket[root@minetest pocket]# /bin/php - mPHP Warning: Module 'PDO' already loaded in Unknown on line 0Could not open input file: -[root@minetest pocket]# /bin/php -mPHP Warning: Module 'PDO' already loaded in Unknown on line 0[PHP Modules]bcmathbz2calendarCorectypecurldatedomeregexiffileinfofilterftpgdgettextgmphashiconvjsonldaplibxmlmbstringmhashmysqlmysqliodbcopensslpcntlpcrePDOpdo_mysqlPDO_ODBCpdo_sqlitePharposixreadlineReflectionsessionshmopSimpleXMLsocketsSPLsqlite3standardsysvmsgsysvsemsysvshmtokenizerwddxxmlxmlreaderxmlrpcxmlwriterxslzipzlib[Zend Modules][root@minetest pocket]#
Great, you can see the gd extension is listed so that's not the problem... Now what error does your script give?
This is the code: And the error: Code: 27.05 22:34:02 [Server] Server thread/CRITICAL Error: "Call to undefined function MapsPic\imagecreatefrompng()" (EXCEPTION) in "MapsPic/src/MapsPic/Main" at line 33
You need to install libpng-dev PHP: //Ubuntu/Debianapt-get install libpng-dev//CentOSyum install libpng-dev And then compile php with libpng. Code: --with-gd \ --with-png-dir \