I want to test that my client times out when a web server does not respond in time. I thought I could do this by making a PHP page that never completes the response, yet I don't want it to hog all the server's resources. I.e. this is not an option:
<?php while (true);?>
Suggestions?
You could try:
<?php
set_time_limit(0); /* No time limit */
sleep (1000);
?>
<?php while (true) sleep (10); ?>
This will work as long as the server has a timeout set.
try this
<?php
while (true){
sleep (10000);
}
?>