Page 1 of 1

"Multithreaded" / "multitasking" environment - how?

PostPosted: 12. May 2011 23:55
by rymasz
Hi, I got some weird problem and can't find solution. To make it simple:

- default XAMPP for Linux configuration
- got file index.php which contains only below code:

Code: Select all
<iframe width="400" height="100" src="iframe.php?v=1" id="1" style="clear: both;" ></iframe>
<iframe width="400" height="100" src="iframe.php?v=2" id="2" style="clear: both;" ></iframe>
<iframe width="400" height="100" src="iframe.php?v=3" id="3" style="clear: both;" ></iframe>
<iframe width="400" height="100" src="iframe.php?v=4" id="4" style="clear: both;" ></iframe>
<iframe width="400" height="100" src="iframe.php?v=5" id="5" style="clear: both;" ></iframe>
<iframe width="400" height="100" src="iframe.php?v=6" id="6" style="clear: both;" ></iframe>
<iframe width="400" height="100" src="iframe.php?v=7" id="7" style="clear: both;" ></iframe>
<iframe width="400" height="100" src="iframe.php?v=8" id="8" style="clear: both;" ></iframe>
<iframe width="400" height="100" src="iframe.php?v=9" id="9" style="clear: both;" ></iframe>


and file iframe.php which does nothing else than outputs random number and reloads itself.

When in browser I load index.php, I see weird behaviour - iframes don't load simultaneously, but in order. Also refreshes one by one.

Is it XAMPP's configuration which prevents multiple requests from one host? How can I fix this?

Re: "Multithreaded" / "multitasking" environment - how?

PostPosted: 08. June 2011 17:50
by benjaminhill
"Me too" - I'm using XAMPP 1.7.3 on Mac OS 10.6.7, and if I do something long-running in one browser like phpmyadmin's "propose table structure" I can't load phpmyadmin in another browser until it completes.

Seems like it is single threaded or blocked or waiting on mysql or... ?

Re: "Multithreaded" / "multitasking" environment - how?

PostPosted: 10. June 2011 01:16
by JonB
as for post #1 -

I believe the problem is not LAMPP or Apache - but your understanding of of what your code is actaully asking the server to do. I suggest you just read it again, recalling how a page is parsed and what is actually happening in each iframe instance.

as for post #2 -

its probably a table locking issue. the right place to ask that is on the phpmyadmin support forum
http://www.phpmyadmin.net/home_page/support.php

All the above are my speculations
:shock:

Re: "Multithreaded" / "multitasking" environment - how?

PostPosted: 02. October 2014 08:51
by andyg2
I know this is an old thread but I've just found the solution myself and I'm sharing for others.
You can get around this issue by making multiple files in the following format

iframe-1.php
Code: Select all
<?php
include('iframe.php');
?>


iframe-2.php
Code: Select all
<?php
include('iframe.php');
?>

Etc etc.
Then call the files as you would normally.

Code: Select all
<iframe width="400" height="100" src="iframe-1.php?v=1" id="1" style="clear: both;" ></iframe>
<iframe width="400" height="100" src="iframe-2.php?v=2" id="2" style="clear: both;" ></iframe>