473,799 Members | 3,866 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

variables not recognised

Hi Folk

I loaded a website onto a new webserver (from some ISP that I know little
about and I noticed that even though everything seemed to be working fine,
it does not actually recognise variables.

usually, if I have http://www.myurl.com/index.php?x=1 then $x == 1 in my
php file. However, on this ISP it sure did not do this.

Is this
a. an old version of PHP
b. a security feature
c. something else or had to know

TIA

- Nicolaas
Aug 28 '05 #1
3 1099
windandwaves wrote:
usually, if I have http://www.myurl.com/index.php?x=1 then $x == 1
in my php file. However, on this ISP it sure did not do this.

Is this
a. an old version of PHP
b. a security feature
c. something else or had to know


My guess is that your code relies on register globals being enabled. Since
PHP 4.2 this directive is disabled by default, so $x should be referenced as
$_GET['x'].

See: http://www.php.net/register_globals
JW

Aug 28 '05 #2
Janwillem Borleffs wrote:
windandwaves wrote:
usually, if I have http://www.myurl.com/index.php?x=1 then $x == 1
in my php file. However, on this ISP it sure did not do this.

Is this
a. an old version of PHP
b. a security feature
c. something else or had to know


My guess is that your code relies on register globals being enabled.
Since PHP 4.2 this directive is disabled by default, so $x should be
referenced as $_GET['x'].

See: http://www.php.net/register_globals

Thank you, right on the ball! I have asked them if I can change the php.ini
file and I am using $_GET for now.

Thank you .

- Nicolaas
Aug 28 '05 #3
If I were you I'd try to rewrite things without using register globals
(i.e. using $_GET and $_POST). While it isn't a security risk in and
of itself, register globals does make it easier to write vulnerable
code.

Besides, if you write your site without relying on register globals, it
will run on a host with or without it. On the other hand, if you write
it using register globals, the site won't work without it.

Aug 28 '05 #4

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

Similar topics

7
2234
by: PhilM | last post by:
perhaps I am just a little tired, but I am having trouble with my form buttons. Firstly I name them like this name=\"round".$counter."heats\" which results in variables $round1heats $round2heats $round3heats etc...
8
2391
by: Dave Thomas | last post by:
I have developed a web site using asp pages that use both vbscript and javascript. Run the site on my PC and everything is fine. Ftp to my web hosting provider which hosts asp pages and look on my site only to find my vbscript is not recognised. It is treated as pure text so you see <% =Request.Form("LoginId") %>. Also see all the vbscript when you "View Source". I have e-mailed my host provider but thought this may be quicker! Any ideas...
22
3156
by: Tom Moroow | last post by:
Hi, I'm pretty new to javascript and was wondering how you would piece together a variable name and then assign it a value. I want to create a hidden field and assign it a value based on the value of another variable Right now it looks like: ("document.all.SM_MARK_10" + dateNumber + ".value") where dateNumber is an already defined integer. What I want is to say
3
1161
by: Sugapablo | last post by:
Ok, here's my dumbdumb question of the day: I have this loop that's supposed to loop through the 11 XML elements named "title" in the object. When I put a number in the array brackets like this: tables = response.getElementsByTagName("title"); for(var i = 0;i <= tables.length;i++) {
8
393
by: Ess355 | last post by:
Hi, In the debugger at run time, characters like é are not recognised by their normal ASCII number, but something like -8615722... . I've seen this number before, it means "rubbish" right? So how can I possible modify my program so that french characters get recognised? Thanks in advance,
15
1630
by: Casanova | last post by:
Hello!! how can i get all the details of the environmental variables. If i use getenv, i will have to specify the name of the variable. for intsance i will have to give getenv("PATH") How can i get the information of all the variables, with the variable names and its values Pls Help
44
3649
by: fabio | last post by:
Why? i' ve heard about this, the usage of global vars instead of locals is discouraged, but why? thx :)
18
1871
by: RB | last post by:
Hi guys (and gals!), I've got 2 classes, "TypesafeConstant" and "Color". "Color" inherits from "TypesafeConstant", and adds no new functionality. All "Color" does is to instantiate some class variables which are public instances of "Color". What "TypesafeConstant" does is to create a shared list, and add every declaration of itself to that list. I can then query that list with a string (e.g. "Red") to return Color.Red.
11
10546
by: sinbad | last post by:
hi, I've a very large C program consisting of hundred of files; I want to know what are all the global variables defined in the program. how do i do this. thanks
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10237
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10029
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7567
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6808
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4144
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.