When I install the plugin I get the following error message

Hi...

When I install the plugin I get the following error message that appears on the header of the admin area and the public facing site:

Warning: chmod() [function.chmod]: Operation not permitted in /home/jugula/public_html/wp-content/plugins/whmcs-wordpresss-integration/whmcs-integration.php on line 214

Any help greatly appreciated.

Thanks.

  • Tom Eagles
    • Syntax Hero

    @evildr

    That sounds like a permissions folder problem, can you check what permissions set you have on the server. Whats basically happenining by the looks of it is the plugin is trying to apply a permission level to a file/directory and isnt allowed to do so.

    Cheers

  • Gorillas
    • WPMU DEV Initiate

    OK. Changed that folder to permissions 777 and do not get the error message anymore. However I am getting a different one. Which is:

    Warning: chmod() [function.chmod]: Operation not permitted in /home/jugula/public_html/wp-content/plugins/whmcs-wordpresss-integration/whmcs-integration.php on line 294

    There is another error message which says:

    WHMCS Integration cannot patch file wp-contents/class-http.php. Make sure it is writable

    Firstly, is that path right? i.e. wp-contents

    Secondly, I can find that file in the wp-includes folder and it has permissions of 644.

    So does reference folder need to change (and if so how do I do that?) and do what permissions do I need on that file?

    Thanks.

  • Gorillas
    • WPMU DEV Initiate

    Hi... Changed file permissions for wp-includes/class-http.php to 755 and I'm getting the same error message:

    Warning: chmod() [function.chmod]: Operation not permitted in /home/jugula/public_html/wp-content/plugins/whmcs-wordpresss-integration/whmcs-integration.php on line 294

    WHMCS Integration cannot patch file wp-contents/class-http.php. Make sure it is writable

    Any other thoughts?

    Thanks.

  • Arnold
    • El Macho WP

    What it's doing is trying to set the cache directory so it can write scratch pad files to it. These are used for things like cookies session variables and javascript that WHMCS needs to operate. The command there is

    if(! is_writable(WHMCS_INTEGRATION_CACHE_DIR) ) chmod(WHMCS_INTEGRATION_CACHE_DIR, 0755);

    So it checks if it can write to the cache directory and if not it tries to adjust it.
    Similar thing atline 294

    if(! is_writable($fname) ) chmod($fname, 0666);

    If it can't write to the file it's trying to create it tries to adjust it.

    If they can't be adjust of course things will fail. It appears that newly created files are not writable and that Wordpress doesn't have permission to chmod. There are about a million security settings that could cause this. Most likely Wordpress is running in a different group number that your FTP or cPanel.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.