$REQUEST_URI working online and not working on localhost

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lucadg
Forum Newbie
Posts: 7
Joined: Fri Aug 04, 2006 11:48 am

$REQUEST_URI working online and not working on localhost

Post by lucadg »

Hi all,
I am trying to make work locally a site which is online and working.
Both online and locally I use php 4.4.1 and mysql 3.23.58 (server in Linux, local WinXp).
While all seems working, I have a problem with this line not working locally in index.php:

$nowurl=rawurlencode($REQUEST_URI);

when I try locally to display it in order to check, it gives blank, while online it shows: %2Findex.php

I think it may be the php.ini but I have no idea what to touch.
Any idea would be welcomed!
Thank you!

Luca
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

run

Code: Select all

<?php echo 'register_globals: ', ini_get('register_globals') ? 'on':'off'; ?>
on both your server and your desktop pc.
Then read http://de2.php.net/security.globals
lucadg
Forum Newbie
Posts: 7
Joined: Fri Aug 04, 2006 11:48 am

Post by lucadg »

That fixed! Thank you!!!
This is a great forum, so fast!
Greetings from a nice beach in Goa, India

Luca
Post Reply