WordPress.org

Ready to get started?Download WordPress

Forums

Automatic plugin updates not working with XAMPP on OSX (needs FTP login) (21 posts)

  1. mixvio
    Member
    Posted 4 years ago #

    I have set up a local installation of XAMPP on my OSX machine to do offline development. Overall everything is working correctly, but when I connect to update plugins automatically, I'm given this:

    http://i38.tinypic.com/264lueb.png

    which is asking me for FTP information. Googling around I saw that this is because of a permissions issue, so WordPress attempts to FTP in to do updates. No amount of CHMODding the files to the best of my ability fixed anything automatically, so I tried the FTP method.

    XAMPP comes with a FTP server allegedly, but even after turning it on I couldn't get it working correctly and I couldn't find any information about what, if any, default FTP user XAMPP comes with on the OSX side, or how I could create my own. So I went to use the built-in FTP file sharing that's included in OSX, and I guess I managed to progress further, because any time I tried to update a plugin I got this error:

    Installing the latest version.
    Incompatible Archive
    Plugin upgrade Failed.

    If I attempted to delete a plugin through the control panel, I got a similar message about how it couldn't be fully removed, so obviously this isn't working either.

    By this point I'm not sure what to do; I set up XAMPP for ease of use so I wouldn't have to install a full local webhost solution, and I would prefer to figure out how to get this working correctly since otherwise it's working perfectly. But my Google-fu is coming up short, so any ideas?

  2. Jonathan Dingman
    Member
    Posted 4 years ago #

    You'd need to change the permissions on the plugins directory for WordPress to have more control over it.

    I personally use this WordPress SSH upgrade and install tutorial to upgrade my plugins. It might work since you're on OS X, so you could give it a shot.

    The alternative is to input similar values into the wp-config and you won't have to manually enter them each time.

  3. mixvio
    Member
    Posted 4 years ago #

    Yeah I have tried every conceivable variation of permissions changes, from CHMOD to changing the permissions in the GUI, and it's not doing anything. :(

  4. propono
    Member
    Posted 4 years ago #

    Jdingman what do you mean specifically by "The alternative is to input similar values into the wp-config and you won't have to manually enter them each time."

    What hard code these details in that file? Could you possibly show me please.

    As I'm on Snow Leopard using MAMP PRO I have started Mac OS X FTP server and I'm using the ipaddress it gave me in the wordpress ftp host: field as well as the username and password I have. But it just gives me this error all the time: Failed to connect to FTP Server propono:21. Can anyone shed some light on this for me, as I would like to upgrade my plugins on my local machine automatically.

    Thank you.

  5. propono
    Member
    Posted 4 years ago #

    I have also followed this tutorial but to no avail: http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

    Has anyone managed to setup and get local upgrades working?
    I'm on MAMP Pro, Mac OS X Snow Leopard, using the Mac FTP server.

  6. Jack Barham
    Member
    Posted 4 years ago #

    I am having the same problem - Has anyone figured out how to upgrade WP and WP Plugin's locally using the built in WP FTP.

    I am on Mac OSX Snow Leopard with MAMP Pro.

    I can setup a local FTP server (which works nicely on FileZilla) but can't seem to get WP to play ball!

    Thanks - Jack

  7. Chad Bush
    Member
    Posted 4 years ago #

    I'm setting up a testing server on Snow Leopard now, using MAMP Pro and WP 3.0 with multiple site functionality. I'd love to be able to auto-update plugins and WP software on my local machine, but I have not been able to find anything anywhere that actually works. It looks like a lot of us are having issues with this. Does anyone have a solution?

  8. xps
    Member
    Posted 4 years ago #

    I've found, with each release, that automatic updates don't work on Mac OS X out of the box. However I've fixed the problem for my installations - I haven't submitted a bug fix because I don't know that it would work on a non-Mac OS X installation.

    The fix is as follows:

    First, make sure that you have enabled the PHP 'sockets' extension. It won't work without it. Try running

    php --ri sockets
    and confirm that sockets support is enabled.

    Second, you need to edit one of the distribution files.
    The file you need to change is wp-admin/includes/class-ftp.php.
    Search for the three calls to rawlist() (there is one in dirlist(), one in mdel() and one in mget()). Remove the '-la' and '-lA' options from between the quotes (i.e. leave an empty string).

    After that you should find that it all works now.

    It seems that sending those options to the Mac OS X ftp server confuses it...

    Hope this helps some of you, if not all...

    cheers
    Chris

  9. SuzieQ
    Member
    Posted 4 years ago #

    Hey Chris,
    Any chance you'd be willing to give step by step instructions of how to change the "wp-admin/includes/class-ftp.php" thingy in the terminal? I made sure the sockets extension was running, but I'm lost after that as to what to do. Thanks in advance for your kindness. :B

  10. susie54
    Member
    Posted 4 years ago #

    I was just running up against the same problem - trying to update WordPress plugins on WordPress 3.0 on XAMPP server installed locally and could not get past the ftp hostname, username, password combination.

    Thankfully I came across this post - http://www.messaliberty.com/2010/04/how-to-fix-wordpress-automatic-upgrades-and-plugin-installs-on-xampp/ - and its now working fine for me (not requesting the ftp details). Had to muck around a bit with the file permissions on the file you have to change in XAMPP, but got there eventually.

  11. AlexLakes
    Member
    Posted 4 years ago #

    Susie54, Did Terminal prompt you for a password after entering: sudo vi /Applications/XAMPP/etc/httpd.conf

  12. SuzieQ
    Member
    Posted 4 years ago #

    Hey, susie54... thanks for the link! I'm using a MAMP set-up using one of the Lynda.com tut's... hand coding it in rather than using an all-in-one. Do you know if I can follow the steps in that link the same way without a XAMPP? (Sorry, I'm a total non-coder!) Thanks for the input. :D

  13. AlexLakes
    Member
    Posted 4 years ago #

    Hi SuzieQ, I don't know that I understand what you're looking for, but this link helped me. http://codex.wordpress.org/Installing_WordPress_Locally_on_Your_Mac_With_MAMP

    I ended up going with MAMP b/c I couldn't get ftp to work with XAMPP. MAMP takes a just slightly more setting up, but now works even better b/c I don't have to worry about ftp at all. I can just transfer files to and from the folders without worry about ftp. It works great.

  14. SuzieQ
    Member
    Posted 4 years ago #

    Hi AlexLakes, thanks for offering the help. I agree about not having to worry about ftp. My MAMP is up and running, no worries there... My problem is related to the original post in this string and having trouble installing and updating WP plugins. xps's post a few above came the closest to helping fix my problem (I think) but I am NOT good at going into the Terminal and I need some step by step instructions (type this... then this...) of how to change the file he said to change.

  15. AlexLakes
    Member
    Posted 4 years ago #

    Gotcha. I don't remember how I was able to test for php sockets in all my testing, but I did and it was enabled. I haven't done anything fancy to my MacBook, so it's may be safe to assume that php sockets are ON by default and you don't have to worry about that.

    To edit wp-admin/includes/class-ftp.php, just open that file in a text editor, search for 'rawlist', and remove the three nearby instances of '-la' and '-lA'. It worked for me.

  16. SuzieQ
    Member
    Posted 4 years ago #

    Alex, you are SO NICE for offering this help and sticking with me on this. :) THANK YOU!!! One more question... I found the file, found the instances, but not sure exactly how much of the code to remove. So here's the first instance:

    function mget($remote, $local=".", $continious=false) {
    		$list=$this->rawlist($remote, "-lA");
    		if($list===false) {
    			$this->PushError("mget","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents");
    			return FALSE;
    		}

    Do I just delete the -1A and leave the quotes w/nothing between them or do I delete the entire line? Sorry to be so dense... I'm learning all of this from scratch. :P

  17. electronicink
    Member
    Posted 4 years ago #

    How to get around the auto plug in issues with MAMP:

    You need to activate your 'File Sharing' in sys prefs.
    Select 'Options...' button and tick 'Share files and folders using FTP'.
    Make a note of the FTP address (00.0.0.0 format).
    Click 'Done'.

    Return to MAMP Pro.
    Highlight your 'wordpress' site folder in 'Hosts' 'General' tab.
    Select 'Permissions...' button.
    Change 'Owner' popup button to 'www'.
    Change 'Group' popup button to 'www'.
    Click 'Set'.

    Finally get back to the plug in page where it asks you for your FTP details.
    Enter your FTP details.
    FTP Host will be just the number you noted earlier 00.0.0.0
    Username and password is the database Username and password you set up in phpmyadmin for your wordpress site.

    I hope it works for you all now.

    Electronicink

  18. AlexLakes
    Member
    Posted 4 years ago #

    SuzieQ, Yep, just delete them and leave the quotes with nothing between them, not even a space. At least that's what worked for me ;)

    function mget($remote, $local=".", $continious=false) {
    		$list=$this->rawlist($remote, "");
    		if($list===false) {
    			$this->PushError("mget","can't read remote folder list", "Can't read remote folder \"".$remote."\" contents");
    			return FALSE;
    		}
  19. cubecolour
    ɹoʇɐɹǝpoɯ
    Posted 4 years ago #

    If you're happy to use the login each time, but just need to know what to put into the input fields, try these defaults - for XAMPP (OS X):

    Hostname: localhost
    Username: nobody
    Password: xampp

  20. SuzieQ
    Member
    Posted 4 years ago #

    @AlexLakes: THANKS again for the tips... for some reason I wasn't having any luck with that fix. I think it's the way I set up my local server (stupid tutorial). :P

    @Electronicink: Thanks for the nicely laid out explanation. I followed your directions step by step (even reinstalled the latest WordPress) but this is what I get:

    Not Found
    The requested URL /cancel_monday/blog/wp-admin/update.php was not found on this server.

    Any idea what I did wrong?

    Thanks to everyone for chiming in. It is so nice to have people answer a cry for help. I hate being stupid. :(

  21. tip20
    Member
    Posted 3 years ago #

    Electronicink

    THANK YOU SO MUCH!! That worked perfectly!

    I am a little nervous about my computers security now, is there anything I can do to protect myself a bit more?

    Thanks again!!!

    Tom

Topic Closed

This topic has been closed to new replies.

About this Topic