473,586 Members | 2,495 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

$GLOBALS array

Hi all

I'm not quite new to PHP, but also not very proficient in its use, so
please excuse me if my question is a FAQ. Perhaps I didn't know the right
terms, but google wasn't my friend this time :-)
I had a page running on a host which worked perfectly fine. Then, one day,
it stopped working since strangly some values in the $GLOBALS array are
not set. For example things such as $GLOBALS["_GET"], $GLOBALS["_POST"],
$GLOBALS["_ENV"] and $GLOBALS["_SERVER"] are just set to NULL. It would be
fine with me, if they were just empty arrays (as they are on my
test-system on the laptop), but I would really hate to hack into vBulletin
to get it to run again.

My suspicion is that the hosting company changed their php.ini, but they
have a lousy service, haven't gotten any answer from them for months
now. So I don't expect them to help me here either.

Thanks for any help
Michael
Nov 3 '06 #1
8 1905
Do a print_r($LOBALS ), maybe you misspelled the keys.

Nov 3 '06 #2
whiskey wrote:
Do a print_r($LOBALS ), maybe you misspelled the keys.
And you mispelled GLOBALS.
;-)

But besides the typo: good advise.

Regards,
Erwin Moller

Nov 3 '06 #3
On Fri, 03 Nov 2006 15:35:33 +0100, Erwin Moller wrote:
whiskey wrote:
>Do a print_r($LOBALS ), maybe you misspelled the keys.

And you mispelled GLOBALS.
;-)

But besides the typo: good advise.

Regards,
Erwin Moller

:-)

I already did, and it looks like:

Array (<stuff left out[_GET] =[_POST] =)

On my laptop it looks like:

Array (<stuff left out[_GET] =array() [_POST] =array() )
So there definitely is a difference.
Michael
Nov 3 '06 #4
Michael Wild wrote:
On Fri, 03 Nov 2006 15:35:33 +0100, Erwin Moller wrote:
>whiskey wrote:
>>Do a print_r($LOBALS ), maybe you misspelled the keys.

And you mispelled GLOBALS.
;-)

But besides the typo: good advise.

Regards,
Erwin Moller


:-)

I already did, and it looks like:

Array (<stuff left out[_GET] =[_POST] =)

On my laptop it looks like:

Array (<stuff left out[_GET] =array() [_POST] =array() )
So there definitely is a difference.
Michael
Hi,

To make the print_r() more readable, use <pre>

<pre>
<?php print_r($GLOBAL S); ?>
</pre>

But more usefull maybe in your situation:

<pre>
<?php print_r($_POST) ; ?>
</pre>

and

<pre>
<?php print_r($_GET); ?>
</pre>

Regards,
Erwin
Nov 3 '06 #5
Erwin Moller wrote:
Michael Wild wrote:
>On Fri, 03 Nov 2006 15:35:33 +0100, Erwin Moller wrote:
>>whiskey wrote:

Do a print_r($LOBALS ), maybe you misspelled the keys.
And you mispelled GLOBALS.
;-)

But besides the typo: good advise.

Regards,
Erwin Moller

:-)

I already did, and it looks like:

Array (<stuff left out[_GET] =[_POST] =)

On my laptop it looks like:

Array (<stuff left out[_GET] =array() [_POST] =array() )
So there definitely is a difference.
Michael

Hi,

To make the print_r() more readable, use <pre>

<pre>
<?php print_r($GLOBAL S); ?>
</pre>

But more usefull maybe in your situation:

<pre>
<?php print_r($_POST) ; ?>
</pre>

and

<pre>
<?php print_r($_GET); ?>
</pre>

Regards,
Erwin

well, they are just not set... a test for $_GET==NULL or $_POST==NULL
returns true.

thanks for the formatting tip!

michael
Nov 4 '06 #6
Michael Wild wrote:
Erwin Moller wrote:
>Michael Wild wrote:
>>On Fri, 03 Nov 2006 15:35:33 +0100, Erwin Moller wrote:

whiskey wrote:

Do a print_r($LOBALS ), maybe you misspelled the keys.
And you mispelled GLOBALS.
;-)

But besides the typo: good advise.

Regards,
Erwin Moller

:-)

I already did, and it looks like:

Array (<stuff left out[_GET] =[_POST] =)

On my laptop it looks like:

Array (<stuff left out[_GET] =array() [_POST] =array() )
So there definitely is a difference.
Michael

Hi,

To make the print_r() more readable, use <pre>

<pre>
<?php print_r($GLOBAL S); ?>
</pre>

But more usefull maybe in your situation:

<pre>
<?php print_r($_POST) ; ?>
</pre>

and

<pre>
<?php print_r($_GET); ?>
</pre>

Regards,
Erwin


well, they are just not set... a test for $_GET==NULL or $_POST==NULL
returns true.

thanks for the formatting tip!

