[13-Nov-2023 07:47:05 UTC] PHP Warning: Use of undefined constant ABSPATH – assumed ‘ABSPATH’ (this will throw an Error in a future version of PHP) in /home/[redacted]/public_html/wp-includes/blocks/index.php on line 8
[13-Nov-2023 07:47:05 UTC] PHP Warning: Use of undefined constant WPINC – assumed ‘WPINC’ (this will throw an Error in a future version of PHP) in /home/[redacted]/public_html/wp-includes/blocks/index.php on line 8
[13-Nov-2023 07:47:05 UTC] PHP Warning: require(ABSPATHWPINC/blocks/legacy-widget.php): failed to open stream: No such file or directory in /home/[redacted]/public_html/wp-includes/blocks/index.php on line 11
[13-Nov-2023 07:47:05 UTC] PHP Warning: require(ABSPATHWPINC/blocks/legacy-widget.php): failed to open stream: No such file or directory in /home/[redacted]/public_html/wp-includes/blocks/index.php on line 11
[13-Nov-2023 07:47:05 UTC] PHP Fatal error: require(): Failed opening required ‘ABSPATHWPINC/blocks/legacy-widget.php’ (include_path=’.:/opt/cpanel/ea-php74/root/usr/share/pear’) in /home/[redacted]/public_html/wp-includes/blocks/index.php on line 11
Looking at wp-includes/blocks/index.php I see at lines 8 – 13
define( 'BLOCKS_PATH', ABSPATH . WPINC . '/blocks/' );
// Include files required for core blocks registration.
require BLOCKS_PATH . 'legacy-widget.php';
require BLOCKS_PATH . 'widget-group.php';
require BLOCKS_PATH . 'require-dynamic-blocks.php';
Presumably the define at line 8 is wrong? But how to fix it?
]]>[08-Sep-2023 11:50:37 UTC] WordPress database error Deadlock error found when trying to get lock; try restarting transaction for query DELETE FROM wp_options
WHERE option_name
= ‘_transient_timeout_cmplz_shortcode_cookie-statement-eu’ made by require(‘wp-blog-header. php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/astra/search.php’), get_header, locate_template, load_template, require_once(‘/themes/astra/header. php’), wp_head, do_action(‘wp_head’), WP_Hook->do_action, WP_Hook->apply_filters, wp_enqueue_scripts, do_action(‘wp_enqueue_scripts’), WP_Hook->do_action, WP_Hook->apply_filters, cmplz_cookie_admin->enqueue_assets, CMPLZ_COOKIEBANNER->get_front_end_settings, cmplz_document->get_page_title, cmplz_document->get_shortcode_page_id, get_transient, delete_option
This error started generating since I updated WordPress and all plugins a few days ago.
Could someone help me?
]]>[08-Sep-2023 11:50:37 UTC] WordPress database error Deadlock error found when trying to get lock; try restarting transaction for query DELETE FROM wp_options
WHERE option_name
= ‘_transient_timeout_cmplz_shortcode_cookie-statement-eu’ made by require(‘wp-blog-header. php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/astra/search.php’), get_header, locate_template, load_template, require_once(‘/themes/astra/header. php’), wp_head, do_action(‘wp_head’), WP_Hook->do_action, WP_Hook->apply_filters, wp_enqueue_scripts, do_action(‘wp_enqueue_scripts’), WP_Hook->do_action, WP_Hook->apply_filters, cmplz_cookie_admin->enqueue_assets, CMPLZ_COOKIEBANNER->get_front_end_settings, cmplz_document->get_page_title, cmplz_document->get_shortcode_page_id, get_transient, delete_option
This error started generating since I updated WordPress and all plugins a few days ago.
Could someone help me?
]]>The issue with your site is a problem with the code:
[Tue Jul 05 13:14:08.278456 2022] [php7:warn] [pid 63638] [client 213.152.162.99:50546] PHP Warning: require_once(/var/www/heddacoconsulting.co.za/www/html/wp-includes/cache.php): failed to open stream: No such file or directory in /var/www/heddacoconsulting.co.za/www/html/wp-includes/load.php on line 716
[Tue Jul 05 13:14:08.279210 2022] [php7:error] [pid 63638] [client 213.152.162.99:50546] PHP Fatal error: require_once(): Failed opening required '/var/www/heddacoconsulting.co.za/www/html/wp-includes/cache.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/heddacoconsulting.co.za/www/html/wp-includes/load.php on line 716
The error message shows which line of code, in which file is as fault
I have downloaded the text file and this is what line 716 is about
require_once ABSPATH . WPINC . ‘/cache.php’;
Please assist if possible because I have no clue what needs to be done.
Regards
]]>Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
WordPress version 5.8
Current theme:Hestia Child (version 1.1.81.1531842836)
Current plugin: (version )
PHP version 7.4.21
Error Details
=============
An error of type E_PARSE was caused in line 3 of the file /var/www/html/library/new4/wp-content/themes/hestia-child/functions.php. Error message: syntax error, unexpected ''ABSPATH\' ) ) exit;
' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING)
Any idea on how to fix? Or can I ignore?
]]>What would be the reliable way to include files under the wp-admin
directory?
Normally, something like this would do the job.
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
However, some sites have unusual ABSPATH
value like wordpress.com (more info).
I thought of doing
require_once( dirname( WP_CONTENT_DIR ) . '/wp-admin/includes/class-wp-list-table.php' );
but there might be sites with a custom WP_CONTENT_DIR path then it might not work.
]]>I’m using Roots Bedrock version of WordPress (5.7.1) I’ve installed a fresh version of Form Maker and I’m getting this warning on the Form Maker admin page.
Warning: include_once(/home/vagrant/code/my-project/web/appwp-admin/includes/plugin.php): failed to open stream: No such file or directory in /home/vagrant/code/my-project/web/app/plugins/form-maker/form-maker.php on line 1597
Warning: include_once(): Failed opening '/home/vagrant/code/my-project/web/appwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in /home/vagrant/code/my-project/web/app/plugins/form-maker/form-maker.php on line 1597
After some debugging, it seems like the path is not being defined properly in /plugins/form-maker/form-maker.php
on line 151. It is using the WP_CONTENT_DIR
instead of the ABSPATH
– on Roots Bedrock WP_CONTENT_DIR
is defined as my-project/web/app
– if ABSPATH
is used, everything seems to run fine with no warning. Is this something which needs to be changed, can we always use ABSPATH
?
Please let me know if you need more info.
Thanks!
]]>For all eight sites, it displays:
Warning: Use of undefined constant ABSPATH – assumed ‘ABSPATH’ (this will throw an Error in a future version of PHP) in /shows-full-server-file-path-here/wp-settings.php on line 33
Warning: require(ABSPATHwp-includes/version.php): failed to open stream: No such file or directory in /shows-full-server-file-path-here/wp-settings.php on line 33
Fatal error: require(): Failed opening required ‘ABSPATHwp-includes/version.php’ (include_path=’.:/usr/lib/php7.4′) in /shows-full-server-file-path-here/wp-settings.php on line 33
This is the last section of wp-config.php for all sites:
/* 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’;
Line 33 of wp-settings.php shows:
require ABSPATH . WPINC . ‘/version.php’;
I’ve also tried various ways of turning off debugging with no success. I’m not very familiar with the code, so I’m not sure where else to look.
]]><?php
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if(is_plugin_active( 'plugin-directory/plugin.php' ) ){
do-something();
}?>
Does the first line (include_once …. ) allow the user to bypass the following security line that WordPress suggest to set at the beginning of every php plugin file?
<?php if ( ! defined( ‘ABSPATH’ ) ) exit;?>
if yes, how can I check in a secure way “in the fronthand” if a plugin is active?
]]>get_static_abspath requires a path and module. Received nextgen-gallery-pro/modules/nextgen_pro_thumbnail_grid/static/preview.jpg and
]]>