-
MODX Staff
- 2,502 Posts
I have a recent install of 0.9.5 on a shared server (Hostdime) and have a "Register Globals is set to On" alert in the manager window.
I contacted my host who instructed me to place the following:
in a php.ini under my public_html and now phpinfo() shows register_globals set to off for both local and master values.
Any idea why MODx is reporting register_globals as on?
Thanks in advance.
Jay
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
-
MODX Staff
- 2,502 Posts
Ryan,
Pardon my ignorance, but I can’t seem to find info on where to place this file. Do I just add a welcome.html to assets>templates>modxhost ? Is there documentation on how to do this (URL)?
Thanks for your help.
Jay
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
-
MODX Staff
- 12,272 Posts
You need manager templates to hide the warnings in the manager. They’re located in /manager/media/style/
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
Are you SURE that register_globals is off in your Manager? Depending upon your server setup, php.ini files can often be finnicky and apply themselves only in the directory you put them in (and not subdirectories, e.g. manager, assets, etc.). If you find that it’s in fact not set to off in subdirectories, you should also verify that you are not unsetting other important local variables in your root directory (sometimes not declaring all settings and values in a local php.ini file resets everything to the PHP defaults - not your server’s default configuration - which can wreak havoc with session files, etc.).
-
MODX Staff
- 2,502 Posts
Zap,
I was sure but now I am not. I added a php.ini file under the manager file with the register_globals = off and logged into the manager and the error was no more. BUT when I removed the directive and the php.ini file from the manager directory there seemed to be no error still. I ran phpinfo() in the manager directory and register_globals is showing off.
My host (hostdime) assured me that the php.ini in my sub dirs was an override and not the master. (The server is PHP on CGI.)
I wonder, is the register_globals alert in the Manager somehow tied to sessions? If I broke or the session expired and came back as I did would this have an effect?
Thanks for all your help.
Jay
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
-
MODX Staff
- 2,502 Posts
Zap,
I have played with this some more and have found that my subdirs are not being controlled by the php.ini in the root web folder and therefore when I reran the phpinfo() in the manager dir register_globals was showing as on and the Manager Configuration Alert was showing again.
I have contacted my host to find out if they can fix their settings on my server to make the php.ini effect the subdirs or, preferebly, turn register_globals off altogether for my accounts.
Thanks again,
Jay
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
I hate it when that happens! I’ve been fortunate to be able to override PHP settings in .htaccess on most servers I work on (except GoDaddy, where local php.ini files work properly), but I’ve seen a lot of folks suffer over this on other servers. Besides the issue of not affecting subdirectories, you should also verify that you are not unsetting other values by not including them as well.
-
MODX Staff
- 2,502 Posts
Zap,
I have asked them to let me know what the server settings are. I am fairly sure that the php.ini only having one rule in it doesn’t allow the other settings to revert to default but I will review it to be sure.
Thanks again. I hope to get a resolution within the hour.
Cheers,
Jay
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub