Click to See Complete Forum and Search --> : Global Variables, in Linux Server Help Pls


scald
11-23-2002, 08:17 PM
i have a hosting php 4.2.3 installed a linux server and probably using Apache.
How can i turn on global registers which is off default.

Thanks for any assistance

jerdo
11-25-2002, 04:29 AM
Most likely you can't turn it on yourself without hacking the box it's run on. Try contacting your host.

dalecosp
12-12-2002, 02:08 PM
Originally posted by scald
i have a hosting php 4.2.3 installed a linux server and probably using Apache.
How can i turn on global registers which is off default.

Thanks for any assistance

Do some googling---I've seen lots of hacks for this. One theory has a foreach ($key as $val) type thing that sits at the top of every script.

I control my servers; I opted for placing a directive in each <VirtualHost> container in httpd.conf:

php_value register_globals 1

I *think* I have seen information to the effect that this directive would also work in an .htaccess file --- that might be your best option.

HTH,