• Resolved jbetes

    (@jbetes)


    Hello:

    Pluggins works perfect on wordpress but after using it for a few houres my server space was oversized. Error showed was this one:

    ” PHP Warning: readdir() expects parameter 1 to be resource, boolean given in /home/puntoseguro/public_html/wp-content/plugins/psn-pagespeed-ninja/includes/class-pagespeedninja.php on line 112″

    When server don′t have enough space it breakes and we have to restore (It has 50 gigas capacity) and the pluggin was adding warnings until it was full.

    My question is: there is any chance to solve this issue so I can use the pluggin again?
    How can we do it? Thanks a lot

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Denis Ryabov

    (@dryabov)

    The mentioned warning about readdir() means that directory wp-contents/plugins/psn-pagespeed-ninja/admin/sessions doesn’t exist (or the plugin has no permissions to read its content). It is quite strange, because of that directory is created automatically when the plugin is installed, and there is no code to remove it in some a way. Could you check that directory exists and readable?

    As to the disk space, PageSpeed Ninja creates files in the following directories (relative to the website root):

    /s – merged js and css files, loaded external resources
    /wp-content/plugins/psn-pagespeed-ninja/cache – cached pages for unauthorized users
    /wp-content/plugins/psn-pagespeed-ninja/ress/cache – internal cache of optimized fragments of html

    Also there are optimized and rescaled images aside with original files. Note that PageSpeed Ninja keeps records about created files and removes all of them at uninstallation.

    Thread Starter jbetes

    (@jbetes)

    Hello Denis:

    Thanks for your help. We havent that folder so we have create it and that mistake is not happening again. Pluggin still works fine on wordpress but it was saying:
    Size of /home/puntoseguro/public_html/wp-content/plugins/psn-pagespeed-ninja/includes/error_log.php file is 86.6Mb.

    We have solved one problem with that error_log.php but now it show this:
    [Thu, 28 Dec 2017 10:30:36 +0000] NOTICE: Undefined variable: ver in /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/functions.php on line 732
    /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/functions.php:732 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:286 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:310 <- /home/puntoseguro/public_html/wp-includes/plugin.php:453 <- /home/puntoseguro/public_html/wp-includes/script-loader.php:1435 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:286 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:310 <- /home/puntoseguro/public_html/wp-includes/plugin.php:453 <- /home/puntoseguro/public_html/wp-includes/general-template.php:2614 <- /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/header.php:34 <- /home/puntoseguro/public_html/wp-includes/template.php:688 <- /home/puntoseguro/public_html/wp-includes/template.php:647 <- /home/puntoseguro/public_html/wp-includes/general-template.php:41 <- /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/single.php:9 <- /home/puntoseguro/public_html/wp-includes/template-loader.php:74 <- /home/puntoseguro/public_html/wp-blog-header.php:19 <- /home/puntoseguro/public_html/index.php:17
    [Thu, 28 Dec 2017 10:30:36 +0000] NOTICE: Undefined variable: ver in /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/functions.php on line 734
    /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/functions.php:734 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:286 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:310 <- /home/puntoseguro/public_html/wp-includes/plugin.php:453 <- /home/puntoseguro/public_html/wp-includes/script-loader.php:1435 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:286 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:310 <- /home/puntoseguro/public_html/wp-includes/plugin.php:453 <- /home/puntoseguro/public_html/wp-includes/general-template.php:2614 <- /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/header.php:34 <- /home/puntoseguro/public_html/wp-includes/template.php:688 <- /home/puntoseguro/public_html/wp-includes/template.php:647 <- /home/puntoseguro/public_html/wp-includes/general-template.php:41 <- /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/single.php:9 <- /home/puntoseguro/public_html/wp-includes/template-loader.php:74 <- /home/puntoseguro/public_html/wp-blog-header.php:19 <- /home/puntoseguro/public_html/index.php:17
    [Thu, 28 Dec 2017 10:30:36 +0000] NOTICE: Undefined variable: ver in /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/functions.php on line 736
    /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/functions.php:736 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:286 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:310 <- /home/puntoseguro/public_html/wp-includes/plugin.php:453 <- /home/puntoseguro/public_html/wp-includes/script-loader.php:1435 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:286 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:310 <- /home/puntoseguro/public_html/wp-includes/plugin.php:453 <- /home/puntoseguro/public_html/wp-includes/general-template.php:2614 <- /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/header.php:34 <- /home/puntoseguro/public_html/wp-includes/template.php:688 <- /home/puntoseguro/public_html/wp-includes/template.php:647 <- /home/puntoseguro/public_html/wp-includes/general-template.php:41 <- /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/single.php:9 <- /home/puntoseguro/public_html/wp-includes/template-loader.php:74 <- /home/puntoseguro/public_html/wp-blog-header.php:19 <- /home/puntoseguro/public_html/index.php:17
    [Thu, 28 Dec 2017 10:30:36 +0000] NOTICE: Undefined variable: ver in /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/functions.php on line 748
    /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/functions.php:748 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:286 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:310 <- /home/puntoseguro/public_html/wp-includes/plugin.php:453 <- /home/puntoseguro/public_html/wp-includes/script-loader.php:1435 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:286 <- /home/puntoseguro/public_html/wp-includes/class-wp-hook.php:310 <- /home/puntoseguro/public_html/wp-includes/plugin.php:453 <- /home/puntoseguro/public_html/wp-includes/general-template.php:2614 <- /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/header.php:34 <- /home/puntoseguro/public_html/wp-includes/template.php:688 <- /home/puntoseguro/public_html/wp-includes/template.php:647 <- /home/puntoseguro/public_html/wp-includes/general-template.php:41 <- /home/puntoseguro/public_html/wp-content/themes/softheightsTheme/single.php:9 <- /home/puntoseguro/public_html/wp-includes/template-loader.php:74 <- /home/puntoseguro/public_html/wp-blog-header.php:19 <- /home/puntoseguro/public_html/index.php:17

    What we have on the code of functions.php is

    // Load the html5 shiv.

    wp_deregister_script(‘jquery’);

    wp_enqueue_script( ‘jquery’, get_template_directory_uri() . ‘/js/jquery.min.js’, array(), $ver );

    wp_enqueue_script( ‘bootstrapjs’, get_template_directory_uri() . ‘/js/bootstrap.min.js’, array(), $ver );

    wp_enqueue_script( ‘bootstrapjsselect’, get_template_directory_uri() . ‘/js/bootstrap-select.js’, array(), $ver ,true);

    //wp_enqueue_script( ‘moment’, get_template_directory_uri() . ‘/includes/js/moment-with-locales.js’, array(), $ver ,true);

    //wp_enqueue_script( ‘timedate’, get_template_directory_uri() . ‘/includes/js/bootstrap-datetimepicker.js’, array(), $ver ,true);

    // Registering Scripts

    wp_register_script(‘jquery-validation-plugin’, get_template_directory_uri() .’/js/jquery.validate.min.js’, array(),$ver,true);

    wp_enqueue_script(‘jquery-validation-plugin’);

    Plugin Author Denis Ryabov

    (@dryabov)

    The notice about undefined variable ver is not related to the PageSpeed Ninja plugin. It just means that there should be a line $ver = ‘some value’; somewhere inside of functions.php (maybe it is commented out, it is hard to say having a piece of the file only).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Server error’ is closed to new replies.