Support » Plugin: WP Hide & Security Enhancer » Fatal error: Uncaught Error: Call to undefined function wp_generate_password()

  • Resolved Ralf Klis

    (@rklis)


    Hi there,

    The latest plugin update crashes WordPress – please fix urgently.

    PHP Fatal error:  Uncaught Error: Call to undefined function wp_generate_password() in /var/www/xxx/html/wp-admin/includes/file.php:643
    Stack trace:
    #0 /var/www/xxx/html/wp-admin/includes/class-wp-filesystem-ftpext.php(163): wp_tempnam('/var/www/xxx...')
    #1 /var/www/xxx/html/wp-content/plugins/wp-hide-security-enhancer/include/wph.class.php(850): WP_Filesystem_FTPext->put_contents('/var/www/xxx...', '<?php if ( ! de...', 'FS_CHMOD_FILE')
    #2 /var/www/xxx/html/wp-content/plugins/wp-hide-security-enhancer/include/update.class.php(233): WPH->set_static_environment_file()
    #3 /var/www/xxx/html/wp-content/plugins/wp-hide-security-enhancer/include/update.class.php(14): WPH_update->_run()
    #4 /var/www/xxx/html/wp-content/plugins/wp-hide-security-enhancer/include/wph.class.php(177): WPH_update->__construct()
    #5 /var/www/xxx/html/wp-content/plugins/wp-hide-security-enhancer/include/wph.class.php(106):  in /var/www/xxx/html/wp-admin/includes/file.php on line 643
    
Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author tdgu

    (@tdgu)

    Hi,
    Thanks for your feedback. Unfortunate i’am not able to replicate the issue on this side, can you send some more details? When exactly you see this error? What server type you run? From what plugin version you updated?

    Thanks

    faxuu

    (@faxuu)

    Notice: Use of undefined constant FS_CHMOD_FILE - assumed 'FS_CHMOD_FILE' in /path/wp-content/plugins/wp-hide-security-enhancer/include/wph.class.php on line 850
    

    I have same issue with 850 line on fresh install of WP 5.1.1
    Server Apache, PHP 5.6

    • This reply was modified 1 month ago by  faxuu.
    • This reply was modified 1 month ago by  faxuu.
    Plugin Author tdgu

    (@tdgu)

    You must be using FS_METHOD and “ssh2”, “ftpext”, or “ftpsockets” not “direct”
    Can you confirm this is fixed in Version: 1.5.6.7 ?

    Thanks

    faxuu

    (@faxuu)

    I will response later when I figure out that FS_METHOD..

    Plugin Author tdgu

    (@tdgu)

    pidho1

    (@pidho1)

    Latest update crashed two of my sites too. Kindly look into it.

    faxuu

    (@faxuu)

    Yeah I had that documentations, but I had a problem with webhost as well to configure FS_METHOD.
    Plugin is working very well for me now.

    For ppl who would have that problem, the easiest way is set FS_METHOD as ftpext.
    Add this on end of wp-config.php file

    /** FTP Connection - manually added **/
    define( 'FS_METHOD', 'ftpext' );
    define( 'FTP_USER', 'user' );
    define( 'FTP_PASS', 'pass' );
    define( 'FTP_HOST', 'hostname' ); //usually localhost:21
    define( 'FTP_SSL', true ); //if you have ftp with ssl leave it true

    You should be able to install plugins successfully now.

    For linux issues:
    Next problem which you can meet is that plugin will give you errors and asking about writable directories and if you are sure that all directories of wordpress has permission is 755 and files permission is 644 then you need to change owner of whole wordpress to user who run your webserver process.

    chown -R httpd /path/to/web/wordpress

    The user ‘httpd’ can be different for you.

    Hope it helps.

    Regards and thanks for helping me with plugin 🙂

    • This reply was modified 1 month ago by  faxuu.
    • This reply was modified 1 month ago by  faxuu.

    Confirming that 1.5.6.7 fixes the issue.
    Just a note – we do not use FS_METHOD = direct (default) it’s not changed anywhere.

    Plugin Author tdgu

    (@tdgu)

    Hi @pidho1
    Can you please send additional details regarding the encountered issue? Do you see an error message? Can you check your server error logs?

    Thanks

    pidho1

    (@pidho1)

    On one site, I have the following error

    Zend OPcache API is restricted by “restrict_api” configuration directive in …/wp-content/plugins/wp-hide-security-enhancer/include/functions.class.php on line 2476

    On another site, I have:

    Fatal error: Uncaught Error: Call to undefined method WP_Error::has_errors() in …/wp-content/plugins/wp-hide-security-enhancer/include/wph.class.php:876 Stack trace: #0 …/wp-content/plugins/wp-hide-security-enhancer/include/wph.class.php(293): WPH->set_static_environment_file() #1 …/wp-includes/class-wp-hook.php(286): WPH->on_init(”) #2 …/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #3 …/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #4 …/wp-settings.php(450): do_action(‘init’) #5 …/wp-config.php(28): require_once(‘/srv/users/serv…’) #6 …/wp-load.php(37): require_once(‘/srv/users/serv in …/wp-content/plugins/wp-hide-security-enhancer/include/wph.class.php on line 876

    Plugin Author tdgu

    (@tdgu)

    @pidho1 Thanks for your feedback.

    1) For the first site, it appear the opcache() is restricted from your server settings. Is this show as a notice, warning or an error?

    2) This is strange, let me check further into this and i’ll come back with an update.

    Thanks

    Plugin Author tdgu

    (@tdgu)

    @pidho1 Can you confirm this development version fix the issue for site #2 http://nsp-code.com/testing/wp-hide-security-enhancer-1.5.6.7.1.zip

    pidho1

    (@pidho1)

    Yes, it does. No errors on site number 2.

    pidho1

    (@pidho1)

    Just one more error: Zend OPcache API is restricted by “restrict_api” configuration directive in …/public/wp-content/plugins/wp-hide-security-enhancer/include/functions.class.php on line 2476

    Plugin Author tdgu

    (@tdgu)

    Actually that should be fixed too, did you tried the latest update?

Viewing 15 replies - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.