• Why don’t the (developers) fix this issue? It has been a known issue and has a resolution that actually works for 3-years but has not been updated in years (assuming that 1.8.0.1 is a newer 2015 version). Would you please patch this so that the plugin actually works without error please? This will keep the user from performing a manual plugin patch every time there is an update.

    The Problem:

    Warning: unlink(E:/…/wordpress/wp-content/plugins/really-simple-captcha/tmp/1250988247.txt) [function.unlink]: Permission denied in E:\…\wordpress\wp-content\plugins\really-simple-captcha\really-simple-captcha.php on line 225

    The Solution:

    open really-simple-captcha/really-simple-captcha.php

    221 foreach ( $suffixes as $suffix ) {
    222 $filename = sanitize_file_name( $prefix . $suffix );
    223 $file = trailingslashit( $this->tmp_dir ) . $filename;
    224 if ( is_file( $file ) )
    225 unlink( $file );

    you have to replace “trailingslashit” to “untrailingslashit” on line 223.

    https://wordpress.org/plugins/really-simple-captcha/

Viewing 1 replies (of 1 total)
  • I agree with kkramis.

    There is also closely related issue on Windows where it is common for Apache generated files to be created with Readonly file attribute set.
    Even though Apache creates the image and text files and has permission to delete files the Windows operating system will not permit deletion of readonly files without generating an error.
    The fix is simple and requires the addition of just one line of code before the unlink to use chmod to set the permissions to 777 which overrides the readonly issue.

    chmod($file, 0777);
    unlink( $file );

    Adding this modification to the plugin would ensure fully portability of the plugin across all platforms.

    Readers may like to note that the same mod should be applied to the Contact Form 7 plugin on the captcha.php file in the plugin modules folder as this does a similar function if the really-simply-captcha function is not available.

Viewing 1 replies (of 1 total)

The topic ‘function.unlink needs develops to fix and send out update’ is closed to new replies.