Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help! Frustrated!

Status
Not open for further replies.

Rougy

Programmer
Oct 15, 2001
249
US
I'm just learning PHP.

Got an Apache server running on my Win98se laptop.

Some PHP programs won't run on it, some will.

An example of the problem is here:


Whenever it calls the display_results.php file on my Apache server, nothing works.

But it is working on my host's website.

I'm REALLY frustrated and I hope somebody out there can help.

Thanks,

Rougy
 
FOUND IT:

I went to the php.ini file and set the globals option to something like "globals=On"
 
Yep, the newest version of PHP doesn't get the values from URL as we were used to. The standard $url_variable should be now retrieved by $_GLOBALS('$url') or something like that.
 
Actually, this is very well said on PHP.NET manual:

Warning
In PHP 4.2.0 and later, the default value for the PHP directive register_globals is off. This is a major change in PHP. Having register_globals off affects the set of predefined variables available in the global scope. For example, to get DOCUMENT_ROOT you'll use $_SERVER['DOCUMENT_ROOT'] instead of $DOCUMENT_ROOT, or $_GET['id'] from the URL instead of $id, or $_ENV['HOME'] instead of $HOME.

For related information on this change, read the configuration entry for register_globals, the security chapter on Using Register Globals , as well as the PHP 4.1.0 and 4.2.0 Release Announcements.

Using the available PHP Reserved Predefined Variables, like the superglobal arrays, is preferred.


------

Hope this helps anyone.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top