GIDForums  

Go Back   GIDForums > Web Hosting Forums > Apache Web Server Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 20-Nov-2003, 03:30
Jos Elkink Jos Elkink is offline
New Member
 
Join Date: Nov 2003
Location: Dublin, Ireland
Posts: 3
Jos Elkink is an unknown quantity at this point

Apache on Windows XP and passing variables


I just installed on my Windows XP an Apache 1.3.29 server (I tried 2.0.48 first and had the same problem) and I installed PHP 4.3.4 and mySQL. When I now try to open a local site on my harddisk, it clearly gives the proper PHP output, and it makes use of the SQL database - so everything seems fine there - but it ignores all variables passed using the URL.

E.g. http://localhost/cantr/index.php gives exactly the same result as http://localhost/cantr/index.php?page=adduser or whatever ...

I would like to set up a local testsite for my website, so this is really a bit problematic ... any clues what might be wrong?

Secondly, but completely unrelated, is the fact that my browser wants to connect to the internet with every single page I open locally - is there something that can be done to avoid this?
  #2  
Old 20-Nov-2003, 09:48
Allowee's Avatar
Allowee Allowee is offline
Regular Member
 
Join Date: May 2003
Location: The Netherlands
Posts: 339
Allowee has a spectacular aura about
for the first question you will need to post (a part) of your script.
it will most likely be a script prolbem.

maybe this is something for the PHP/MySQL forum

the second question..
There are a few things you might want to try
http://desilva.biz/forum/showthread.php?threadid=1215
__________________
Pastebin
PHP Documentation Site
Allowee's Blog http://allowee.net
  #3  
Old 20-Nov-2003, 09:58
Jos Elkink Jos Elkink is offline
New Member
 
Join Date: Nov 2003
Location: Dublin, Ireland
Posts: 3
Jos Elkink is an unknown quantity at this point
I agree that what I write sounds like a script problem, but I can guarantee you that it isn't ... That is, this source code has been used rather successfully on a site for a couple of years now. It is only when I move the source from the webserver to my local computer, that it doesn't work.

I'll check out the other thread - thanks!
  #4  
Old 20-Nov-2003, 16:38
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough

Re: Apache on Windows XP and passing variables


Quote:
Originally posted by Jos Elkink
E.g. http://localhost/cantr/index.php gives exactly the same result as http://localhost/cantr/index.php?page=adduser or whatever ...

I would like to set up a local testsite for my website, so this is really a bit problematic ... any clues what might be wrong?
It has been a while so I am unsure that you don't already know about this; but latest PHP versions are set up to turn REGISTER GLOBALS off by default. That simply means that the above example will work if your PHP script retrieves the variable like this:
PHP Code:

<?php
// this will work...
$page = $_GET['page'];

// this WON'T
$page = $page;
?>

You can change this setting either in PHP.INI file, in a .htaccess file (example: [gid=http://www.desilva.biz/apache/regblsoff.html]Working with Register_Globals OFF[/gid]) or just use the extract() function right at the top of your older scripts if you don't want to change anything else inside the script.
Quote:

Secondly, but completely unrelated, is the fact that my browser wants to connect to the internet with every single page I open locally - is there something that can be done to avoid this?

Which version of Windows?
  #5  
Old 21-Nov-2003, 02:21
Jos Elkink Jos Elkink is offline
New Member
 
Join Date: Nov 2003
Location: Dublin, Ireland
Posts: 3
Jos Elkink is an unknown quantity at this point
Aah, that indeed explains it. So I can simply change the setting and have it solved. (I am definitely not going to change all scripts for this ...)

My windows version is XP, but I assume you mean to ask more detail and for that I will have to look at home first. I'll check it out. But the thread the previous poster referred to also says the same thing, and there the solution was to switch to another browser ...
 
 

Recent GIDBlogPython ebook by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SE Friendly URLs Apache Bug? JamesRxx555 Web Hosting Forum 18 18-May-2004 04:50

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 20:25.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.