php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29009 Variable URL problem
Submitted: 2004-07-04 17:42 UTC Modified: 2004-07-04 18:12 UTC
From: zidokid at hotmail dot com Assigned:
Status: Not a bug Package: URL related
PHP Version: 4.3.7 OS: Windows XP Professional
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 + 40 = ?
Subscribe to this entry?

 
 [2004-07-04 17:42 UTC] zidokid at hotmail dot com
Description:
------------
I am using an Apache 2 Server, in the http.conf file, i installed php using this method: 

LoadModule php4_module c:/php/sapi/php4apache2.dll
AddType application/x-httpd-php .php

Whenever I try to define a variable at the URL such as http://www.website.com/main.php?txt=something
then it DOESNT show the variable on the screen, however, when i define a variable from inside the source code, such as <?php $txt = something; ?> then the variable DOES show on the page. Please tell me how to get rid of this bug.

Reproduce code:
---------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>
<?php
echo $txt;
?>
</body>
</html>


Expected result:
----------------
When i type http://zidokid.kicks-ass.net/t.php?txt=something

I expected that i would get a page that says "something".

Actual result:
--------------
Nothing appeared on the page.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-04 18:12 UTC] magnus@php.net
In PHP 4.2.0, the 'register_globals' setting default changed to
'off'. See http://www.php.net/release_4_2_0.php for more info.
We are sorry about the inconvenience, but this change was a necessary
part of our efforts to make PHP scripting more secure and portable.


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Oct 17 12:03:34 2021 UTC