michael
Glad I could help with the formatting.
But sorry, I have no clue why $_GET and $_POST are NULL.
I never saw that before.
Contact your (lazy) ISP and kick his/her lazy ass.
If you pay for their service they should help you with such enormous
problems ($_GET and $_POST are completely accepted and used everywhere, I
couldn't make an app without them).

Good luck. :-/

Regards,
Erwin Moller
Nov 6 '06 #7
On Mon, 06 Nov 2006 10:00:08 +0100, Erwin Moller wrote:

Glad I could help with the formatting.
But sorry, I have no clue why $_GET and $_POST are NULL.
I never saw that before.
Contact your (lazy) ISP and kick his/her lazy ass.
If you pay for their service they should help you with such enormous
problems ($_GET and $_POST are completely accepted and used everywhere, I
couldn't make an app without them).

Good luck. :-/

Regards,
Erwin Moller
that's where the problems start, our club virtually pays nothing. it's
like "i know somebody who's married to someone else who does some
hosting"... not the way i would have chosen, but i'm stuck with it...

so you don't know of any directive which could cause such a thing to
happen?

thanks for the help anyways!

michael
Nov 6 '06 #8
Michael Wild wrote:
On Mon, 06 Nov 2006 10:00:08 +0100, Erwin Moller wrote:

>Glad I could help with the formatting.
But sorry, I have no clue why $_GET and $_POST are NULL.
I never saw that before.
Contact your (lazy) ISP and kick his/her lazy ass.
If you pay for their service they should help you with such enormous
problems ($_GET and $_POST are completely accepted and used everywhere, I
couldn't make an app without them).

Good luck. :-/

Regards,
Erwin Moller

that's where the problems start, our club virtually pays nothing. it's
like "i know somebody who's married to someone else who does some
hosting"... not the way i would have chosen, but i'm stuck with it...
Yes, that is the problem with free services: You cannot treaten to walk
away. :-/
so you don't know of any directive which could cause such a thing to
happen?
No sorry.
I am one of those spoiled guys with their own server, so it is my php.ini,
and I only changed stuff I understood.

Maybe you can repost your question, rephrasing your problem and what you
tried, the settings that may be of importance, maybe a dump of your php.ini
file.
That helps sometimes.
Some (many) visitors only look at recent post (last few days) and they
mayhap missed this thread.

Good luck.

Regards,
Erwin Moller
>
thanks for the help anyways!

michael
Nov 6 '06 #9

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

Similar topics

1
4572
by: Manu J | last post by:
Hi, i have a login script which makes use of sessions. Login script *********** session_start() ..... ..... ....
0
1997
by: Joshua Beall | last post by:
Hi All, I cannot turn off magic quotes, since I am just leasing space from a hosting company, and they determine the magic_quotes settings. I realize in retrospect that using a .htaccess file to turn magic quotes would probably be better, and I am going to switch to that solution, but I am still trying to figure out what is causing my...
3
1722
by: Phil Powell | last post by:
// CLIENT GLOBAL FUNCTION TO PARSE $_SESSION IF 'tempIDArray' IS SET function parseTempIDArraySession() { $tempIDArray = $_SESSION; $_GET = $_SESSION]; // RESET $_GET WITH SESSION ARRAY get_to_post(); // $_POST = $_GET foreach ($tempIDArray as $tempID) unset($_SESSION); print_r("POST: "); print_r($_POST); print_r("<P>");...
5
2827
by: Frostillicus | last post by:
I'm trying to use array_multisort to sort by one of the dimensions of an array stored in $GLOBALS like this: array_multisort($GLOBALS, SORT_STRING, SORT_DESC); Each "row" in $GLOBALS contains a value for 'href', 'desc', and 'info' but when I try to pass one of these "columns" to array_multisort() it whinges about it not being an array or...
2
1935
by: Brian Kendig | last post by:
The server I'm running my PHP on has "magic_quotes" turned on, so all the input I get (from GET, POST, and cookies) is escaped with backslashes. I don't want this (I handle my own escaping, and I need to be able to work with unescaped strings), but I'm not allowed to change the setting on the server, so I need to figure out a way to "undo"...
7
1752
by: John | last post by:
Hi, I'm looking for the best way to deal with globals in PHP. As a 'C' software developer, I would normally avoid all globals and not have any at all, but use structs and pass everything in the function parameters... However, being realistic, I can see that globals can (and do ?) have a place in PHP web scripts.
45
2650
by: It's me | last post by:
I am new to the Python language. How do I do something like this: I know that a = 3 y = "a" print eval(y)
3
1991
by: ojorus | last post by:
Hi! Just two short questions..: 1) In a function I want to get the value of a global variable declared outside the function. Should I use "global $variable" or $GLOBALS? Are there any differences in performance or other aspects which should make me choose the one thing or the other? 2) Generally, is it better to pass arguments to the...
1
1240
mikejfe
by: mikejfe | last post by:
Hi all. I have a question that is probably simple to answer, but I don't even know where to get started (i.e. for searching old posts, Google, etc.) I am writing a program that reads in a 3 dimensional array text file. Then x, y, and z coordinate values are assigned to each value of the 3d array. These four arrays (3d array, x, y, z) get...
0
7915
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...
0
8204
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
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...
0
8220
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...
0
6617
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...
1
5712
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...
0
3838
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...
1
2345
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
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.