I am trying to use user sync; however, I seem to be running

Hello,

I am trying to use user sync; however, I seem to be running into difficulties. I get mod_fcgid: stderr: PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /var/www/vhosts/NewsIntranet.partners.org/httpdocs/wp-content/plugins/user-sync/user-sync.php on line 172, referer: http://newsintranet.partners.org/wp-admin/admin.php?page=user-sync error from my master site.

I also get PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /nas/content/live/intranetmgh/wp-content/plugins/user-sync/user-sync.php on line 172, referer: http://intranetmgh.wpengine.com/wp-admin/admin.php?page=user-sync and PHP Warning: fopen(/nas/content/live/intranetmgh/wp-content/plugins/user-sync/log/errors_s.log): failed to open stream: No such file or directory in /nas/content/live/intranetmgh/wp-content/plugins/user-sync/user-sync.php on line 169, referer: http://intranetmgh.wpengine.com/wp-admin/admin.php?page=user-sync from my sub.

Permissions look fine

Cheers

    Adam Czajczyk

    Hello Mathias,

    I hope you're well today and thank you for your question!

    The error indicates that the "fclose()" function was given a boolean (true/false) value as a first parameter instead of a "resource" (file handle). This may happen if "fopen()" function returned "false" instead of resource handle and this would mean that it wasn't able to open given file (which I presume in this case is an URL).

    I'd start with checking your PHP settings. To do this, please create a "phpinfo.php" file in a root folder of your site and put these lines inside:

    <?php
    
    phpinfo();
    
    ?>

    Then access this file directly ("yourdomain.com/phpinfo.php" and look for

    allow_url_fopen

    directive that should be set to "On" (see screenshot below).

    Since you're using WP User Sync plugin so there may be more than one server involved, please do this for each of the servers where your synced sites are hosted.

    In case this option is set to OFF please check if you're able to change it to ON via cPanel and do this if possible. If you're not able to change it, please ask your host if they could do this for you.

    Keep me informed please!

    Best regards,
    Adam