• archon810

    (@archon810)


    After upgrading to v6, WPCF7 now throws this error every time someone uses the form: ErrorException: User Notice: connect(): Could not access filesystem.

    ErrorException: User Notice: connect(): Could not access filesystem.
    #0 /wordpress/wp-includes/functions.php(6121): wp_trigger_error
    #1 /wp-content/plugins/contact-form-7/includes/filesystem.php(66): WPCF7_Filesystem::connect
    #2 /wp-content/plugins/contact-form-7/includes/filesystem.php(39): WPCF7_Filesystem::__construct
    #3 /wp-content/plugins/contact-form-7/includes/filesystem.php(28): WPCF7_Filesystem::get_instance
    #4 /wp-content/plugins/contact-form-7/includes/submission.php(806): WPCF7_Submission::remove_uploaded_files
    #5 /wp-content/plugins/contact-form-7/includes/submission.php(75): WPCF7_Submission::__destruct
    #6 [internal](0)

    Our form doesn’t even use attachments. Furthermore, the directory wp-content/uploads/wpcf7_uploads uses permissions drwxrwxr-x 2 wwwrun www which allows write access to the web server, and this has never been an issue in v5.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Maciej Ma?kowiak

    (@maciejmackowiak)

    Looks like a bug in the destuctor of WPCF7_Submission

    why always call the remove_uploaded_files in the destuctor even if there is no upload file field?

    Thread Starter archon810

    (@archon810)

    Claude suggests this as a workaround in the meantime:

    // Force direct filesystem access for Contact Form 7 v6+ compatibility
    // CF7 v6 uses WP_Filesystem API which needs this to avoid credential prompts
    define('FS_METHOD', 'direct');

    It seems to work.

    Thread Starter archon810

    (@archon810)

    You set the status to resolved, but is it really? Most people won’t have this define, and is it really the right solution rather than modifying the underlying code? Also, if it is the right solution, perhaps it should be pointed out somewhere in the docs and/or UI?

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.