473,396 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Simple PHP question.

Hi,

Just set up PHP (PHP Version 4.3.3) as a CGI on a WIN2k server and tried
this:
<?php

echo $REMOTE_ADDR;

print "This is PHP...";

?>

And I get this error:
Notice: Undefined variable: REMOTE_ADDR ...

Is there some module I may be missing?

Thanks,

S
Jul 17 '05 #1
2 5151
Nope, it's register_globals.. Read manual... It's in PHP.ini..

--
// DvDmanDT
MSN: dv******@hotmail.com
Mail: dv******@telia.com
"Stefan" <ni***@studioweb.com> skrev i meddelandet
news:1a*********************@news20.bellglobal.com ...
Hi,

Just set up PHP (PHP Version 4.3.3) as a CGI on a WIN2k server and tried
this:
<?php

echo $REMOTE_ADDR;

print "This is PHP...";

?>

And I get this error:
Notice: Undefined variable: REMOTE_ADDR ...

Is there some module I may be missing?

Thanks,

S

Jul 17 '05 #2
"Stefan" <ni***@studioweb.com> wrote in message
news:1a*********************@news20.bellglobal.com ...
Is there some module I may be missing?


Nope, you are running code in style that is about to becomme obsolete.

Try:

echo $_SERVER['REMOTE_ADDR'];

The change is that now register_globals option is by default turned off
which means you can no longer access REMOTE_ADDR as global, but instead you
have to look into the $_SERVER super global.

The change is for the better since register_global turned to on had some
grim security implications.

rush
--
http://www.templatetamer.com/

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: gene.ellis | last post by:
Good morning. I am racking my brains over what seems like should be a simple question. I have a string that contains text and html. Basically, I would like to grab the HTML tags from the string and...
2
by: Kirk | last post by:
A very simple question for anyone who knows their HTML tags and attributes. Is there an atribute that I can use to hide the white space around a table which I have used to fill an entire page? ...
2
by: Anurag | last post by:
This simple one beats me all ends up(sincerely). I have been doing DB2 UDB for some time now, reading a lot of good discussions in this forum, writing some answers, asking a lot more but this...
3
by: Peter | last post by:
Hello Thanks for reviewing my question. I would like to know how can I programmatically select a node Thanks in Advanc Peter
1
by: Chris | last post by:
Sorry to ask such a simple question but here it is, and I'm am new to ASP/WEB I am designing a site and I want to make it general so I can easily change the font/color/sizes of the...
3
by: Brad | last post by:
I have another hopefully simple question. I am so used to writing VB .Net windows apps that there are some things in ASP .Net that just does not easily cross over. I know how to pass variables to...
7
by: abcd | last post by:
I am trying to set up client machine and investigatging which .net components are missing to run aspx page. I have a simple aspx page which just has "hello world" printed.... When I request...
2
by: Allain Bøge | last post by:
It is really a simple question. Visual Basic .NET (2003) I create 2 forms (Form1 and Form2) I create a checkbox in Form1 (checkbox1) I create a checkbox in Form2 (checkbox1) I go to Form1...
13
by: Saber | last post by:
I did a lot of searches and read something about datagrids. But I couldn't find the answer of my simple question, how can I show only my desired columns of a table? for example I wrote this sql...
17
by: AlBen | last post by:
Hello sorry I don't know about javascript but I have to finish my work and there I have some scripts on my page I have a textarea form and a select form when a user click in the select form...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.