[SOLVED] image fns worked and now all of a sudden doesn't in
Moderator: General Moderators
image fns worked and now all of a sudden doesn't in IIS6
Hello
I was using image functions and I got it to work by setting the extension_dir = "c:\PHP\extensions\" and extension=php_gd2.dll.
Everything worked ok and then I wanted to use imagerotate() but was not rotating. So I turned display_errors = On to find out the mistake and restarted IIS6. Now no image functions are working !!! Thats impossible because all I did was change display_errors = On. The image just does not load - and theres no warning or error. How is this so complicated ?
I also turned display_startup_errors = On but I'm sure this makes no difference.
Please help.
Thanks
Anjanesh
I was using image functions and I got it to work by setting the extension_dir = "c:\PHP\extensions\" and extension=php_gd2.dll.
Everything worked ok and then I wanted to use imagerotate() but was not rotating. So I turned display_errors = On to find out the mistake and restarted IIS6. Now no image functions are working !!! Thats impossible because all I did was change display_errors = On. The image just does not load - and theres no warning or error. How is this so complicated ?
I also turned display_startup_errors = On but I'm sure this makes no difference.
Please help.
Thanks
Anjanesh
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
The great Google provided: http://www.microsoft.com/resources/docu ... sterr.mspx
I have this in test.php
<IMG SRC="images.php?text=hello" BORDER=0>
But there was no output so I ran images.php and I get these errors : This is really strange because it worked the first time I ran these scripts. All I did was change display_errors=On
These are the first 2 lines in images.php
Now I am getting this (unformatted html)
<br />
<b>Notice</b>: Use of undefined constant MAX_WIDTH - assumed 'MAX_WIDTH' in <b>D:\Anjanesh\htdocs\test\images.php</b> on line <b>2</b><br />
<br />
<b>Notice</b>: Use of undefined constant MAX_HEIGHT - assumed 'MAX_HEIGHT' in <b>D:\Anjanesh\htdocs\test\images.php</b> on line <b>3</b><br />
ÿØÿàJFIFÿþ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality with a lot of other junk (probably the image).
I checked the source (view-source) and this is exactly what came up. Now even if the image didn't show how can the html tags not ? My other non-images scripts are working fine
<IMG SRC="images.php?text=hello" BORDER=0>
But there was no output so I ran images.php and I get these errors : This is really strange because it worked the first time I ran these scripts. All I did was change display_errors=On
These are the first 2 lines in images.php
Code: Select all
define(MAX_WIDTH,100);
define(MAX_HEIGHT,100);<br />
<b>Notice</b>: Use of undefined constant MAX_WIDTH - assumed 'MAX_WIDTH' in <b>D:\Anjanesh\htdocs\test\images.php</b> on line <b>2</b><br />
<br />
<b>Notice</b>: Use of undefined constant MAX_HEIGHT - assumed 'MAX_HEIGHT' in <b>D:\Anjanesh\htdocs\test\images.php</b> on line <b>3</b><br />
ÿØÿàJFIFÿþ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality with a lot of other junk (probably the image).
I checked the source (view-source) and this is exactly what came up. Now even if the image didn't show how can the html tags not ? My other non-images scripts are working fine
Thats impoosible because after <?php I have
And the only time I have used them is
$scale = min(MAX_WIDTH/$width, MAX_HEIGHT/$height);
both $width & $height are having values.
And this EXACT script worked before without probs from definition
Code: Select all
define(MAX_WIDTH,100);
define(MAX_HEIGHT,100);$scale = min(MAX_WIDTH/$width, MAX_HEIGHT/$height);
both $width & $height are having values.
And this EXACT script worked before without probs from definition
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact: