Re: calling mogrify from php

From: Date: Fri, 05 Jan 2001 21:14:16 +0000
Subject: Re: calling mogrify from php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32937@lists.php.net to get a copy of this message
Hello Gabriel, (GW == "Gabriel Wicke") gwicke@gmx.net writes: GW> The full mogrify command is in a small shellscript and executes GW> fine when called from the shell. GW> <?php GW> echo "$userfile[0], $userfile_name[0]<br>"; GW> echo "$userfile[1], $userfile_name[1]<br>"; What do these echo to the browser? GW> copy ($userfile[0], "/gabriel/html/mogrify/$userfile_name[0]"); GW> copy ($userfile[1], "/gabriel/html/mogrify/$userfile_name[1]"); GW> exec("/path-to-script/mogrify_640x480_sharpen"); Does the above produce any errors? Shouldn't the exec() call for mogrify_640x480_sharpen have something after it? Like the name of the target file? I don't now because I've never used mogrify. ?>> I have a feeling it's the paths to the copied files.. Try: <?php /* Untested */ echo "$userfile[0], $userfile_name[0]<br>"; echo "$userfile[1], $userfile_name[1]<br>"; if(! @copy($userfile[0], "/gabriel/html/mogrify/$userfile_name[0]")) { print "Couldn't copy $userfile[0]"; } if(! @copy($userfile[1], "/gabriel/html/mogrify/$userfile_name[1]")) { print "Couldn't copy $userfile[1]<br>"; exit; } exec("/path-to-script/mogrify_640x480_sharpen"); ?> GW> Gabriel -Brian

« previous php.general (#32937) next »