Re: Safe mode & imagecreatefromjpeg

From: Date: Wed, 13 Oct 2004 13:48:15 +0000
Subject: Re: Safe mode & imagecreatefromjpeg
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-199370@lists.php.net to get a copy of this message
Paulo JF Silva wrote:
Hi, I have PHP 4.3.5 and safe mode on. When I create a new image with imagecreatefromjpeg(), the image owner is 'httpd' and not my ftp user. [this is in a shared host]. I would like to know if there is any way to create the image with my user... I can workaround mkdir & stuff with ftp access but i can't figure out a workaround this 'problem' caused by safe mode.
It's a little tricky. You need to catch imagecreatefromjpeg() output using output buffering, then open a temporary file, write the output there, rewind(), and ftp_fput(). Haven't tried it, but should work.

« previous php.general (#199370) next »