I just moved to a new server and got them to install ImageMagick for me(My old host would let me install it).
I have a form that lets people upload a picture to a database. I'm now using ImageMagick to convert pictures submitted to the database to thumbnails. It works great, but I wanted to make a script convert the pictures allready in the database to thumbnails too. In the upload script I use " $data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));" on the string from the form.
I then use "$convert = "/usr/local/bin/convert -size " . "$new_w" . "x" . "$new_h" . " $imagetype:" . "$form_data $tempfile";
system($convert);" later on to convert it.
system reads the $form_data string as being "/tmp/phpKBADQu" witch is the tempary filename for the $form_data string.
I tried using "$data = stripslashes(fread(fopen($bin_data, "r"), filesize($bin_data)));" on the string from the form.
PHP says "Warning: fopen("ÿØÿà","r") - No such file or directory"
I tried to use fwrite() to write the string to file that didn't work either.
What am I doing wrong.