Title: PHP errors related to Blocks
Last modified: December 22, 2022

---

# PHP errors related to Blocks

 *  [dcbuffalo](https://wordpress.org/support/users/dcbuffalo/)
 * (@dcbuffalo)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/)
 * I have several sites experiencing a similar batch of PHP errors directly related
   to Blocks (which I don’t even use) so I was hoping to get some solutions. For
   each of these sites, there are multiple instances of this error per day – sometimes
   just a couple, often many more.
 * 1) [https://www.justbuffalo.org](https://www.justbuffalo.org)
 *     ```
       [06-Dec-2021 02:45:11 America/Chicago] PHP Fatal error:  Uncaught Error: Undefined constant "ABSPATH" in /home/justbuffalo/public_html/wp-includes/blocks/index.php:9
       Stack trace:
       #0 {main}
         thrown in /home/justbuffalo/public_html/wp-includes/blocks/index.php on line 9
       ```
   
 * 2) [https://merrillartists.com](https://merrillartists.com)
 *     ```
       [05-Dec-2021 10:16:07 UTC] PHP Warning:  Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in /home/merrillartists/public_html/wp-includes/blocks/index.php on line 9
       [05-Dec-2021 10:16:07 UTC] PHP Warning:  Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in /home/merrillartists/public_html/wp-includes/blocks/index.php on line 9
       [05-Dec-2021 10:16:07 UTC] PHP Warning:  require(ABSPATHWPINC/blocks/archives.php): failed to open stream: No such file or directory in /home/merrillartists/public_html/wp-includes/blocks/index.php on line 9
       [05-Dec-2021 10:16:07 UTC] PHP Fatal error:  require(): Failed opening required 'ABSPATHWPINC/blocks/archives.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/merrillartists/public_html/wp-includes/blocks/index.php on line 9
       ```
   
 * [https://www.myqualityoptics.com](https://www.myqualityoptics.com)
 *     ```
       [06-Dec-2021 02:47:31 UTC] PHP Warning:  Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in /home/myqualityoptics/public_html/wp-includes/blocks/index.php on line 9
       [06-Dec-2021 02:47:31 UTC] PHP Warning:  Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in /home/myqualityoptics/public_html/wp-includes/blocks/index.php on line 9
       [06-Dec-2021 02:47:31 UTC] PHP Warning:  require(ABSPATHWPINC/blocks/archives.php): failed to open stream: No such file or directory in /home/myqualityoptics/public_html/wp-includes/blocks/index.php on line 9
       [06-Dec-2021 02:47:31 UTC] PHP Fatal error:  require(): Failed opening required 'ABSPATHWPINC/blocks/archives.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/myqualityoptics/public_html/wp-includes/blocks/index.php on line 9
       ```
   
 * [https://www.robinmorgan.net](https://www.robinmorgan.net)
 *     ```
       [05-Dec-2021 15:01:10 UTC] PHP Warning:  Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in /home/robinmorgan/public_html/wp-includes/blocks/index.php on line 9
       [05-Dec-2021 15:01:10 UTC] PHP Warning:  Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in /home/robinmorgan/public_html/wp-includes/blocks/index.php on line 9
       [05-Dec-2021 15:01:10 UTC] PHP Warning:  require(ABSPATHWPINC/blocks/archives.php): failed to open stream: No such file or directory in /home/robinmorgan/public_html/wp-includes/blocks/index.php on line 9
       [05-Dec-2021 15:01:10 UTC] PHP Fatal error:  require(): Failed opening required 'ABSPATHWPINC/blocks/archives.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/robinmorgan/public_html/wp-includes/blocks/index.php on line 9
       ```
   
 * [https://irespectmusic.org](https://irespectmusic.org)
 *     ```
       [07-Dec-2021 10:25:42 UTC] PHP Warning:  require(ABSPATHWPINC/blocks/archives.php): failed to open stream: No such file or directory in /home/bmdcirm/public_html/wp-includes/blocks/index.php on line 9
       [07-Dec-2021 10:25:42 UTC] PHP Warning:  require(ABSPATHWPINC/blocks/archives.php): failed to open stream: No such file or directory in /home/bmdcirm/public_html/wp-includes/blocks/index.php on line 9
       [07-Dec-2021 10:25:42 UTC] PHP Fatal error:  require(): Failed opening required 'ABSPATHWPINC/blocks/archives.php' (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in /home/bmdcirm/public_html/wp-includes/blocks/index.php on line 9
       ```
   
 * [https://www.ecrmusicgroup.com](https://www.ecrmusicgroup.com)
 *     ```
       [06-Dec-2021 19:52:18 UTC] PHP Fatal error:  Uncaught Error: Undefined constant "ABSPATH" in /home/ecrmg/public_html/wp-includes/blocks/index.php:9
       Stack trace:
       #0 {main}
         thrown in /home/ecrmg/public_html/wp-includes/blocks/index.php on line 9
       ```
   
 * [https://www.davidcloydmakesmusic.com](https://www.davidcloydmakesmusic.com)
 *     ```
       [05-Dec-2021 04:33:14 UTC] PHP Warning:  Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in /home/dcmusic/public_html/wp-includes/blocks/index.php on line 9
       [05-Dec-2021 04:33:14 UTC] PHP Warning:  Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in /home/dcmusic/public_html/wp-includes/blocks/index.php on line 9
       [05-Dec-2021 04:33:14 UTC] PHP Warning:  require(ABSPATHWPINC/blocks/archives.php): failed to open stream: No such file or directory in /home/dcmusic/public_html/wp-includes/blocks/index.php on line 9
       [05-Dec-2021 04:33:14 UTC] PHP Fatal error:  require(): Failed opening required 'ABSPATHWPINC/blocks/archives.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/dcmusic/public_html/wp-includes/blocks/index.php on line 9
       ```
   
 * [https://buffalomusicclub.com](https://buffalomusicclub.com)
 *     ```
       [04-Dec-2021 21:47:42 UTC] PHP Warning:  Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in /home/buffalomusicclub/public_html/wp-includes/blocks/index.php on line 9
       [04-Dec-2021 21:47:42 UTC] PHP Warning:  Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in /home/buffalomusicclub/public_html/wp-includes/blocks/index.php on line 9
       [04-Dec-2021 21:47:42 UTC] PHP Warning:  require(ABSPATHWPINC/blocks/archives.php): failed to open stream: No such file or directory in /home/buffalomusicclub/public_html/wp-includes/blocks/index.php on line 9
       [04-Dec-2021 21:47:42 UTC] PHP Fatal error:  require(): Failed opening required 'ABSPATHWPINC/blocks/archives.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/buffalomusicclub/public_html/wp-includes/blocks/index.php on line 9
       ```
   
    -  This topic was modified 4 years, 6 months ago by [dcbuffalo](https://wordpress.org/support/users/dcbuffalo/).

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

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/#post-15140311)
 * Please post some lines from your wp-config.php file around the part that defines“
   ABSPATH”…. this area:
 *     ```
       /* That's all, stop editing! Happy publishing. */
   
       /** Absolute path to the WordPress directory. */
       if ( ! defined( 'ABSPATH' ) ) {
               define( 'ABSPATH', dirname( __FILE__ ) . '/' );
       }
   
       /** Sets up WordPress vars and included files. */
       require_once( ABSPATH . 'wp-settings.php' );
       ```
   
 *  Thread Starter [dcbuffalo](https://wordpress.org/support/users/dcbuffalo/)
 * (@dcbuffalo)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/#post-15140625)
 * Thanks for responding! However, that code (or something very similar) is already
   included on all of these sites:
 * Variation 1:
 *     ```
       /** Absolute path to the WordPress directory. */
       if ( ! defined( 'ABSPATH' ) ) {
       	define( 'ABSPATH', __DIR__ . '/' );
       }
   
       /** Sets up WordPress vars and included files. */
       require_once ABSPATH . 'wp-settings.php';
       ```
   
 * Variation 2:
 *     ```
       /** Absolute path to the WordPress directory. */
       if ( !defined('ABSPATH') )
       	define('ABSPATH', dirname(__FILE__) . '/');
       /** Sets up WordPress vars and included files. */
       require_once(ABSPATH . 'wp-settings.php');
       ```
   
 * I went through and copied/pasted your code just to be sure. I will keep an eye
   on. the logs to see if the errors stop, but do you have any other ideas?
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/#post-15141105)
 * Maybe there’s a bad file somewhere. From UPDATES on the dashboard, click the 
   button to reinstall WP. That will make sure all files are correct.
 *  Thread Starter [dcbuffalo](https://wordpress.org/support/users/dcbuffalo/)
 * (@dcbuffalo)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/#post-15148159)
 * Reinstalled yesterday, emptied out the php error log, and it didn’t work. Fresh
   errors today:
 *     ```
       [09-Dec-2021 11:41:14 UTC] PHP Warning:  Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in /home/dcmusic/public_html/wp-includes/blocks/index.php on line 9
       [09-Dec-2021 11:41:14 UTC] PHP Warning:  Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in /home/dcmusic/public_html/wp-includes/blocks/index.php on line 9
       [09-Dec-2021 11:41:14 UTC] PHP Warning:  require(ABSPATHWPINC/blocks/archives.php): failed to open stream: No such file or directory in /home/dcmusic/public_html/wp-includes/blocks/index.php on line 9
       [09-Dec-2021 11:41:14 UTC] PHP Fatal error:  require(): Failed opening required 'ABSPATHWPINC/blocks/archives.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/dcmusic/public_html/wp-includes/blocks/index.php on line 9
       [09-Dec-2021 16:13:58 UTC] PHP Warning:  Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in /home/dcmusic/public_html/wp-includes/blocks/index.php on line 9
       [09-Dec-2021 16:13:58 UTC] PHP Warning:  Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in /home/dcmusic/public_html/wp-includes/blocks/index.php on line 9
       [09-Dec-2021 16:13:58 UTC] PHP Warning:  require(ABSPATHWPINC/blocks/archives.php): failed to open stream: No such file or directory in /home/dcmusic/public_html/wp-includes/blocks/index.php on line 9
       [09-Dec-2021 16:13:58 UTC] PHP Fatal error:  require(): Failed opening required 'ABSPATHWPINC/blocks/archives.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/dcmusic/public_html/wp-includes/blocks/index.php on line 9
       ```
   
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/#post-15148179)
 * 1. Go to TOOLS -> SITE HEALTH. Click the “info” tab, then the “copy to clipboard”
   button, and paste here.
 * 2. Maybe a funky plugin? Please disable all plugins and change to a “twenty” 
   theme. Do the errors go away? If so, then re-enable things one at a time until
   it breaks again.
 *  Thread Starter [dcbuffalo](https://wordpress.org/support/users/dcbuffalo/)
 * (@dcbuffalo)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/#post-15148455)
 *     ```
       ### wp-core ###
   
       version: 5.8.2
       site_language: en_US
       user_language: en_US
       timezone: +00:00
       permalink: /%postname%/
       https_status: true
       multisite: false
       user_registration: 1
       blog_public: 0
       default_comment_status: open
       environment_type: production
       user_count: 10
       dotorg_communication: true
   
       ### wp-paths-sizes ###
   
       wordpress_path: /home/dcmusic/public_html
       wordpress_size: 53.50 MB (56096571 bytes)
       uploads_path: /home/dcmusic/public_html/wp-content/uploads
       uploads_size: 120.61 MB (126464946 bytes)
       themes_path: /home/dcmusic/public_html/wp-content/themes
       themes_size: 48.88 MB (51254896 bytes)
       plugins_path: /home/dcmusic/public_html/wp-content/plugins
       plugins_size: 92.86 MB (97367294 bytes)
       database_size: 6.89 MB (7222017 bytes)
       total_size: 322.73 MB (338405724 bytes)
   
       ### wp-dropins (1) ###
   
       maintenance.php: true
   
       ### wp-active-theme ###
   
       name: David Cloyd Makes Music (david-cloyd-makes-music)
       version: 1.0.0
       author: Qode Interactive / David Cloyd
       author_website: http://www.qodethemes.com/
       parent_theme: Bridge (bridge)
       theme_features: core-block-patterns, BridgeQodeSidebar, widgets-block-editor, widgets, menus, post-formats, automatic-feed-links, post-thumbnails, title-tag
       theme_path: /home/dcmusic/public_html/wp-content/themes/david-cloyd-makes-music
       auto_update: Disabled
   
       ### wp-parent-theme ###
   
       name: Bridge (bridge)
       version: 28.5
       author: Qode Interactive
       author_website: http://qodethemes.com/
       theme_path: /home/dcmusic/public_html/wp-content/themes/bridge
       auto_update: Disabled
   
       ### wp-plugins-active (16) ###
   
       Bridge Core: version: 3.0.1, author: Qode, Auto-updates disabled
       Classic Editor: version: 1.6.2, author: WordPress Contributors, Auto-updates enabled
       Classic Widgets: version: 0.2, author: WordPress Contributors, Auto-updates enabled
       Contact Form 7: version: 5.5.3, author: Takayuki Miyoshi, Auto-updates enabled
       Contact Form CFDB7: version: 1.2.6.2, author: Arshid, Auto-updates enabled
       Content Control: version: 1.1.9, author: Code Atlantic, Auto-updates enabled
       Custom CSS and JavaScript: version: 2.0.11, author: Potent Plugins, Auto-updates enabled
       Easy Forms for Mailchimp: version: 6.8.5, author: YIKES, Inc., Auto-updates enabled
       Envato Market: version: 2.0.6, author: Envato, Auto-updates enabled
       MP3 Audio Player by Sonaar: version: 3.0, author: Sonaar Music, Auto-updates enabled
       Smush: version: 3.9.2, author: WPMU DEV, Auto-updates enabled
       Sucuri Security - Auditing, Malware Scanner and Hardening: version: 1.8.30, author: Sucuri Inc., Auto-updates enabled
       UpdraftPlus - Backup/Restore: version: 1.16.66, author: UpdraftPlus.Com, DavidAnderson, Auto-updates enabled
       User Registration: version: 2.0.5, author: WPEverest, Auto-updates enabled
       WPBakery Page Builder: version: 6.7.0, author: Michael M - WPBakery.com, Auto-updates disabled
       Yoast SEO: version: 17.7.1, author: Team Yoast, Auto-updates enabled
   
       ### wp-media ###
   
       image_editor: WP_Image_Editor_GD
       imagick_module_version: Not available
       imagemagick_version: Not available
       imagick_version: Not available
       file_uploads: File uploads is turned off
       post_max_size: 256M
       upload_max_filesize: 256M
       max_effective_size: 256 MB
       max_file_uploads: 20
       gd_version: bundled (2.1.0 compatible)
       gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
       ghostscript_version: 9.25
   
       ### wp-server ###
   
       server_architecture: Linux 3.10.0-1160.21.1.vz7.174.13 x86_64
       httpd_software: Apache
       php_version: 7.4.26 64bit
       php_sapi: fpm-fcgi
       max_input_variables: 5000
       time_limit: 300
       memory_limit: 256M
       max_input_time: 300
       upload_max_filesize: 256M
       php_post_max_size: 256M
       curl_version: 7.80.0 OpenSSL/1.1.1l
       suhosin: false
       imagick_availability: false
       pretty_permalinks: true
       htaccess_extra_rules: true
   
       ### wp-database ###
   
       extension: mysqli
       server_version: 10.2.41-MariaDB
       client_version: mysqlnd 7.4.26
   
       ### wp-constants ###
   
       WP_HOME: undefined
       WP_SITEURL: undefined
       WP_CONTENT_DIR: /home/dcmusic/public_html/wp-content
       WP_PLUGIN_DIR: /home/dcmusic/public_html/wp-content/plugins
       WP_MEMORY_LIMIT: 40M
       WP_MAX_MEMORY_LIMIT: 256M
       WP_DEBUG: false
       WP_DEBUG_DISPLAY: true
       WP_DEBUG_LOG: false
       SCRIPT_DEBUG: false
       WP_CACHE: false
       CONCATENATE_SCRIPTS: undefined
       COMPRESS_SCRIPTS: undefined
       COMPRESS_CSS: undefined
       WP_LOCAL_DEV: undefined
       DB_CHARSET: utf8
       DB_COLLATE: undefined
   
       ### wp-filesystem ###
   
       wordpress: writable
       wp-content: writable
       uploads: writable
       plugins: writable
       themes: writable
       ```
   
 * I don’t have time to do that testing at the moment, but I will get to it asap.
   Anything interesting in the site health info above?
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/#post-15148535)
 * Yeah, ABSPATH is definitely NOT defined. I’m going to see if I can get some other
   eyes on this as there’s a question I probably should have asked, but I don’t 
   know right now what it is. 🙂
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/#post-15148587)
 * Can we see the entire wp-config.php for one of the problem sites? Please XXX 
   out your DB password and the salt keys. We’re thinking that there’s some customization
   in the file (maybe from an automated installer?) that’s broken things.
 *  Thread Starter [dcbuffalo](https://wordpress.org/support/users/dcbuffalo/)
 * (@dcbuffalo)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/#post-15148631)
 * Here you go!
 *     ```
       <?php
       define('WP_AUTO_UPDATE_CORE', 'minor');// This setting is required to make sure that WordPress updates can be properly managed in WordPress Toolkit. Remove this line if this WordPress website is not managed by WordPress Toolkit anymore.
       /**
        * The base configuration for WordPress
        *
        * The wp-config.php creation script uses this file during the
        * installation. You don't have to use the web site, you can
        * copy this file to "wp-config.php" and fill in the values.
        *
        * This file contains the following configurations:
        *
        * * MySQL settings
        * * Secret keys
        * * Database table prefix
        * * ABSPATH
        *
        * @link https://codex.wordpress.org/Editing_wp-config.php
        *
        * @package WordPress
        */
       // ** MySQL settings ** //
       /** The name of the database for WordPress */
       define( 'DB_NAME', 'xxxxxx' );
       /** MySQL database username */
       define( 'DB_USER', 'xxxxxx' );
       /** MySQL database password */
       define( 'DB_PASSWORD', 'xxxxxxx' );
       /** MySQL hostname */
       define( 'DB_HOST', 'localhost' );
       /** Database Charset to use in creating database tables. */
       define( 'DB_CHARSET', 'utf8' );
       /** The Database Collate type. Don't change this if in doubt. */
       define( 'DB_COLLATE', '' );
       define('DISALLOW_FILE_EDIT', true);
       /**
        * Authentication Unique Keys and Salts.
        *
        * Change these to different unique phrases!
        * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
        * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
        *
        * @since 2.6.0
        */
       define('AUTH_KEY',          'x');
       define('SECURE_AUTH_KEY',   'x');
       define('LOGGED_IN_KEY',     'x');
       define('NONCE_KEY',         'x');
       define('AUTH_SALT',         'x');
       define('SECURE_AUTH_SALT',  'x');
       define('LOGGED_IN_SALT',    'x');
       define('NONCE_SALT',        'x');
       define( 'WP_CACHE_KEY_SALT', 'x' );
       /**
        * WordPress Database Table prefix.
        *
        * You can have multiple installations in one database if you give each
        * a unique prefix. Only numbers, letters, and underscores please!
        */
       $table_prefix = 'wp_';
   
       /* That's all, stop editing! Happy publishing. */
   
       /** Absolute path to the WordPress directory. */
       if ( ! defined( 'ABSPATH' ) ) {
               define( 'ABSPATH', dirname( __FILE__ ) . '/' );
       }
   
       /** Sets up WordPress vars and included files. */
       require_once( ABSPATH . 'wp-settings.php' );
       ```
   
    -  This reply was modified 4 years, 6 months ago by [dcbuffalo](https://wordpress.org/support/users/dcbuffalo/).
 *  Thread Starter [dcbuffalo](https://wordpress.org/support/users/dcbuffalo/)
 * (@dcbuffalo)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/#post-15167159)
 * Wondering if there are any more thoughts on this. I touched base with my hosting
   provider (InMotion Hosting) and they said that this was definitely a server issue,
   but a WordPress/Blocks issue that would require some kind of bug fix from them.
 *  [mrkawaii](https://wordpress.org/support/users/mrkawaii/)
 * (@mrkawaii)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/#post-15298307)
 * Hello, has there been any solution on this? Our sites are also experiencing the
   same issue
 *  [Cory Hughart](https://wordpress.org/support/users/cr0ybot/)
 * (@cr0ybot)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/#post-15609521)
 * This just looks to me like someone is attempting to access /wp-includes/blocks/
   index.php directly via their browser. Since there is no check for if ABSPATH 
   is defined at the top of the file, it results in an error.
 * See: [https://core.trac.wordpress.org/ticket/55067](https://core.trac.wordpress.org/ticket/55067)
    -  This reply was modified 4 years, 1 month ago by [Cory Hughart](https://wordpress.org/support/users/cr0ybot/).
      Reason: add trac ticket
 *  [reeper6868](https://wordpress.org/support/users/reeper6868/)
 * (@reeper6868)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/#post-15886789)
 * Hi,
    Experiencing similar php fatal errors. We have been diagnosing high CPU 
   spikes on our server from a particular site. Our caching plugin pointed us to
   files in wp-includes and admin. Comparing our server files with a fresh install
   of WP6.0.1. We found everything was the same, except these following extra files
   of error_logs in locations:
 * **wp-includes\blocks**
 * > `[03-Aug-2022 00:35:56 UTC] PHP Fatal error: require(): Failed opening required‘
   > ABSPATHWPINC/blocks/archives.php’ (include_path=’.:/opt/cpanel/ea-php74/root/
   > usr/share/pear’) in /wp-includes/blocks/index.php on line 9
   >  [03-Aug-2022 12:
   > 21:47 UTC] PHP Warning: Use of undefined constant ABSPATH – assumed ‘ABSPATH’(
   > this will throw an Error in a future version of PHP) in /wp-includes/blocks/
   > index.php on line 9 [03-Aug-2022 12:21:47 UTC] PHP Warning: Use of undefined
   > constant WPINC – assumed ‘WPINC’ (this will throw an Error in a future version
   > of PHP) in /wp-includes/blocks/index.php on line 9 [03-Aug-2022 12:21:47 UTC]
   > PHP Warning: require(ABSPATHWPINC/blocks/archives.php): failed to open stream:
   > No such file or directory in /wp-includes/blocks/index.php on line 9 [03-Aug-
   > 2022 12:21:47 UTC] PHP Fatal error: require(): Failed opening required ‘ABSPATHWPINC/
   > blocks/archives.php’ (include_path=’.:/opt/cpanel/ea-php74/root/usr/share/pear’)
   > in /wp-includes/blocks/index.php on line 9`
   > >  They look similar to the orginal posters with extra ‘Use of undefined constant
   > > WPINC’
   > >  **wp-includes\blocks**
   > > > `[03-Aug-2022 12:20:25 UTC] PHP Warning: Use of undefined constant ABSPATH–
   > > > assumed ‘ABSPATH’ (this will throw an Error in a future version of PHP)
   > > > in /wp-includes/class-wp-http.php on line 11
   > > >  [03-Aug-2022 12:20:25 UTC]
   > > > PHP Warning: Use of undefined constant WPINC – assumed ‘WPINC’ (this will
   > > > throw an Error in a future version of PHP) in /wp-includes/class-wp-http.
   > > > php on line 11 [03-Aug-2022 12:20:25 UTC] PHP Warning: require(ABSPATHWPINC/
   > > > class-requests.php): failed to open stream: No such file or directory in/
   > > > wp-includes/class-wp-http.php on line 11 [03-Aug-2022 12:20:25 UTC] PHP
   > > > Fatal error: require(): Failed opening required ‘ABSPATHWPINC/class-requests.
   > > > php’ (include_path=’.:/opt/cpanel/ea-php74/root/usr/share/pear’) in /wp-
   > > > includes/class-wp-http.php on line 11 [03-Aug-2022 12:20:53 UTC] PHP Fatal
   > > > error: Uncaught Error: Call to undefined function get_the_block_template_html()
   > > > in /wp-includes/template-canvas.php:12 Stack trace: #0 {main} thrown in/
   > > > wp-includes/template-canvas.php on line 12`
   > > And we have one in widgets as well
   > >  **wp-includes\widgets**
   > > > [03-Aug-2022 13:55:04 UTC] PHP Fatal error: Uncaught Error: Class ‘WP_Widget’
   > > > not found in /wp-includes/widgets/class-wp-widget-block.php:17
   > > >  Stack trace:#
   > > > 0 {main} thrown in /wp-includes/widgets/class-wp-widget-block.php on line
   > > > 17
   > > Has anyone tried
   > > > See: [https://core.trac.wordpress.org/ticket/55067](https://core.trac.wordpress.org/ticket/55067)
   > > from the above post from [@cr0ybot](https://wordpress.org/support/users/cr0ybot/)?
   > > 
   > > Please advise if it works as a temperory fix to implement. Thank you in advace

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

The topic ‘PHP errors related to Blocks’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 9 participants
 * Last reply from: [reeper6868](https://wordpress.org/support/users/reeper6868/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/php-errors-related-to-blocks/#post-15886789)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
