Forum Moderators: coopster
But I've noticed that the following codes no long works after ive set the 2 functions to OFF.
$imagename = "http://www.example.com/image.png";
$image1 = @imagecreatefrompng($imagename);
$textcolor = imagecolorallocate($image1, 146, 2, 2);imagestring($image1, 2, 3, 100, 'Sample Text', $textcolor);
header("Content-type: image/png");
imagepng($image1);
imagedestroy($image1);
Is there any other adjustments needed because of the effect of magic_quotes_gpc=OFF and register_globals=OFF?
[edited by: Gian04 at 12:56 pm (utc) on July 8, 2007]
quotes and double quotes will no longer be escaped automatically in the POSTED data so you need to use functions like addslashes() manually to escape them as they DO cause problems and break queries etc in certain cases.
the effect of register_globals=Off
your direct variable name references will no longer work and you must have to fetch the posted data from variables using Global Arrays e.g $_POST, $_GET etc etc
tip: instead of switching off things permanently in the php.ini, especially on a live serve with different applications, you should use ini_set() function or htaccess to change the php behavior just for the LIFE TIME of your script. this is the best chosen method to avoid any crashes.