php, setting register_globals on for one virtual site only?

Support for webhosts that use CentOS
Post Reply
brianstorm
Posts: 23
Joined: 2006/01/06 14:23:30

php, setting register_globals on for one virtual site only?

Post by brianstorm » 2006/07/19 14:33:25

hi,

i have a centos4 box with php 4.3.9-3.15 installed. I have a shopping cart I'd like to transfer which requires register_globals set to on and I do not want to reinstall from scratch at this point as I have too many mods.

Is it possible to set register_globals on for one virtual site (in apache) only? How do I turn on register globals anyway? Do I have to reinstall or can I just change it in a config file and restart php?

Many thans for your time.. all help much apprecciated...

Cheers


Brian

brianstorm
Posts: 23
Joined: 2006/01/06 14:23:30

Re: php, setting register_globals on for one virtual site only?

Post by brianstorm » 2006/07/20 13:43:54

adding this between the tags in the apache virtual server seemed to solve my problem

php_flag register_globals 1

stephan
Posts: 17
Joined: 2006/09/07 01:05:48
Contact:

Re: php, setting register_globals on for one virtual site only?

Post by stephan » 2006/09/07 01:23:51

I know this is a fairly old post, but where did you put this setting? I'm not sure I follow.

Can you show me which file please, and maybe paste a little bit of what you put? It sounds interesting.

Thanks.

Salsa
Posts: 1
Joined: 2006/09/08 01:07:17

Re: php, setting register_globals on for one virtual site only?

Post by Salsa » 2006/09/08 01:18:29

I guess before I start asking questions, I'll answer one.

He's talking about in httpd.conf, between the tags for the site you want to turn register_globals on. Also, you'll have to restart Apache afterwards for the change to take effect.

stephan
Posts: 17
Joined: 2006/09/07 01:05:48
Contact:

Re: php, setting register_globals on for one virtual site only?

Post by stephan » 2006/09/09 01:38:54

Thanks. Because it said "directory", I wasn't sure if it was "virtualhost" and was too lazy to check.

I've put it in just for testing, did service httpd configtest and it worked.

That's pretty good that it can be set per domain like that. One reason not to install suphp anyway. I expect other settings could be changed too...

Post Reply

Return to “CentOS 4 - Webhosting Support”