Apache and PHP

Jack L. Stone jackstone at sage-one.net
Tue Apr 15 11:48:25 PDT 2003


At 10:37 AM 4.15.2003 -0700, Jeff Jirsa wrote:
>On Tue, 15 Apr 2003, Jack L. Stone wrote:
>
>> At 02:50 PM 4.15.2003 +0100, Wayne Pascoe wrote:
>> >On Tue, Apr 15, 2003 at 09:57:00AM -0300, Konrad Scorciapino wrote:
>> >> Hello,
>> >>
>> >> I am running Apache with mod_php and when I try something like `echo $a`
>> in a
>> >> webpage like `/foo.php?a=bar`, I get no results.
>> >>
>> >> Could this be a problem with apache? What could be wrong?
>> >
>> >As far as I know, the default for php is now to set register_globals to
>> >off. You need to edit your php file and turn this on, or you need to
>> >access the variable in a safe manner.
>> >
>> >It's unlikely that this is a problem with Apache from this evidence..
>
>I agree.
>
>>
>> I'm having a similar problem myself ever since installing php-4.3. My web
>> pages will no longer set the variable input for the php scripts to run. The
>> "register_globals" was off on previous version php-4.2. Have tried
>> everything I can think off, but web to php interfaces no longer work. Don't
>> know if it is an Apache or PHP problem, but tests show the web page input
>> is not setting, but PHP update was only change of system.
>>
>
>
>Have you tried using $_GET['a'] instead of $a; it's the preferred, safer
>way. Another possible thing to check is the phpinfo(); output, and make
>sure 'register_globals' is really on.
>
>- Jeff
>

Sure enough, the 'register_globals' set to "On" solved my nagging problem
and php scripts all work again.

Much obliged to the list for that valuable lead to the right answer!

Best regards,
Jack L. Stone,
Administrator

SageOne Net
http://www.sage-one.net
jackstone at sage-one.net


More information about the freebsd-questions mailing list