Could not create temporary file
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Could not create temporary file
The temporary directory IM is using is either not writable, does not exist, or is disk full.
on UNIX-like systems you can set the temporary directory location (defaults to /tmp) using the environment variable "MAGICK_TEMPDIR". Or the command line option "-set registry:temporary-path {dir}". Under windows this is set using Registry entry "HKEY_Current_User\Environment\TMP"
on UNIX-like systems you can set the temporary directory location (defaults to /tmp) using the environment variable "MAGICK_TEMPDIR". Or the command line option "-set registry:temporary-path {dir}". Under windows this is set using Registry entry "HKEY_Current_User\Environment\TMP"
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Could not create temporary file
Hello,
I've the same problem. It happened after i upgraded apache from 1.3 to 2.2 and php from 4 to 5.
All four servers have this problem now after the upgrade. I tried to reinstall the latest version of ImageMagick (downloaded it 2 days ago) by using this tutorial:
http://www.vbulletin.com/forum/showthread.php?t=155636
How can fix this problem?
"Could not create temporary file."
Regards
I've the same problem. It happened after i upgraded apache from 1.3 to 2.2 and php from 4 to 5.
All four servers have this problem now after the upgrade. I tried to reinstall the latest version of ImageMagick (downloaded it 2 days ago) by using this tutorial:
http://www.vbulletin.com/forum/showthread.php?t=155636
How can fix this problem?
"Could not create temporary file."
Regards
Re: Could not create temporary file
ImageMagick should report why ImageMagick fails to create a temporary file. For example,
- -> setenv MAGICK_TMPDIR /
-> convert logo.ps logo.miff
convert: unable to create temporary file `logo.ps': Permission denied.
convert: missing an image filename `logo.miff'.
Re: Could not create temporary file
[root@server ~]# setenv MAGICK_TMPDIR /
-bash: setenv: command not found
[root@server ~]# convert logo.ps logo.miff
convert: missing an image filename `logo.miff'.
[root@server ~]#
Check these screenshots please:
http://dts.msxlabs.org/NeutralizeR/Snap132.png
http://dts.msxlabs.org/NeutralizeR/Snap29.png
-bash: setenv: command not found
[root@server ~]# convert logo.ps logo.miff
convert: missing an image filename `logo.miff'.
[root@server ~]#
Check these screenshots please:
http://dts.msxlabs.org/NeutralizeR/Snap132.png
http://dts.msxlabs.org/NeutralizeR/Snap29.png
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Could not create temporary file
You are probably use Bourne shell variant rather than Csh.
try...
However MAGICK_TMPDIR should be set to some directory that is writable!!!
Like some sub-directory of your home...
try...
Code: Select all
MAGICK_TMPDIR=/
export MAGICK_TMPDIR
Like some sub-directory of your home...
Code: Select all
mkdir $HOME/magick_tmp
MAGICK_TMPDIR=HOME/magick_tmp
export MAGICK_TMPDIR
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Could not create temporary file
[root@server ~]# MAGICK_TMPDIR=/
[root@server ~]# export MAGICK_TMPDIR
[root@server ~]# mkdir $HOME/magick_tmp
[root@server ~]# MAGICK_TMPDIR=HOME/magick_tmp
[root@server ~]# export MAGICK_TMPDIR
[root@server ~]# convert logo.ps logo.miff
convert: missing an image filename `logo.miff'.
[root@server ~]#
Still no changes at all.
http://www.msxlabs.org/forum/image.php?i=im
Could not create temporary file.
[root@server ~]# export MAGICK_TMPDIR
[root@server ~]# mkdir $HOME/magick_tmp
[root@server ~]# MAGICK_TMPDIR=HOME/magick_tmp
[root@server ~]# export MAGICK_TMPDIR
[root@server ~]# convert logo.ps logo.miff
convert: missing an image filename `logo.miff'.
[root@server ~]#
Still no changes at all.
http://www.msxlabs.org/forum/image.php?i=im
Could not create temporary file.
Re: Could not create temporary file
Perhaps you are missing Postscript support. Let's see if ImageMagick works from the command line. Do not set any environment variables and type:
- convert logo: logo.miff
convert logo.miff logo.pnm
Re: Could not create temporary file
The commands worked.
But nothing changed at script side apart from Apache 2.2.6 update
But nothing changed at script side apart from Apache 2.2.6 update
Re: Could not create temporary file
Any solutions? I don't want to use GD. ImageMagick supports animated gif resizing...
Re: Could not create temporary file
Code: Select all
/**
* See function definition in vB_Image_Abstract
*/
function print_image_from_string($string, $moveabout = true)
{
if ($this->registry->options['safeupload'])
{
$tmpname = $this->registry->options['tmppath'] . '/' . md5(uniqid(microtime()) . $this->registry->userinfo['userid']);
}
else
{
if (!($tmpname = @tempnam(ini_get('upload_tmp_dir'), 'vb')))
{
echo 'Could not create temporary file.';
return false;
}
}
What's the issue with the code above?
Re: Could not create temporary file
oh god, i changed the "upload_tmp_dir" value in php.ini to "upload_tmp_dir = /tmp" and the problem is fixed