new installation help!

Forum for you who has PHP installation issues

Moderators: egami, macek, gesf

Post Reply
almightymike
New php-forum User
New php-forum User
Posts: 9
Joined: Mon Mar 10, 2003 7:42 pm

Tue May 20, 2003 2:49 am

here is what we're using

APACHE version 1.3.27
MySQL version 4.0.12
PHP version 4.3.1

all TAR.GZ files.

We can't seem to make PHP work right. I can see PHP info and the other simple PHP stuff.

some functionalities I noticed tht doesn't work was my sessions don't work
GetHostByName($REMOTE_ADDR) returns no value

what could we have done wrong? any ideas? by the way, were using Red Hat 8.

User avatar
Redcircle
Moderator
Moderator
Posts: 826
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Tue May 20, 2003 8:35 pm

try

GetHostByName($_SYSTEM['REMOTE_ADDR'])

User avatar
mike
New php-forum User
New php-forum User
Posts: 73
Joined: Sun May 04, 2003 4:26 am
Location: Athens
Contact:

Fri May 23, 2003 6:04 pm

Set register_globals=On
11:16am up 404 days, 2 users, load average: 148.68, 143.45, 132.6


Mike Vassileiou
[Systems Administrator / PHP Developer]


PHP/MySQL Manual:
http://www.phpmysql-manual.com

almightymike
New php-forum User
New php-forum User
Posts: 9
Joined: Mon Mar 10, 2003 7:42 pm

Sun May 25, 2003 9:17 pm

YOU GOT IT MIKE! everythings seems to be working properly now!
Thanks!!

User avatar
Redcircle
Moderator
Moderator
Posts: 826
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Sun May 25, 2003 9:53 pm

using register globals on is a security risk and SHOULD NOT be used. Yes it is a quick workaround but a dangerous one.

php.net doc wrote:By turning off the ability for any user-submitted variable to be injected into PHP code, you can reduce the amount of variable poisoning a potential attacker may inflict. They will have to take the additional time to forge submissions, and your internal variables are effectively isolated from user submitted data.


see http://www.php.net/register_globals for more information

almightymike
New php-forum User
New php-forum User
Posts: 9
Joined: Mon Mar 10, 2003 7:42 pm

Mon May 26, 2003 2:01 am

PHP should have set it to default a long time ago. before I developed my scripts. :x

now, how do I change it my variables so that it will work with register globals turned off :lol:

User avatar
bezmond
Moderator
Moderator
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK
Contact:

Mon May 26, 2003 2:40 am

make your form submit as EITHER POST or GET, I recommend POST... to retrieve a variable, you then use:

Code: Select all

$variable = $_POST["variable"];


Andrew

User avatar
WiZARD
Moderator
Moderator
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Mon May 26, 2003 2:52 am

bezmond wrote:make your form submit as EITHER POST or GET, I recommend POST... to retrieve a variable, you then use:

Code: Select all

$variable = $_POST["variable"];


Andrew

as i know POST and GET it's two different way...
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";
Image

User avatar
bezmond
Moderator
Moderator
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK
Contact:

Mon May 26, 2003 3:14 am

yeah sorry, meant to add...

if you use GET, you should do:
$variable = $_GET["variable"];

as I said, I suggest using POST, as GET sends variables in the URL, e.g. http://www.nowhere.com/file.php?x=1&y=2
etc etc

Andrew

User avatar
WiZARD
Moderator
Moderator
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Mon May 26, 2003 3:25 am

bezmond wrote:yeah sorry, meant to add...

if you use GET, you should do:
$variable = $_GET["variable"];

as I said, I suggest using POST, as GET sends variables in the URL, e.g. http://www.nowhere.com/file.php?x=1&y=2
etc etc

Andrew

not only....
if you use GET, than line string in youre browser shortest only 255 signs, and ones more GET work faster!
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";
Image

User avatar
bezmond
Moderator
Moderator
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK
Contact:

Mon May 26, 2003 3:42 am

ok ok, personally, I prefer POST... the majority of forms I've used on my website send information that I need to keep secured, e.g. a username, password etc... so I use POST to help me that little bit more...

the other way, would be to encrypt it... e.g. submit everything with md5($variable) I suppose, but that's long-winded...

Andrew

User avatar
WiZARD
Moderator
Moderator
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Mon May 26, 2003 4:26 am

bezmond wrote:ok ok, personally, I prefer POST... the majority of forms I've used on my website send information that I need to keep secured, e.g. a username, password etc... so I use POST to help me that little bit more...

the other way, would be to encrypt it... e.g. submit everything with md5($variable) I suppose, but that's long-winded...

Andrew

I'm just give info about GET and POST :wink:
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";
Image

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest