Page 1 of 1

Absolute beginner! No visible picture!

Posted: 2006-12-28T15:18:09-07:00
by niklas.lindblad
I'm an absolute beginner to Imagemagick and I have tried to get basic functions to work for days. Please, someone, give me a hand with pure basic knowledge.

This is the problem:
how do I write code to get a picture visible on my browser?

For an exemple, I build a first PHP-page, named test1.php contaning the following code:

Code: Select all

<?php 
system("/usr/bin/convert images/00001022.jpg -resize 50%  output.jpg");
?>
then a second page namned test2.php with this code:

Code: Select all

<?php 
echo"My testpicture <img src=\"test1.php\">";
?>
then I upload these pages to my webhotel (that is configured with imageMagick version "convert" 6.0.7 08/28/06 Q16) and surf to the page test2.php and nothing happens, the webpage says "My testpicture" and a broken img-link and nothing more.

This is most probably a pure really really beginners problem, but … it drives me totaly nuts. I have surf the web for several hours to find the answer to this beginner question, but can only find more complex questions and answers – so please, someone help me!!

Regards
Niklas

Posted: 2006-12-28T15:42:31-07:00
by Bonzo
When you run your code an image is created in your case output.jpg - assuming you have CHMOD the foder you are working in to 777

Modify your test1.php page to this then view this page in your browser.

Code: Select all

<?php 
system("/usr/bin/convert images/00001022.jpg -resize 50%  output.jpg"); 
?>
<img src="output.jpg">
Some php examples on my site click on the www link at the bottom of this post.

Posted: 2007-01-01T14:21:10-07:00
by niklas.lindblad
Nothin works after chmod!

After I CHMOD the folder to 777 I get a "INTERNAL SERVER ERROR" message … whats wrong?

Sorry for these beginners questions :oops: , but I'm really stuck!

Regards
Niklas