Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 May 2002 22:42:27 -0700
From:      Ian Hamilton <ianh@uidaho.edu>
To:        Christopher Rued <c.rued@xsb.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: mod_php4 problem (broken?)
Message-ID:  <3CD76943.7D032358@uidaho.edu>
References:  <15575.22558.765587.494822@ool-18bacefa.dyn.optonline.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Starting with PHP 4_2_0, "External variables (from the environment, the
HTTP request, cookies or the web server) are no longer registered as
global variables" (http://www.php.net/release_4_2_0.php) to turn this
back on, visit /usr/local/etc/php.ini or /usr/local/etc/php.ini-dist and
change register_globals to On

-Ian

Christopher Rued wrote:
> 
> I recently upgraded my mod_php4 port (about a week ago), and since I
> did so, parameters do not seem to be available to my PHP files.
> 
> Ex: (index.php)
>   <html><head><title>PHP Test</title></head>
>     <body>
>       <?php echo "Hello World<p>"; ?>
>       <BR><?php echo $HTTP_USER_AGENT; ?>
>       <hr>
>       <form action="index.php" method="get">
>         Your name: <input type="text" name="name">
>         You age: <input type="text" name="age">
>         <input type="submit">
>       </form>
>       <hr>
>       Hi <?php echo $name; ?>.
>       You are <?php echo $age; ?> years old.
>       <hr>
>       <BR><?php phpinfo(); ?>
>     </body>
>   </html>
> 
> If I point my browser to http://localhost/index.php?name=chris&age=myage
> the page returned looks like this:
> 
>   Hello World
> 
>   ----------------------------------------------
> 
>   Your name: ________ You age: _______  [SUBMIT]
> 
>   ----------------------------------------------
>   Hi .  You are years old.
>   ----------------------------------------------
> 
>   <snip lots of seemingly-irrelevant config info>
> 
>                PHP Variables
>   ,-----------------------,--------------------,
>   | Variable              |  Value             |
>   |-----------------------+--------------------|
>   | _GET["name"]          | chris              |
>   | _GET["age"]           | myage              |
> 
>                ....
> 
>   <more snippage>
> 
> Since the arguments are stored in that table, it seems like I am
> almost there....just missing something.  Anyone have any ideas?
> 
> --
> Chris
> 
> (I'm not subscribed to this list anymore, so I'd appreciate it if you
>  would be sure to CC me on any replies :) ).
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3CD76943.7D032358>