ID: 13710
Updated by: sander
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: PHP options/info functions
Operating System: 2.2.16C28_III #1 Mon Jul 30 22:0
PHP Version: 4.0.6
New Comment:

I think you're doing something wrong. Ask support questions on the
appropriate mailinglist.

Previous Comments:
------------------------------------------------------------------------

[2001-10-17 05:53:31] [EMAIL PROTECTED]

I have used the following little code in many php pages on:

Linux 2.2.13 #1 SMP Thu Nov 9 10:30:50 EST 2000 i686 unknown
with php 3.x as you can see at
http://www.consumersadvantage.com/phpinfo.php

<?
  if (strcasecmp($REMOTE_ADDR,"65.34.212.5") != 0)
  {
    header("Location: http://www.ratio.net/";);
    exit;
  }
?>

So we are migrating to a new platform:

Linux 2.2.16C28_III #1 Mon Jul 30 22:07:58 PDT 2001 i586 unknown
as you can see at http://annapolis.hostastic.com/phpinfo.php

and that code snippet no longer works on the new platform.  So,
referring to the manual at:

http://www.php.net/manual/en/function.getenv.php

indicates that I should do the following:

<?
  unset($ipaddress);
  $ipaddress = getenv("REMOTE_ADDR");
  if (strcasecmp($ipaddress,"65.34.212.5") != 0)
  {
    header("Location: http://www.ratio.net/";);
    exit;
  }
?>

but that doesn't work either, but this does work:

<?
  unset($ipaddress);
  $ipaddress = getenv($REMOTE_ADDR);
  if (strcasecmp($ipaddress,"65.34.212.5") != 0)
  {
    header("Location: http://www.ratio.net/";);
    exit;
  }
?>

So, either the manual is wrong or something else is wrong.  Please let
me know if I can provide any further information.

Best Regards,
Ratio Corp.,
Daniel F. Reimann
[EMAIL PROTECTED]
954-783-7123 (voice)
954-252-3811 (fax)


------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=13710&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to