473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Strange Problem: IE Loads forever

Ok, I have a very weird problem here. I want to use .php to create
thumbnails. For this, I use the following code:
<?
$file = isset($_GET['file']) ? $_GET['file'] : exit;

//Load the image
$src = imagecreatefromjpeg($file);
if($src)
{
$width = ImageSx($src);
$height = ImageSy($src);
$maxwidth = 140;
$maxheight = $maxwidth / 1.333333;
if($width > $height / 1.333333)
{
$newwidth = $maxwidth;
$newheight = $height / ($width / $newwidth);
} else {
$newheight = $maxheight;
$newwidth = $width / ($height / $newheight);
}

$dest = ImageCreate($newwidth, $newheight);
ImageCopyResized($dest, $src, 0, 0, 0, 0, $newwidth, $newheight, $width,
$height);

header("Content-Type: image/jpg");
Imagejpeg($dest);
exit;
}
?>

This file is called showthumb.php. Now in my C:\inetpub\wwwroot\ directory
(Yes, im doing this all under windows) I create a file called test.html
(after having some trouble, but this will explain the problem). I put the
following data in this test.html:
<img src=http://localhost/showthumb.php?file=pic.jpg>
(where pic.jpg was a valid .jpg file inside the C:\inetpub\wwwroot\
directory)
I opened this file in internet explorer by going to
C:\inetpub\wwwroot\test.html. It worked, the image got displayed (although
the colors where screwed up, but that i might be able to fix that myself). I
went to http://localhost/test.html (Thus the same .html file) and it did not
display the image! It just kept loading without actually doing anything. I
tried the same in Mozilla Firebird... Not a single problem. both
C:\inetpub\wwwroot\test.html and http://localhost/test.html showed the
picture as expected.

Now: What's wrong? How can I fix this crap?

Thanks

Jul 16 '05 #1
1 2099
amazing how some things in internet explorer work again when you close all
ineternet explorer windows!

Problem somehow fixed :S

"Spoofed Existence" <sp**************@hotmail.com> schreef in bericht
news:3f*********************@news.wanadoo.nl...
Ok, I have a very weird problem here. I want to use .php to create
thumbnails. For this, I use the following code:
<?
$file = isset($_GET['file']) ? $_GET['file'] : exit;

//Load the image
$src = imagecreatefromjpeg($file);
if($src)
{
$width = ImageSx($src);
$height = ImageSy($src);
$maxwidth = 140;
$maxheight = $maxwidth / 1.333333;
if($width > $height / 1.333333)
{
$newwidth = $maxwidth;
$newheight = $height / ($width / $newwidth);
} else {
$newheight = $maxheight;
$newwidth = $width / ($height / $newheight);
}

$dest = ImageCreate($newwidth, $newheight);
ImageCopyResized($dest, $src, 0, 0, 0, 0, $newwidth, $newheight, $width,
$height);

header("Content-Type: image/jpg");
Imagejpeg($dest);
exit;
}
?>

This file is called showthumb.php. Now in my C:\inetpub\wwwroot\ directory
(Yes, im doing this all under windows) I create a file called test.html
(after having some trouble, but this will explain the problem). I put the
following data in this test.html:
<img src=http://localhost/showthumb.php?file=pic.jpg>
(where pic.jpg was a valid .jpg file inside the C:\inetpub\wwwroot\
directory)
I opened this file in internet explorer by going to
C:\inetpub\wwwroot\test.html. It worked, the image got displayed (although
the colors where screwed up, but that i might be able to fix that myself). I went to http://localhost/test.html (Thus the same .html file) and it did not display the image! It just kept loading without actually doing anything. I
tried the same in Mozilla Firebird... Not a single problem. both
C:\inetpub\wwwroot\test.html and http://localhost/test.html showed the
picture as expected.

Now: What's wrong? How can I fix this crap?

Thanks


Jul 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Dominic Godin | last post by:
Hi, I have an asp page that does a lot of processing and reports it's finished by printing the word "Success". For example: <% SomeFunction(SomeVar) SomeFunction(SomeVar1) ...
24
by: David | last post by:
hello. when doing the simple following computation, the value put into the variable numMinusOne is NOT the same as what the computation is showed to be in the Watch window!! here is the code:...
5
by: Terry | last post by:
It's my understanding of UDP sockets that if there is a thread blocked on a "recvFrom()" call and other thread sends a UDP packet to some address, that if the machine on the other end isn't up,...
2
by: COHENMARVIN | last post by:
I have a form with a Submit button. The user fills out the form, clicks the submit button, and then the page posts back to itself. Every time the page posts back to itself, the "Page_Load" event...
4
by: Nate Murray | last post by:
Hey all, I'm having a strange PHP (4.3.10) problem that seems to have something to do with javascript. This is a bit complex, so hold on to your hats. My issue is that a single function is...
3
by: senfo | last post by:
I developed a Windows control in VS 2005 that inherits from the PictureBox Control that adds the ability to select images in a Windows application. It is, however, experiencing a strange issue...
2
by: BinaryMonk | last post by:
Ok, this makes absolutely no sense to me, so I am hoping that someone here will have run across this issue as well. I have a pretty simple PHP script. which essentially just selects and displays...
3
by: sara | last post by:
Very strange behavior, but I suspect some is A2K and some might be for me to correct. Just trying to see if anyone can help and advise. We have a database that's been running for a few years...
5
by: ioni | last post by:
Good day, fellows! I have a strange problem – at my site there is a flash strip, that loads data dynamically. It works fine (grabs data from the remote server and presents it), however in IE7...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.