Re: Error with system() when running convert

From: Date: Tue, 21 Dec 2004 06:08:21 +0000
Subject: Re: Error with system() when running convert
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-204794@lists.php.net to get a copy of this message
Well, answering my own question, it turns out that convert is in /usr/X11R6/bin, which is not in php's path. Creating an alias in /usr/bin solved the issue. On Tue, 21 Dec 2004 00:59:40 -0500, Jonathan Schwarz <jlschwarz@gmail.com> wrote: > I'm using some system calls to do some image processing, mostly just > resize, compress, and a few other simple tasks on some jpgs. I'm using > convert, djpeg, cjpeg, mogrify, etc to accomplish this. > > The issue I'm running into now is that I have a command that runs fine > from the command line, but not through system. It returns an error > code of 127, which wasn't helpful to me. > > The actual command is to convert, "convert $img1 -negate $img2". If I > print the command, then copy and paste into a terminal, it works. It > doesn't work through php, though, and there is no output from convert, > it just fails silently. > > I have two thoughts on the matter: the first was that it was > permissions based, but no matter how loose I make the permissions, it > still won't work. Besides, other commands have no such issues. The > second thought is that php is running out of memory, as perhaps the > convert command is very intensive? It doesn't seem right to me, but it > was mentioned in the comments on the php website, and I can't come up > with anything else. Has anyone run across error 127 from system, or > have any idea what's going on? > > Thanks, > Jonathan >

« previous php.general (#204794) next »