WordPress.org

Forums

P3 (Plugin Performance Profiler)
[resolved] Does not work on Windows (4 posts)

  1. umchal
    Member
    Posted 1 year ago #

    Hi,

    It seems the plugin does not work on Windows.

    I get this warning after performing Auto-Scan.

    Warning: fopen( .../wp-content/uploads\profiles\) [function.fopen]: failed to open stream: No such file or directory in ...\p3-profiler\classes\class.p3-profiler-reader.php on line 153

    The xdebug output indicates it tries to read a directory.

    I added

    if ( is_dir( $file ) ) {
    	return;
    }

    on line 152 in class.p3-profiler-reader.php. Then the warning has gone.

    After that, I went to the History tab and click on the view link of the last scan item. Then it gave the warning

    Warning: fopen(...wp-content/uploads\profiles\json) [function.fopen]: failed to open stream: No such file or directory in ...\wp-content\plugins\p3-profiler\classes\class.p3-profiler-reader.php on line 157

    I don't find a file of the name json in the profiles directory either. I see the .json file though.

    It would be nice if this plugin works on Windows servers.

    PHP 5.2.4
    WordPress 3.9.1
    Apache 2.2.23

    https://wordpress.org/plugins/p3-profiler/

  2. Kurt Payne
    Member
    Plugin Contributor

    Posted 1 year ago #

    You may be running into a problem where tick handing doesn't work on php 5.2 on windows.

    Warning
    register_tick_function() should not be used with threaded web server modules with PHP 5.2 or lower.

    http://us3.php.net/manual/en/function.register-tick-function.php

  3. umchal
    Member
    Posted 1 year ago #

    Indeed, if I switch the PHP version from 5.2.4 to 5.4.9, it works. Thank you.

    Is there any way to work around this in v5.2.4 as it is the minimum required version by WordPress?

  4. Kurt Payne
    Member
    Plugin Contributor

    Posted 1 year ago #

    Glad it's working now!

    There is no way to work around this, sadly, as it's much deeper in the php internals than we can go with userland code in plugins.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • P3 (Plugin Performance Profiler)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.