Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-05-2009, 04:21 AM
|
#1
|
|
Member
Registered: Feb 2009
Location: on the InterNET most hours of my life
Distribution: Ubuntu Server v8.04 / v11.10 & Mac OsX (mainly for FCP & video/audio)
Posts: 35
Rep:
|
PhP QUERY_STRING not being carried over ??
Hi Scripters,
I just installed a newer Ubuntu Distro and my dataBase readouts stopped working.
I tried a simple test URL/TestForDb.php?dBase=RENJ&Name=Test without success
and also tried the same as a FORM with both GET and POST
Any ideas why php would stop accepting data sent to it ?
Code:
<HTML><head><TITLE>Test Access</TITLE></head>
<Body>
<h1>Testing</h1>
<?php
print "dBase=[$dBase] Name=[$Name]\n";
?>
</Body></html>
All I get is:
Testing
dBase=[] Name=[]
Thanks,
Nickalf. . .
|
|
|
|
06-05-2009, 07:59 AM
|
#2
|
|
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,014
Rep: 
|
Hi
They changed the default settings of "register_globals" in newer versions of PHP. It's usually safer to have it off, but lots of old scripts stop working.
Edit the file: /etc/php5/apache2/php.ini
Change
register_globals = Off
to
register_globals = On
Then restart Apache. When register_globals is off, you find the posted values in _GET or _POST, or you can use _REQUEST which is a merge of the two.
|
|
|
|
06-08-2009, 04:48 PM
|
#3
|
|
Member
Registered: Feb 2009
Location: on the InterNET most hours of my life
Distribution: Ubuntu Server v8.04 / v11.10 & Mac OsX (mainly for FCP & video/audio)
Posts: 35
Original Poster
Rep:
|
That was it - thanks much. . .

Nick. . .
|
|
|
|
06-09-2009, 04:15 AM
|
#4
|
|
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,780
|
If you don't have to update a few thousand source files, consider using e.g. $_GET['dBase']
|
|
|
|
06-09-2009, 06:05 AM
|
#5
|
|
Member
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 509
Rep:
|
Wasn't register_globals one of the security issues and wouldn't it be much more useful NOT to set them on?
With a short script, it really doesn't matter wether or not you've got a few thousand files. (And usally just a handful handles requests directly anyway depending on your architecture...)
|
|
|
|
| Thread Tools |
Search 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
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:58 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|