Forum Moderators: phranque
I'm mystified... Your server or PHP installation is misconfigured somehow, but having thought about it for awhile, I can't discern how.
But as g1smd points out above, the real question is, "Why is my php config file located in an HTTP-accessible directory to begin with?"
perhaps a way to dupe people into blowing more money on hosting, for packages they don't really need.
is there something i can put into my php.ini to overwrite the server-settings? at present, this is all i have in it:
register_globals = On
I've heard that register_globals should be Off unless you have a good reason to have them On.
Also try this
<Files php.ini>
order allow,deny
deny from all
</Files>
That's about the last combination that hasn't been tried/suggested! It goes into the root .htaccess, where php.ini is. After you've made this change, maybe clear your browser cache before you try to browse to it, to make sure you're not getting the cached copy.
[edited by: SteveWh at 6:37 am (utc) on Aug. 9, 2006]
I've heard that register_globals should be Off unless you have a good reason to have them On.
what i can't understand is.. why does this work to disable direct viewing of .php files, but not .ini?
Also, if your host is using suPHP, you may need a suPHP_ConfigPath line in your .htaccess. I have one, but it's just one that was provided by my host, so I can't give any assistance on what it means or how to set it up. Maybe this is needed even if suPHP isn't the one being used? Don't know.
[edited by: SteveWh at 7:52 pm (utc) on Aug. 9, 2006]