[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

register globals with a php.ini file in folder

Posted on 2007-08-03
2
Medium Priority
?
633 Views
Last Modified: 2008-01-09
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?
0
Comment
Question by:hankknight
2 Comments
 
LVL 4

Expert Comment

by:rschoenbach
ID: 19625519
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
 
LVL 2

Accepted Solution

by:
milanmk earned 2000 total points
ID: 19625562
[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

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses
Course of the Month19 days, 7 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question