473,782 Members | 2,479 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 = imagecreatefrom jpeg($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($ne wwidth, $newheight);
ImageCopyResize d($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\wwwr oot\ 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?f ile=pic.jpg>
(where pic.jpg was a valid .jpg file inside the C:\inetpub\wwwr oot\
directory)
I opened this file in internet explorer by going to
C:\inetpub\wwwr oot\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\wwwr oot\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 2112
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******** *************@n ews.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 = imagecreatefrom jpeg($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($ne wwidth, $newheight);
ImageCopyResize d($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\wwwr oot\ 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?f ile=pic.jpg>
(where pic.jpg was a valid .jpg file inside the C:\inetpub\wwwr oot\
directory)
I opened this file in internet explorer by going to
C:\inetpub\wwwr oot\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\wwwr oot\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
4147
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) SomeFunction(SomeVar3)
24
1726
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: Dim xSng As Single = 6547.972 Dim yInt As Integer = 8000 Dim num As Integer = CInt(Math.Floor(xSng * yInt)) Dim numMinusOne As Integer = CInt(Math.Floor(xSng * yInt) - 1)
5
11714
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, that the "recvFrom()" call should just continue blocking. Right? What I'm seeing is that when I send a packet to a particular address that is not responding, my "recvFrom()" call throws an exception. I get "An existing connection was forcibly...
2
2200
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 fires. So if the user first types the URL of the page in the browser, the "Page_Load" event fires. Then he hits submit, and the form contents are posted back, so the "Page_Load" event fires again. The form appears again (I clear its contents),...
4
3861
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 wrongly being called twice. The weird part is that no "print" functions are being repeated, but any "lower" functions, such as fwrite or Pear::Mail::send are repeated twice. It is the strangest
3
2430
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 that I can't explain. One of the desired affects was to provide the ability to change the background color on images that were selected, as well as setting the background color back to its original color after the image had been deselected. To...
2
1112
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 data out of the database. When I run the script, the page just hangs forever when it gets to about the 40th record. The strange part is that when I echo out the query I am using to select from the database. The page loads without issue. Anyone...
3
1518
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 with no problems. We continuously add queries and reports. We're up to about 700 queries (no, not all are used and most are parameter queries - the business asks a LOT of questions!), and under 250 reports and fewer than 15 forms. Data is...
5
2433
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 and its clones I encounter a strange problem where I can hear clicking sound non-stop (like the page is being reloaded non- stop), whereas the page is not reloading.
0
9641
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10146
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10080
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9944
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6735
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.