?
Solved

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

Posted on 2007-10-11
3
Medium Priority
?
372 Views
Last Modified: 2008-01-09
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?

0
Comment
Question by:cshilepsky
  • 2
3 Comments
 
LVL 17

Expert Comment

by:nplib
ID: 20056919
Can you post your code?
0
 

Author Comment

by:cshilepsky
ID: 20057049
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";
}
?>
0
 
LVL 17

Accepted Solution

by:
nplib earned 200 total points
ID: 20057250
first of all, I tried out your code and it worked fine,

the only thing that is wrong in the second part is it should read getenv('REMOTE_ADDR');

However, make a php page that only has
<?php
phpinfo();
?>
Then open that page from a computer that you were receiving an error.

Find what version you are running.

Scroll down and find the section that has
_SERVER["REMOTE_ADDR"]
and see if your IP exists

Also Check you php.ini and make sure that you see this line.
register_globals = on

Let me know what your findings were.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question