Title: php error warnings
Last modified: August 25, 2022

---

# php error warnings

 *  Resolved [francoc30](https://wordpress.org/support/users/francoc30/)
 * (@francoc30)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-error-warnings/)
 * Hi,
    After I ran cache preload, I noticed a new bunch of php warnings in additional
   to the usual ones. I am on ver 3.2.3.
 * I used to see many of this:
    20220824T221056: ccpst.com/index.php PHP Warning:
   mkdir(): File exists in /serverpath/public_html/test/wp-content/plugins/wp-optimize/
   cache/file-based-page-cache-functions.php on line 119
 * But now I see many of these in addition:
    PHP Warning: First parameter must either
   be an object or the name of an existing class in /serverpath/public_html/test/
   wp-content/plugins/wp-optimize/templates/minify/cached-file-log.php on line 9
 * I know they are just warnings, but something is not right. Can you look into 
   these and resolve it? Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-error-warnings/#post-15951627)
 * [@francoc30](https://wordpress.org/support/users/francoc30/)
 * I’ll report this issue to our development team for further investigation and 
   check if this can be fixed in next release.
 * Until then if you are seeing the warnnings in screen, Could you please edit wp-
   config.php file and
 * Replace
 * `define('WP_DEBUG', false);`
 * with this:
 *     ```
       ini_set('log_errors','On');
   
       ini_set('display_errors','Off');
   
       ini_set('error_reporting', E_ALL );
   
       define('WP_DEBUG', false);
   
       define('WP_DEBUG_LOG', true);
   
       define('WP_DEBUG_DISPLAY', false);
       ```
   
 * Let us know if replacing with the above lines the warnings goes away?
 *  Thread Starter [francoc30](https://wordpress.org/support/users/francoc30/)
 * (@francoc30)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-error-warnings/#post-15953335)
 * Hi [@bornforphp](https://wordpress.org/support/users/bornforphp/),
    The warning
   messages I quoted were written into the php error log on the server. They did
   not show on the front end or dashboard. Is it then still need to change wp-config.
   php file as you suggested?
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-warnings/#post-15957339)
 * [@francoc30](https://wordpress.org/support/users/francoc30/) No in this case 
   you don’t need to edit wp-config.php file, We’ll try to repsoduce the issue on
   our side and check if we get the same error on our installation.
 *  Thread Starter [francoc30](https://wordpress.org/support/users/francoc30/)
 * (@francoc30)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-warnings/#post-15957433)
 * Thanks.
    Please update here what you find?
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-warnings/#post-15957996)
 * [@francoc30](https://wordpress.org/support/users/francoc30/) Sure thing, we will
   keep you posted
 *  Plugin Contributor [Venkat Raj](https://wordpress.org/support/users/webulous/)
 * (@webulous)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-warnings/#post-16012185)
 * [@francoc30](https://wordpress.org/support/users/francoc30/) Could you please
   post the content of `*.json` file in the `wp-content/cache/wpo-minify/xxxxx/assets/*.
   json` to fix the 2nd warning you have mentioned?
 * Also, the 1st warning seems impossible to happen, because just before the line`
   mkdir` we make sure the dir doesn’t exists. Perhaps you have trigger the preload
   multiple times?
 *  Thread Starter [francoc30](https://wordpress.org/support/users/francoc30/)
 * (@francoc30)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-warnings/#post-16014830)
 * Hi [@webulous](https://wordpress.org/support/users/webulous/),
    There are many
   json files. Not sure which one is relevant. Below is one at the bottom of the
   list. If this is not what you want, let me know which one I should quote.
 * {“header”:”PROCESSED on Tue, 13 Sep 2022 14:43:59 +0000 from https:\/\/ccpst.
   com\/ngg_tag\/2020q3-open-winners-a\/?category=21%2C20%2C23%2C22%2C19%2C42%2C55&
   mo=6&yr=2021″,”files”:{“jquery-core”:{“url”:”\/wp-includes\/js\/jquery\/jquery.
   min.js”,”success”:true},”jquery-migrate”:{“url”:”\/wp-includes\/js\/jquery\/jquery-
   migrate.min.js”,”success”:true}}}
 * As for the mkdir() warning, I did not click Preload more than once. Yet this 
   warning occurs multiple times during the course of preload. As usual there is
   always a message pops up saying An unexpected response is received . . . I have
   to click OK to dismiss it. Not sure if this is related to the mkdir() warning.
 *  Plugin Contributor [Venkat Raj](https://wordpress.org/support/users/webulous/)
 * (@webulous)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-warnings/#post-16016286)
 * HI [@francoc30](https://wordpress.org/support/users/francoc30/)
 * Thanks for the info. The `files` section of this json has enqueued javascripts’s
   handle, url, etc What I’m looking for is some strange data in this section. Only
   that can trigger this warning
 * `PHP Warning: First parameter must either be an object or the name of an existing
   class in /serverpath/public_html/test/wp-content/plugins/wp-optimize/templates/
   minify/cached-file-log.php on line 9`
 * Regarding `mkdir` warning, it won’t happen even if you clicked preload twice,
   but can happen if someone else is also preloading at the same time you do. Or
   may be you have scheduled preload which is about to run when you manually click
   preload.
 * What I’m saying is Two PHP processes running at the same time where one is created
   the directory and other one is throwing warning when it is also trying to create
   the (already created) directory
 *  Thread Starter [francoc30](https://wordpress.org/support/users/francoc30/)
 * (@francoc30)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-warnings/#post-16017178)
 * The PHP Warning: First parameter must either be an object or the . . . was from
   Aug 24. Those minify files do not exist anymore. I don’t keep them for too long.
   So I can’t provide any for you, if that is what you are looking for.
 * As for the mkdir warning, I have not set up schedule preload and a second preload
   was not ran simultaneously. I am the only person running it. This warning happens
   every single time when I manually run preload. Also it always trigger a dialog
   box that An unexpected response is received. This dialogue box issue has been
   reported to support many times by different users.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘php error warnings’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [francoc30](https://wordpress.org/support/users/francoc30/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/php-error-warnings/#post-16017178)
 * Status: resolved