note 108533 added to function.imagecreatefromjpeg

From: Date: Fri, 04 May 2012 09:31:57 +0000
Subject: note 108533 added to function.imagecreatefromjpeg
Groups: php.notes 
Request: Send a blank email to php-notes+get-187472@lists.php.net to get a copy of this message
I was experiencing troubles with imagecreatefromjpeg() as it outputted errors even when called with @ in front. ini_set("gd.jpeg_ignore_warning", 1) didnt work for me, so I came up with another simple solution. The problem is caused by gd error output, so by redirecting STDERR to /dev/null all the error messages in it are supressed and you can still use regular STDOUT for your error output. So, just use <? fclose( STDERR ); $STDERR = fopen( "/dev/null", "wb" ); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 46.138.162.14 ---- Manual Page -- http://www.php.net/manual/en/function.imagecreatefromjpeg.php Edit -- https://master.php.net/note/edit/108533 Del: integrated -- https://master.php.net/note/delete/108533/integrated Del: useless -- https://master.php.net/note/delete/108533/useless Del: bad code -- https://master.php.net/note/delete/108533/bad+code Del: spam -- https://master.php.net/note/delete/108533/spam Del: non-english -- https://master.php.net/note/delete/108533/non-english Del: in docs -- https://master.php.net/note/delete/108533/in+docs Del: other reasons-- https://master.php.net/note/delete/108533 Reject -- https://master.php.net/note/reject/108533 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#187472) next »