hawkeye0203 Posted December 20, 2006 Share Posted December 20, 2006 Hello everyone! I'm new here so I apologize if this was posted elsewhere (I looked for it, but didn't find anything)I just installed Apache 2.2.3 on a Windows XP MCE05 PC then installed PHP 5.2.0. After a few config changes, all is running well, except one thing (so far).I try to use SERVER variables and they don't workie. $_SERVER['REQUEST_URI']That is the one I tried to use and it is not working at all.Is there something in the config file that I need to enable or add?Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/31381-solved-fresh-php-setup-on-apachewindowsxp-and-having-problems/ Share on other sites More sharing options...
wildteen88 Posted December 20, 2006 Share Posted December 20, 2006 What do you get? A blank page, an error?Your dont need to enabled anythink in the php.ini Quote Link to comment https://forums.phpfreaks.com/topic/31381-solved-fresh-php-setup-on-apachewindowsxp-and-having-problems/#findComment-145300 Share on other sites More sharing options...
hawkeye0203 Posted December 20, 2006 Author Share Posted December 20, 2006 I don't get anything.I have a small script that take the URI, explodes it twice to get the "/" and ".php" off to leave just the page name, ie "signup" (orgininally "/signup.php"). It will then assign the page name to a variable, "$page". So I do this:[color=red]echo "Page is " . $page . "!";[/color]just to see if it works on my machine at home and it displays:[color=red]Page is ![/color]But when I upload it to my webserver, it displays it correctly:[color=red]Page is signup![/color]So that leads me to believe something isn't working right on my machine at home.Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/31381-solved-fresh-php-setup-on-apachewindowsxp-and-having-problems/#findComment-145362 Share on other sites More sharing options...
wildteen88 Posted December 20, 2006 Share Posted December 20, 2006 Post the full code. Are you use short tags for the echo?short tags are (<? or <?=).What does the following return:[code]<?phpecho $_SERVER['REQUEST_URI'];?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/31381-solved-fresh-php-setup-on-apachewindowsxp-and-having-problems/#findComment-145365 Share on other sites More sharing options...
hawkeye0203 Posted December 20, 2006 Author Share Posted December 20, 2006 I don't have the code with me, I apologize. I just bought a house and I'm still trying to work out my IC so I'm at work right now.I can positively tell you I've tried:echo $_SERVER['REQUEST_URI'];and it doesn't display anything. It's almost as if it isn't even there.I have also tried all tags:<?, <?php, <?=, etc. I've tried it all.I know I'm being a pain in the rear and I apreciate the help. Quote Link to comment https://forums.phpfreaks.com/topic/31381-solved-fresh-php-setup-on-apachewindowsxp-and-having-problems/#findComment-145376 Share on other sites More sharing options...
hawkeye0203 Posted December 21, 2006 Author Share Posted December 21, 2006 I had to turn on Register_globals in the ini Quote Link to comment https://forums.phpfreaks.com/topic/31381-solved-fresh-php-setup-on-apachewindowsxp-and-having-problems/#findComment-146004 Share on other sites More sharing options...
wildteen88 Posted December 21, 2006 Share Posted December 21, 2006 That shouldn't effect it at all. register_globals allows you to use $REQUEST_URI instead of $_SERVER['REQUEST_URI']Weird. Atleast you go it working Quote Link to comment https://forums.phpfreaks.com/topic/31381-solved-fresh-php-setup-on-apachewindowsxp-and-having-problems/#findComment-146009 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.