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:
  #1  
Old October 28th, 2002, 06: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: 3
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 29th, 2002, 12:02 AM
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: 25
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, 03: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: 3
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, 12:33 PM
Matt Matt is offline
Contributing User
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 12 m 16 sec
Reputation Power: 7
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, 03: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: 3
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, 03:53 PM
Matt Matt is offline
Contributing User
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 12 m 16 sec
Reputation Power: 7
RE: Upgrade to apache 2.0 and php 4.2

Yep, you should be able to...

Reply With Quote
  #7  
Old October 29th, 2002, 09: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: 4
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, 11: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: 3
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!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek