Our web works (frontend) but I can’t get into backend.
The error is:
PHP Warning: require_once(/home/vp2pnxmq/public_html/wp-load.php): failed to open stream: No such file or directory in /home/vp2pnxmq/public_html/wp-blog-header.php on line 13
PHP Fatal error: require_once(): Failed opening required '/home/vp2pnxmq/public_html/wp-load.php' (include_path='.:/opt/alt/php74/usr/share/pear') in /home/vp2pnxmq/public_html/wp-blog-header.php on line 13
My wp-blog-header.php is not empty. I have updated it with a new one with new content. As it doesn’t work i restored the old file.
The structure is multisite.
I have updated php version from 7.4 to 8.0.
Cache folder is empty.
My browser cache is empty.
Is it usual this problem with wp 6.1?.
THANK YOU VERY MUCH!!!
]]>Fatal error: Uncaught Error: Call to undefined function wp() in /home/su8tatj8zyjl/public_html/luxuryeveresthotel.com/wp-blog-header.php:16 Stack trace: #0 /home/su8tatj8zyjl/public_html/luxuryeveresthotel.com/index.php(17): require() #1 {main} thrown in /home/su8tatj8zyjl/public_html/luxuryeveresthotel.com/wp-blog-header.php on line 16
Please help me to resolve this issue…
Thanks in Advance!
]]>[18-Sep-2019 14:34:59 UTC] require('wp-blog-header.php'), wp, WP->main, WP->parse_request, do_action_ref_array('parse_request'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, rest_api_loaded, WP_REST_Server->serve_request, WP_REST_Server->dispatch, call_user_func, <strong>WPSEO</strong>_Statistics_Service->get_statistics, WPSEO_Statistics_Service->statistic_items, WPSEO_Statistics_Service->set_statistic_items_for_user, WPSEO_Statistics_Service->get_seo_scores_with_post_count, array_map, WPSEO_Statistics_Service->map_rank_to_widget, WPSEO_Statistics->get_post_count, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, mysqli_query, A_WordPress_Base_Url->cache_lookups, C_Photocrati_Transient_Manager::update, C_Photocrati_Transient_Manager->set, set_transient, update_option taraf?ndan olu?turulan SHOW FULL COLUMNS FROM
wp_optionssorgusu i?in WordPress veritaban? hatas? Commands out of sync; you can't run this command now
! ) Fatal error: Uncaught Error: Call to undefined function wp() in C:\wamp64\www\wordpress\wp-blog-header.php on line 16
( ! ) Error: Call to undefined function wp() in C:\wamp64\www\wordpress\wp-blog-header.php on line 16
Call Stack
1 Time:0.0001 Memory:398968 Function:{main}( ) Location:…\index.php:0
2 Time:0.0001 Memory:399256 Function:require( ‘C:\wamp64\www\wordpress\wp-blog-header.php’ ) Location:…\index.php:17
What should I do?
I really new on all of this
Thanks, anyway!!
]]>Something went wrong on Friday and we are stuggling to fix it.
We get a http error 500 everywhere and cannot log in to the dashboard.
I’ve tried manually disabling all plugins, renaming the theme we use (Melos Pro) and renaming the .htaccess file as per the advice I’ve found but am getting nowhere.
On the error log we get:
PHP Fatal error: require(): Failed opening required ‘/home/sites/gagah.co.uk/public_html/AAA/wp-blog-header.php’ (include_path=’.:/usr/share/pear53:/usr/share/php:/usr/share/ZendFramework’) in /home/sites/gagah.co.uk/public_html/index.php on line 17: /home/sites/gagah.co.uk/public_html/index.php
Does anyone have any advice? I am floundering around desperately trying to avoid losing all my recent work if we resort to using a back up tomorrow.
Nobody claims to have run any updates, we’ve just been adding page content.
]]>I’m having a repeat issue with my blog at www.bottlesandchains.com
My dashboard is working with no issues, but the site just doesn’t show up. I’ve done a fresh re-install, deleted and de-activated all themes and plugins, but still no luck.
My error log is showing the following:
[17-Jul-2016 02:06:23 America/Chicago] PHP Warning: require(/home/aetheus/public_html/bottlesandchains/wp-blog-header.php): failed to open stream: No such file or directory in /home/aetheus/public_html/bottlesandchains/index.php on line 17
[17-Jul-2016 02:06:23 America/Chicago] PHP Fatal error: require(): Failed opening required '/home/aetheus/public_html/bottlesandchains/wp-blog-header.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/aetheus/public_html/bottlesandchains/index.php on line 17
My domain is set-up as an add-on domain, and hosted in a sub dir as you can see from the file location above. wp-blog-header.php is definitely there, and it’s permissions are set to 644 (I tried it with 755 but no change).
Super confused and lost, any help would be amazing. Thanks!
]]><head>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- marketing -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-3526791549033206"
data-ad-slot="4428464488"
data-ad-format="auto"></ins>
<script>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width">
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="https://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js"></script>
<![endif]-->
<?php wp_head(); ?>
</head>
]]>Sorry… I posted the original in the plugins & hacks group…
I am writing a plugin that has an non WP page in it to record votes in a database table and return JSON of the vote counts. I have spent the last few hours googling and can’t seem to figure out how to get get_current_user_id() to return anything but 0 in an external PHP file
The offending code is:
define('WP_USE_THEMES', false);
require( $_SERVER['DOCUMENT_ROOT'].'/test/wp-blog-header.php' );
do_action( 'login_init' );
$user_id=get_current_user_id();
echo $user_id;
this displays 0
I tried it with:
require( $_SERVER['DOCUMENT_ROOT'].'/test/wp-load.php' );
$user_id=get_current_user_id();
echo $user_id;
and get the same result – 0.
I have a shortcode that works fine in a WP created page, but in my custom page do_shortcode( ‘[custom-shortcode]’ ); displays 0 as the $user_id.
All other WP functions appear to be working – get_site_url works and I have access to other php files in my plugin that use $wpdb and they all work…
My WP install is in the test/ directory under my main site – hence the ‘/test/’ in the require statements. The PHP file in question is in the root of the plugin directory.
There has got to be something simple I am missing – any ideas?
Full page code – (obviously there is more output than just JSON – I’m trying to get the user issue figured out…):
<?php
/*
vote.php
*/
define('WP_USE_THEMES', false);
require( $_SERVER['DOCUMENT_ROOT'].'/test/wp-blog-header.php' ); //tried this with wp-load.php too
do_action( 'login_init' );
$_SESSION['key'] = "jkshdfkjhdsfjkhaksdfkjsahfjkdbfbudsfbvjhbvjhbrukbuhbvjkhfbvjs"; //purposely set for testing
$post_id = $_GET['id']; //get post_id (SHOULD BE FROM QUERY STRING)
echo "post_id:{$post_id}<br>";
$url_session = $_GET['key']; //get session key from URL
echo "url session:{$url_session}<br>";
$session_id = $_SESSION['key']; //get session id
echo "session ID:{$session_id}<br>";
$user_id = get_current_user_id(); //get current logged in user
echo "user_id:{$user_id}<br>";
$vote = $_GET['vote']; //get vote from query string
echo "vote:{$vote}<br>";
echo "site url:" . get_site_url() . "<br>";
echo "referrer:". $_SERVER['HTTP_REFERER'] . "<br>";
$error = 0; //set error count to 0
$error = ( FALSE !== get_post_status( $post_id ) ? $error : $error + 1 ); //check to see if post exists
echo "error after post status check:{$error}<br>";
$error = ( $user_id != 0 ? $error : $error + 1 ); //check to see if user logged in
echo "error after userid check:{$error}<br>";
$error = ( $url_session == $session_id ? $error : $error + 1 ); //check to see if session is valid
echo "error after session check:{$error}<br>";
$error = ( strpos("read_it,skip_it", $vote ) !== false ? $error : $error + 1 ); //check to see if the vote is valid
echo "error after vote type check:{$error}<br>";
$error = ( FALSE !== strpos($_SERVER['HTTP_REFERER'], get_site_url()) ? $error : $error + 1 ); //check to url referrer
echo "error after referrer check:{$error}<br>";
if($error == 0){ //if all validity checks pass
$votes = record_postvotes($user_id, $post_id, 'skip_it'); //submit the vote and get return values
$output = "{\"votes\":[{\"ReadIt\":{$votes[0]['read_it']},\"SkipIt\":{$votes[0]['skip_it']}}]}";
} else {
$output = ''; //otherwise, return nothing
} //end error check
echo $output;
?>
]]>I am writing a plugin that has an non WP page in it to record votes in a database table and return JSON of the vote counts.
The offending code is:
define('WP_USE_THEMES', false);
require( $_SERVER['DOCUMENT_ROOT'].'/test/wp-blog-header.php' );
do_action( 'login_init' );
$user_id=get_current_user_id();
echo $user_id;
this displays 0
I tried it with:
require( $_SERVER['DOCUMENT_ROOT'].'/test/wp-load.php' );
$user_id=get_current_user_id();
echo $user_id;
and get the same result – 0.
I have a shortcode that uses get_current_user_id() in the same plugin folder and it works fine in a WP created page, but in my custom page do_shortcode( ‘[custom-shortcode]’ ); displays 0 for the $user_id.
All other WP functions appear to be working – get_site_url() works and I have access to other php files in my plugin that use $wpdb and that all work…
My WP install is in the test/ directory under my main site – hence the ‘/test/’ in the require statements. The PHP file in question is in the root of the plugin directory.
There has got to be something simple I am missing – any ideas?
Full page code – (obviously there is more output than just JSON – I’m trying to get the user issue figured out…):
<?php
/*
vote.php
*/
define('WP_USE_THEMES', false);
require( $_SERVER['DOCUMENT_ROOT'].'/test/wp-blog-header.php' ); //tried this with wp-load.php too
do_action( 'login_init' );
$_SESSION['key'] = "jkshdfkjhdsfjkhaksdfkjsahfjkdbfbudsfbvjhbvjhbrukbuhbvjkhfbvjs"; //purposely set for testing
$post_id = $_GET['id']; //get post_id (SHOULD BE FROM QUERY STRING)
echo "post_id:{$post_id}<br>";
$url_session = $_GET['key']; //get session key from URL
echo "url session:{$url_session}<br>";
$session_id = $_SESSION['key']; //get session id
echo "session ID:{$session_id}<br>";
$user_id = get_current_user_id(); //get current logged in user
echo "user_id:{$user_id}<br>";
$vote = $_GET['vote']; //get vote from query string
echo "vote:{$vote}<br>";
echo "site url:" . get_site_url() . "<br>";
echo "referrer:". $_SERVER['HTTP_REFERER'] . "<br>";
$error = 0; //set error count to 0
$error = ( FALSE !== get_post_status( $post_id ) ? $error : $error + 1 ); //check to see if post exists
echo "error after post status check:{$error}<br>";
$error = ( $user_id != 0 ? $error : $error + 1 ); //check to see if user logged in
echo "error after userid check:{$error}<br>";
$error = ( $url_session == $session_id ? $error : $error + 1 ); //check to see if session is valid
echo "error after session check:{$error}<br>";
$error = ( strpos("read_it,skip_it", $vote ) !== false ? $error : $error + 1 ); //check to see if the vote is valid
echo "error after vote type check:{$error}<br>";
$error = ( FALSE !== strpos($_SERVER['HTTP_REFERER'], get_site_url()) ? $error : $error + 1 ); //check to url referrer
echo "error after referrer check:{$error}<br>";
if($error == 0){ //if all validity checks pass
$votes = record_postvotes($user_id, $post_id, 'skip_it'); //submit the vote and get return values
$output = "{\"votes\":[{\"ReadIt\":{$votes[0]['read_it']},\"SkipIt\":{$votes[0]['skip_it']}}]}";
} else {
$output = ''; //otherwise, return nothing
} //end error check
echo $output;
?>
]]>