register globals with a php.ini file in folder

Hello,

I realize that it is a stupid thing to do but I have to enable register globals in a directory and ALL sub-directories.

I know this can be done with .htaccess but I also heard that I could put a file called "php.ini" in the folder.

How can I do this?  What should I place in the php.ini file of the directory?
LVL 16
hankknightAsked:
Who is Participating?
 
milanmkCommented:
[I have to enable register globals in a directory and ALL sub-directories]

Custom php.ini affects only the current folder it is residing into and not the sub directories. You will need separate php.ini files into each sub directories.

Instead put the following line in .htaccess and it will affect all the sub directories too.

php_flag register_globals On
0
 
rschoenbachCommented:
You would probably need a full php.ini file. Depending on the webhost you are using some might not allow this functionality and some will only allow you to use .htaccess but anyways...

The command to turn this on in the php file is:

register_globals = on
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.