WordPress.org

Ready to get started?Download WordPress

Forums

P3 (Plugin Performance Profiler)
[resolved] Fatal error - "Cannot set profile flag file" (10 posts)

  1. erick_paper
    Member
    Posted 2 years ago #

    What's this error?

    When I click o the "Fix this" button, it wants my FTP details. But wordpress as a whole can't support secure FTP with a non-standard port (other than 22).

    Why do I need to provide FTP details for a plugin to work?

    Pls advise any workaround. Otherwise, a colossal waste of time.

    Thx

    http://wordpress.org/extend/plugins/p3-profiler/

  2. Kurt Payne
    Member
    Plugin Contributor

    Posted 2 years ago #

    Hi erick_paper,

    There's a file that needs to be written to the plugin's folder (p3-profiler/.profiling_enabled). It needs to be readable and writable by WordPress. If it isn't set up correctly when the plugin is installed, then P3 offers to correct this situation using WordPress' built in file system functions.

    P3 only passes the FTP credentials through to WordPress. They are not stored or sent anywhere else.

    These pages have more information on the exact API used:

    http://ottopress.com/2011/tutorial-using-the-wp_filesystem/

    http://codex.wordpress.org/Filesystem_API

  3. erick_paper
    Member
    Posted 2 years ago #

    Thanks. My entire wp_content folder is writable.

    If P3 relies for anything on WordPress' simple FTP creds, it won't work at all. WordPress shamefully does not support SFTP with non-standard ports, which is quite common among server-hardened modern hosting environments.

  4. Kurt Payne
    Member
    Plugin Contributor

    Posted 2 years ago #

    As far as WordPress SFTP support is concerned, I understand this is an important issue and I see that you have already opened a topic about this.

    As for P3, the latest version (1.1.2) was just released. One important change was made to the page that requests FTP credentials. The file that needs to be writable is displayed at the bottom of the page if you want to fix the permissions manually.

  5. Eric Rasch
    Member
    Posted 2 years ago #

    So, our sites have FTP disabled completely. Does this mean we can't use your plugin? Is there any way around this? I tried uploading the .profiling_enabled file and made it writable, but the plugin still won't work.

  6. Kurt Payne
    Member
    Plugin Contributor

    Posted 2 years ago #

    Hi Eric,

    Are you seeing the message in red that says "Cannot set profile flag file [click here to fix]" ?

  7. Eric Rasch
    Member
    Posted 2 years ago #

    Correct. If I click on the 'fix this' button, it takes me to the FTP credentials page with this message at the bottom...

    Why am I being asked for this information?
    P3 cannot write to this file:
    /PATH/wp-content/plugins/p3-profiler/.profiling_enabled
    P3 needs to write to this file to toggle profiling for your site. If you want to fix this manually, please ensure the file is readable and writable by the web server.

  8. Kurt Payne
    Member
    Plugin Contributor

    Posted 2 years ago #

    Eric,

    Can you verify that /PATH/wp-content/plugins/p3-profiler/.profiling_enabled exists and is writable by the webserver?

    Can you chmod the file, temporarily, to 666 to see if the message disappears?

  9. Eric Rasch
    Member
    Posted 2 years ago #

    It works now. I had to disable and re-enable the plugin, then upload the .profiling file again, then set the file to 666 all before I accessed the plugin setting page.

    Thank you!

  10. Kurt Payne
    Member
    Plugin Contributor

    Posted 2 years ago #

    Eric,

    You're welcome! The main problem we're facing is that if the plugin is loaded early, it can be more accurate when tracking the WordPress core, and some plugins. But if it's loaded early, it's outside of the WordPress framework, and that's where we're seeing most of our the support issues.

    We're experimenting with a version of P3 that sacrifices a little accuracy for a lot more compatibility.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic