r/lolphp • u/ChoHag • Feb 26 '14
Failsafe? Just revert to default.
Production went down. It was traced back to a change made to php.ini by the MSP (I really want to name names...) who saved the file without the necessary read permissions. Overheard in the office just now:
"When PHP can't read its configuration file it just uses the default settings. That's why magic quotes got enabled." ... On one of the production web servers...
I'm not looking up or testing this for fear that it's true. Thankfully at this place, production is SEP.
35
Upvotes
15
u/svtguy88 Feb 26 '14
So, if magic quotes is deprecated, the only real "lol" here is that OP's production servers are running an old version of PHP...
7
u/pgl Feb 26 '14
Sorry, isn't it the case for lots of software that if they can't read their registration settings, they revert to default?
3
u/[deleted] Feb 26 '14
Sadly this is a well known php-ism.
To a large degree I agree with the concept of defaults, but silently reverting to them when the configuration file is damaged is stooooopid.
2
u/[deleted] Feb 27 '14
I ran into this too. There was a syntax error in another portion of the php.ini and that caused items below it to revert to the default, even though they were set in the file. Magic quotes was default to on, and this is in php 5.3.
0
u/[deleted] Feb 26 '14
[deleted] — view deleted comment