Server Administration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesServer Administration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old October 28th, 2002, 05:06 PM
bob0099 bob0099 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: manchester,n.h.,usa
Posts: 172 bob0099 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Upgrade to apache 2.0 and php 4.2

Just upgraded to apache 2.0 and php 4.2.2 with red hat 8.0/i migrated my web site from my other linux box(red hat 7.3/apache 1.3.23/php 4.1.2) and the only thing that doesnt work is my ip lookup script that uses getenv().is this an apache config problem or a php.ini problem?

Reply With Quote
  #2  
Old October 28th, 2002, 11:02 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Upgrade to apache 2.0 and php 4.2

Are you just doing:

$ip = getenv ("REMOTE_ADDR");

??

What kind of error do you get? If any?

Reply With Quote
  #3  
Old October 29th, 2002, 02:15 AM
bob0099 bob0099 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: manchester,n.h.,usa
Posts: 172 bob0099 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Upgrade to apache 2.0 and php 4.2

Function from my user authorization class


function upd_conn_log()

{
// check if the user is behind an http proxy


if(getenv('HTTP_X_FORWARDED_FOR'))
{
$this->IP_ADDR = getenv('HTTP_X_FORWARDED_FOR');
}
else if( getenv('HTTP_CLIENT_IP'))
{
$this->IP_ADDR = getenv('HTTP_CLIENT_IP');
}
else
{
$this->IP_ADDR = getenv( 'REMOTE_ADDR' );
}

//store info in database


if(!$this->usr_name || !$this->IP_ADDR)
{
echo "missing info for login_track";
return;
}

$this->login_date=date("Y-m-d H:i:s");

echo "<BR>";
echo "$this->usr_name<br>";
echo "$this->IP_ADDR<BR>";

Here is the actual code I am using/I am not getting a value for
"$this->IP_ADDR" and was getting it on my other Apache server with php 4.1.2. Just wondering what config setting needs to be altered for
the genenv() variables to be enabled/documentation kind of murky or I am
not looking in the right places. Thanks

Reply With Quote
  #4  
Old October 29th, 2002, 11:33 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 23 sec
Reputation Power: 6
RE: Upgrade to apache 2.0 and php 4.2

Looks like this was a known bug and was fixed in a CVS version of PHP:

http://bugs.php.net/bug.php?id=17662

You might want to tryout the latest release of 4.3.0...

Reply With Quote
  #5  
Old October 29th, 2002, 02:21 PM
bob0099 bob0099 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: manchester,n.h.,usa
Posts: 172 bob0099 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Upgrade to apache 2.0 and php 4.2

For a quick fix could I replace these variables with $_SERVER[] variables?
EX:
replace $this->IP_ADDR = getenv( 'REMOTE_ADDR' );

with $this->IP_ADDR = $_SERVER['REMOTE_ADDR'];
Any help would be appreciated.

Reply With Quote
  #6  
Old October 29th, 2002, 02:53 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 23 sec
Reputation Power: 6
RE: Upgrade to apache 2.0 and php 4.2

Yep, you should be able to...

Reply With Quote
  #7  
Old October 29th, 2002, 08:56 PM
postalcow postalcow is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Ford CIty, PA USA
Posts: 1,267 postalcow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to postalcow
RE: Upgrade to apache 2.0 and php 4.2

Did you run up2date yet also?

Reply With Quote
  #8  
Old October 29th, 2002, 10:03 PM
bob0099 bob0099 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: manchester,n.h.,usa
Posts: 172 bob0099 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Upgrade to apache 2.0 and php 4.2

up2date says i have all updates installed.
I changed the code to use $_SERVER variables and the ip logging is working again. I will pursue the upgrade end also. If you guys think of anything else to try let me know. I really appreciate all the help.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesServer Administration > Upgrade to apache 2.0 and php 4.2


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway