Brilliant. I’ve been trying to figure that out on my dev machine for ages. Thanks.
WordPress Automatic Updates broken, asks for Connection Information – fixed!
Automatic updates of plugins and wordpress itself does not work with lighttpd out of the box. No matter how much I searched for an answer to why this was happening, I couldn’t seem to find anyone that addressed the problem and came up with a solution. I wanted to fix the WordPress plugin Automatic Updates asking for Connection Information problem, but most people are using generic shared hosting with no real access to their server. And a large chunk of those users are on windows or using apache so that’s no help to me. Some people are doing more harm than good telling everyone to go change their file permissions to 777 or chown all the files to the web server user. But… I… finally… figured… it… out! To start with, here are some dead-end answers that you will find searching out there in the wastelands:
====Things that are not the problem====
|
1 2 3 4 |
needing to deactivate plugins before upgrading file/directory permission problems missing modules from lighttpd.conf php memory issues |
The real problem is a php function called getmyuid() which “Gets PHP script owner’s UID”. Ok, so permissions and ownership may still be an issue for you, and you may not even have the right temp directory set up that file.php is looking for, but if everything else is correct, go edit wp-admin/includes/file.php and change the getmyuid() call to posix_getuid() instead. You can expect to have access to the functions, but to avoid any warnings or errors it checks if the functions are callable first, so you may as well change that one too. See below for the detailed change:
|
1 2 3 4 5 6 |
function get_filesystem_method($args = array()) { $method = false; if( function_exists('posix_getuid') && function_exists('fileowner') ){ $temp_file = wp_tempnam(); if ( posix_getuid() == fileowner($temp_file) ) $method = 'direct'; |
After that simple change, my updates starting working just fine.
|
1 2 3 4 5 6 7 8 9 |
Upgrade Plugin Downloading update from http://downloads.wordpress.org/plugin/rootninja-plugin-1.2.3.zip Unpacking the update Deactivating the plugin Removing the old version of the plugin Installing the latest version Plugin upgraded successfully Attempting reactivation of the plugin Plugin reactivated successfully. |
Ahhhh much better. No more asking me to fill in Connection Information for some silly ftp manual update blah.
5 thoughts on “WordPress Automatic Updates broken, asks for Connection Information – fixed!”
5 thoughts on “WordPress Automatic Updates broken, asks for Connection Information – fixed!”
-
-
wow okay that worked very well. thank you very much for sharing.
-
Link exchange is nothing else however it is only placing the other person’s webpage link on your page at appropriate place and other person will also do similar in support of you.
Brilliant. I’ve been trying to figure that out on my dev machine for ages. Thanks.
wow okay that worked very well. thank you very much for sharing.
Link exchange is nothing else however it is only placing the other person’s webpage link on your page at appropriate place and other person will also do similar in support of you.