View previous topic :: View next topic |
Author |
Message |
Delphino -
Joined: 06 Oct 2003 Posts: 2
|
Posted: Mon Oct 06, 2003 6:14 pm Post subject: Error 200 while creating an image ? |
|
|
Hello Guys,
I'm new to Abyss Webserver. I have installed it with perl and php. Everything is configured well. The register_globals variable is set "on". I tried some PHP scripts and it looks like they work well.
Now I tried to generate an image file.
Code: |
<?
Header("Content-type: image/jpeg");
$im_toloadfrom = ImageCreateFromJPEG($sourceimage);
$imagesize = getimagesize($sourceimage);
$source_x = $imagesize[0];
$source_y = $imagesize[1];
if($source_x > $source_y)
$scale = $source_x / $size_x;
else
$scale = $source_y / $size_y;
$size_x = $source_x / $scale;
$size_y = $source_y / $scale;
$im_thumb = imagecreate($size_x,$size_y);
imagecopyresized($im_thumb,$im_toloadfrom,0,0,0,0,$size_x,$size_y,imagesx($im_toloadfrom),imagesy($im_toloadfrom));
ImageJPEG($im_thumb);
ImageDestroy($im_thumb);
?>
|
If I call it in my HTML document with
Code: |
<img src="thumb.inc.php?sourceimage=file.jpg&size_x=100&size_y=200" alt="" border="0" width="100" height="200">
|
I get no image, if I refer to the URL directly with my browser, I get an Error 200 page. Who can help ?
Last edited by Delphino on Mon Oct 06, 2003 8:21 pm; edited 1 time in total |
|
Back to top |
|
 |
mcwilliams132 -
Joined: 27 Jul 2003 Posts: 167 Location: Oshkosh, WI
|
Posted: Mon Oct 06, 2003 6:29 pm Post subject: |
|
|
I'm no PHP expert, but I know HTML markup...
If you misstyped in your post...my appologies...
But, your IMG tag is not complete.
should be writted as:
<img src="...whatever here..." >
or the XHTML way:
<img src="...whatever here..." />
It looks as if you need to close the quotes and then the IMG tag _________________ ::::::::::::::::::::::::::::::::::::::::::::::::::
:: Jon-Paul LeClair
:: http://mcwilliamsworld.com
:: "Lobster sticks to magnet!" |
|
Back to top |
|
 |
Delphino -
Joined: 06 Oct 2003 Posts: 2
|
Posted: Mon Oct 06, 2003 8:19 pm Post subject: |
|
|
Sorry, I've fogot that. Of course the image tag is closed in my document. This was only an example :) |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Oct 07, 2003 12:36 am Post subject: |
|
|
Delphino,
Can you please send the script and the HTML file to support@aprelium.com? Please don't forget also to attach your php.ini to the mail. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
|