Link to home
Start Free TrialLog in
Avatar of cshilepsky
cshilepsky

asked on

Why the PHP error: Error in my_thread_global_end(): 1 threads didn't exit

When I use $_SERVER['REMOTE_ADDR'];
I get Error in my_thread_global_end(): 1 threads didn't exit

When I use  getenv('_ADDR');
I get the error sometimes.

Why?

Avatar of nplib
nplib
Flag of Canada image

Can you post your code?
Avatar of cshilepsky
cshilepsky

ASKER

ALWAYS AN ERROR
<?php
# restrict access depending on user domain
$remoteaddr = $_SERVER['REMOTE_ADDR'];
if (ereg("10\.3", $remoteaddr)){
  header('Location: http://aurora.wells.edu/~cs330/examples/local.htm');
}
else {
  echo "Access restricted to campus", "\n\n";
}
?>

SOMETIMES AN ERROR

<?php
# restrict access depending on user domain
$remoteaddr = getenv('_ADDR');
if (ereg("10\.3", $remoteaddr)){
  header('Location: http://aurora.wells.edu/~cs330/examples/local.htm');
}
else {
  echo "Access restricted to  campus", "\n\n";
}
?>
ASKER CERTIFIED SOLUTION
Avatar of nplib
nplib
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial