Quote:
Originally Posted by memdy
Getting similar error message, just installed GD 2.0.23
---------- begin error msg --------------------
Warning: Division by zero in /var/www/html/forums/includes/functions_file.php on line 44
Warning: Division by zero in /var/www/html/forums/includes/functions_file.php on line 45
Warning: Division by zero in /var/www/html/forums/includes/functions_file.php on line 53
Warning: Division by zero in /var/www/html/forums/includes/functions_file.php on line 54
Fatal error: imagecreatetruecolor(): requires GD 2.0 or later in /var/www/html/forums/includes/functions_file.php on line 57
----------- end error msg ---------------
-- line 44 -- $width_factor = $w / $maxattachwidth;
-- line 45 -- $height_factor = $h / $maxattachheight;
-- line 53 -- $nw = round($w / $height_factor);
-- line 54 -- $nh = round($h / $height_factor);
-- line 57 -- $ni=imagecreatetruecolor($nw,$nh);
|
Be sure to restart your webserver and besure that php isn't complied with GD into it because then it will not run your newer version of GD... instead recompile PHP making sure that it points to your current version of GD... as far as the other errors they are just values that were overlooked when preparing the hack...
to mini: try to test for GD2 within the script with a function check on imagecreatetruecolor and if it fails then make it use imagecreate instead because it is compatible with all versions of GD so it will 1) make sure that the forum wont have errors in exchange for uglish images and 2) makes your hack compatible with earlier versions of PHP