[wp-trac] [WordPress Trac] #37060: wp-load.php wrong paths
WordPress Trac
noreply at wordpress.org
Thu Jun 9 05:01:11 UTC 2016
#37060: wp-load.php wrong paths
--------------------------+-----------------------------
Reporter: DuckDagobert | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.5.2
Severity: normal | Keywords:
Focuses: performance |
--------------------------+-----------------------------
Hey,
while debugging some other issue, I found a issue with WP core (I think).
I created a simple test file:
{{{#!php
<?php
$parse_uri = explode( 'assets', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp-load.php' );
?>
}}}
And straced it.
My wp install is in /var/www/vhosts/staging/
However in strace I would get a lot of:
lstat("/root/./abstracts/abstract-wc-widget.php", 0x7fffd1551960) = -1
ENOENT (No such file or directory)
lstat("/root/./admin/index.php", 0x7fffd1551e40) = -1 ENOENT (No such file
or directory)
lstat("/root/./class-wc-dependencies.php", 0x7fffd1551ce0) = -1 ENOENT (No
such file or directory)
lstat("/root/./includes/class-wc-embed.php", 0x7fffd15519e0) = -1 ENOENT
(No such file or directory)
Or:
lstat("/root/acceptance.php", 0x7fffd1552c90) = -1 ENOENT (No such file or
directory)
lstat("/root/akismet.php", 0x7fffd1552c90) = -1 ENOENT (No such file or
directory)
lstat("/root/checkbox.php", 0x7fffd1552c90) = -1 ENOENT (No such file or
directory)
lstat("/root/count.php", 0x7fffd1552c90) = -1 ENOENT (No such file or
directory)
Or:
lstat("/usr/share/php/admin/admin_functions.php", 0x7fffd1551b10) = -1
ENOENT (No such file or directory)
lstat("/usr/share/php/admin/index.php", 0x7fffd1551e40) = -1 ENOENT (No
such file or directory)
This is in no way a major thing, however I think it should be checked
where this comes from (especially since a couple plugins seem to hook in
some of the things and then use a is_file (whcih returns false & is
therefore uncached) which makes websites unnecessarily slow.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37060>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list