Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

wp-config discrepancies since blocking updates

         

Sgt_Kickaxe

8:12 pm on Apr 15, 2014 (gmt 0)



Hello,

As a result of automatic emailing and automatic updates I've been asked to block such on a friend's site in favor of updating his site myself, which is OK since I do it religiously for many sites anyway(version control etc). On this particular site the following was added to the wp-config.php file

/** Block automatic updating and external requests */ 
define( 'DISALLOW_FILE_EDIT', true );
define( 'DISALLOW_FILE_MODS', true );
define( 'WP_HTTP_BLOCK_EXTERNAL', true );


My concern is not on the security implication of the above, I know what it does and why and kindly accept your suggestions never to use it but in this case it's fine. I appreciate Wordpress wanting to be the end all of updates but the site is in good hands, take that as a given.

What's going on?
It seems that Wordpress and/or the server will not accept these particular edits in practice. The site acts like it is respecting the edits, but it's not.

filesize - when viewed on the server the file is of the wrong size, it's essentially missing the last line of code above in terms of bytes missing. When downloaded however the line is there. I've seen similar filesize discrepancies before so by itself this isn't a red flag.

sniffer - when using an application to see what's really happening in terms of data transfer the site is still sending out an external signal to wordpress, if only to say it's been set to not accept updates. Would this be a Wordpress feature that is ignoring my "off" instruction or is it the host ignoring the command ?

Also strange - if I remove some of the plain text instructions within the file an error results(definephp on line 1). It would seem that the identifying text, or the spacing, in wp-config.php is required. Yes I've made the edits properly, no there are no strange characters in the file, the file is uploaded in the correct format etc, etc. Has anyone else experienced any of the above with this particular file?