• Resolved worpressy

    (@worpressy)


    Hello,

    We are seeing on our error logs the following PHP Warning:

    PHP Warning:
    public_html/wp-content/litespeed/js/9e34ad64932c4eea8fff28d1130ef552.js): No such file or directory in public_html/wp-content/plugins/litespeed-cache/src/optimizer.cls.php on line 117

    Report number: RTOVQPFG

    Best regards,

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    were you doing something when this error shows up ? like if you have a pattern to reproduce it ?

    Best regards,

    Thread Starter worpressy

    (@worpressy)

    Hi @qtwrk

    Actually we tried a few things on our end to see if there was a way to triggered but could we not find it. The errors just show up at random.

    Here is another sample:

    2021-10-28 20:41:24.169112 [NOTICE] [25016] [T0] PHP Warning: unlink public_html/wp-content/litespeed/css/104cde2c74cc27668bb8d95b585f9327.css.tmp): No such file or directory in public_html/wp-content/plugins/litespeed-cache/src/optimizer.cls.php on line 121

    Best regards,

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Did you see directory /wp-content/litespeed/js/ or /wp-content/litespeed/css/ in your file manager ?

    if so , please try create a PHP file like test.php , with code

    <?php
    require( './wp-load.php' );
    $append = false ; 
    $file_name = WP_CONTENT_DIR . '/litespeed/js/test.js.tmp';
    file_put_contents( $file_name, 'test', $append ? FILE_APPEND : LOCK_EX );

    then access it by browser https://your_domain.com/test.php

    the page will be blank , then check if you see any error message in log , and if /wp-content/litespeed/js/test.js.tmp file being created or not

    Best regards,

    Thread Starter worpressy

    (@worpressy)

    Hi @qtwrk

    Created the PHP file, saw the blank page and yes a test.js.tmp was created as you said.

    Best regards,

    Plugin Support qtwrk

    (@qtwrk)

    this is so weird , I don’t see any immediate reason for it

    if you create a new wordpress site with cache plugin only on sub-directory , does this also happens ?

    this will help us to narrow down a bit where could be the issue come from

    Thread Starter worpressy

    (@worpressy)

    Hi @qtwrk

    I have made a request to the client as I need authorization from them to create what you have suggested, but in the meantime I was wondering the following….

    in every single case the error has this path:

    /wp-content/plugins/litespeed-cache/src/optimizer.cls.php

    We have in our .htaccess file the following rule and I was wondering if it could be that this is the root of the issue:

    RewriteCond %{REQUEST_URI} !^/wp-content/plugins/litespeed-cache/guest\.vary\.php
    RewriteCond %{REQUEST_URI} !^/wp-content/plugins/directory/to/exclude/
    RewriteRule wp-content/plugins/(.*\.php)$ – [R=404,L]

    Just taking a wild guess.

    Best regards.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    no , the rule is to deny access to wp-contet/plugins/xxxx to be 404 , should not have anything to do with this error

    but if you have some kind of security plugin , please try turn them off and see how it goes

    it could be the directory being denied read/write to other plugins

    Best regards,

    Thread Starter worpressy

    (@worpressy)

    Hi @qtwrk

    Thanks for the explanation. No we don’t have any security plugins.

    By the way, can you explain what does optimizer.cls.php actualy do so I have a better understanding?

    Thanks

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    you have a lot of rewrite rules in htaccess

    try remove them all , but only keep the WP default ones and LSCWP’s rules then try again

    that file is responsible for JS CSS optimization

    the error log you posted , was saying that the script can not remove/find the temp file it generated

    Best regards,

    Thread Starter worpressy

    (@worpressy)

    Hi @qtwrk

    Thank you so much for the explaining this, it really help us where and what to look for.

    Best regards,

    Thread Starter worpressy

    (@worpressy)

    Hi @qtwrk

    We have tried your suggestions but to no resolution.

    One of the biggest problem is that we don’t know how it gets triggered, so it’s hard to test when you don’t know the reason.

    The second problem is that it takes hours for the PHP error to show up, so when we try something we have to wait several hours to see if what we did actually worked.

    On retracing back about when this started taking place we found out that it was right after we installed LSMCD (LiteSpeed MemCacheD), maybe it has something to do with it, maybe not, we are just taking a wild guess here.

    Best regards,

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    hmmmm?

    I doubt if object cache will cause such issue , but please try turn off object cache, and see how it goes by then

    Best regards,

    Thread Starter worpressy

    (@worpressy)

    Hi @qtwrk

    We have been busy trying to figure this thing out and the more we look the worst it gets.

    I will be opening a separate support request for another problem we are having, but regarding this particular issue this is where we are.

    You were right, turning object cache off did not resolve the issue.

    So we cloned the site exactly as the original but with one major difference, we ran the site on Apache instead of using a Litespeed server (version 6.0.10) and the problem was resolved.

    It looks like this is a PHP error we are going to have to live with while using a Litespeed server.

    Best regards`

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘PHP Warning Error’ is closed to new replies.