Compatability issue

This topic contains 9 replies, has 2 voices, and was last updated by

 
Keymaster
6 years, 1 month ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #6891

    Participant

    Hi there, I’m doing some fine tuning on the above site, but the client is mainly responsible for the design etc.

    Upon installing the plugin, there were a couple of error messages about the /css and /cache files not being writeable. There was also a warning about having to fill in FTP credentials into the wp-config.php file.

    The client is using a third-party hosting company, and I do not have direct ftp access. The hosting company is happy to amend cache permissions, but giving full read/write permission to other folders and putting plain text FTP credentials into files is not something they want to do.

    Is there any way around this, or should say that the plugin (which looks excellent by the way) isn’t going to work within this setup?

    Just having the plugin activated makes the site inaccesible from the front end (see attached image).

    Thanks,
    Shaun

    #6892

    Hi!

    The plugin will work with those warnings without problems. There is a fallback method implemented if those directories are not accessible.
    Putting FTP details into the wp-config.php file shouldn’t be a security concern, because the database access is also stored there as plain text – it’s a commonly used method with wordpress.

    The inaccessible front-end is not caused by the permission issues, I’m 99% sure. The screenshot didn’t get through for some reason, can you please re-attach it?
    If there are any error messages that you can copy/paste here, that would help a lot as well.

    I believe we can still make it work despite the restrictions. If I can see any notifications, error messages, that I will be able to tell what’s the possible cause.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6893

    Participant

    Hi, thanks for the prompt reply! I’ll attach the screenshot again, and here’s the error messages that we’re getting:

    Error #1

    The /home/award2/public_html/wp-content/plugins/ajax-search-pro/css/ directory is not writeable!

    Possible Consequences

    You might not be able to change the search style.

    Solutions

    Use an ftp clien to chmod (change permissions) the /home/award2/public_html/wp-content/plugins/ajax-search-pro/css/ directory to 666, 755, or 777
    Read this siteground article if you need help.

    Error #2

    The /home/award2/public_html/wp-content/plugins/ajax-search-pro/cache/ directory is not writeable!

    Possible Consequences

    Images may not show in results, the caching of results may not work.

    Solutions

    Use an ftp clien to chmod (change permissions) the /home/award2/public_html/wp-content/plugins/ajax-search-pro/cache/ directory to 666, 755, or 777

    Error #3

    WordPress does not have access to it’s own file system!

    Possible Consequences

    Images, CSS Files, Cache Files will be included with an alternative inline method, which is slower.

    Solutions

    You will have to fill in FTP credentials into the wp-config.php file.

    define( ‘FTP_USER’, ‘username’ );
    define( ‘FTP_PASS’, ‘password’ );
    define( ‘FTP_HOST’, ‘ftp.example.org’ );

    In some cases more constants might be required.
    Please read: WordPress Upgrage Constants
    ADVANCED USERS ONLY!

    Change ownership of the WordPress directory and all of its contents via SSH for the www-data process.

    Changing Ownership if WordPress is in the ROOT directory

    Hope that helps!

    Thanks,
    Shaun

    Attachments:
    You must be logged in to view attached files.
    #6895

    Thanks, it actually helps 🙂

    Let’s try disabling the FTP credentials access prompt in the code first, and then we see what comes next. I’m guessing you have access to the files, if not please ask for FTP access, because we are going to change a few lines.

    Once you have FTP access, open up the wp-content/plugins/ajax-search-pro/includes/compatibility.class.php file and go to lines 67-72, where you should see this:

    
                $access_type = get_filesystem_method();
                ob_start();
                $creds = request_filesystem_credentials(site_url() . '/wp-admin/', '', false, false, null);
                $_c = ob_get_clean();
                if ($access_type === 'direct' || WP_Filesystem($creds))
                    return true;
    

    simply disable those lines by commenting them like so:

    
                /*$access_type = get_filesystem_method();
                ob_start();
                $creds = request_filesystem_credentials(site_url() . '/wp-admin/', '', false, false, null);
                $_c = ob_get_clean();
                if ($access_type === 'direct' || WP_Filesystem($creds))
                    return true;*/
    

    or you can remove these lines if you prefer that way.

    Now after saving, the FTP prompt should disappear and hopefully the plugin starts to work as normal.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6901

    Participant

    Hi there,

    Okay, so it’s a little bit difficult as I don’t have direct FTP access, but I’ve spoken to a guy at the hosting company and he has amended the plugin code for me as you suggested. But we’re still getting the same thing happening.

    They’ve pretty much said point blank that they’re not putting FTP details into the config file so does this mean we’re stuck?

    Thanks,
    Shaun

    #6905

    Hm, this is going to be really hard without any access, but I still have ideas.

    For starters, I’m attaching a slightly modified version of the plugin, which completely ignores these warnings. I’ve removed anything that can prompt for permissions.

    Please uninstall the one you have currently, install this one and let me know what happens after activation.

    Attachments:
    You must be logged in to view attached files.
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6907

    Participant

    Okay, that’s great – thank you!

    Client has finished for today now so it will be tomorrow before I can get it uploaded and tested. I will let you know how we get on!

    Thanks again,
    Shaun

    #6908

    Okays. I’m finishing for today too 🙂

    Let me know how it goes tomorrow.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #6912

    Participant

    Hi Ernest,

    Ok, so I’ve installed the version of the plugin that you sent and it appears to be working fine – thanks so much. I have just tested a very basic search box without changing any options and it works, but I think I need to look at the settings and make some adjustments.

    Shall we mark this closed for now? If I run into anything else I can open a new ticket, but hopefully it will all be ok!

    Thanks again,

    Shaun

    #6913

    Nice, I’m glad it’s working despite the restrictions.

    I’ll close this ticket and mark as resolved. Have a nice day!

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Compatability issue’ is closed to new replies.