2. Is there some way to stop the CRON from sending an email when it generates PHP warnings? I would like to hear if the CRON generates a more serious error.
Here is the error:
PHP Warning:? Trying to access array offset on value of type null in /home/dh_hxn249/rainsnap.org/wp-content/themes/parabola/includes/theme-setup.php on line 57 PHP Warning:? Trying to access array offset on value of type null in /home/dh_hxn249/rainsnap.org/wp-content/themes/parabola/includes/theme-setup.php on line 101 PHP Warning:? Undefined array key “parabola_totalSize” in /home/dh_hxn249/rainsnap.org/wp-content/themes/parabola/includes/theme-setup.php on line 103 PHP Warning:? Undefined array key “parabola_fpsliderwidth” in /home/dh_hxn249/rainsnap.org/wp-content/themes/parabola/includes/theme-setup.php on line 105 PHP Warning:? Undefined array key “parabola_fpsliderheight” in /home/dh_hxn249/rainsnap.org/wp-content/themes/parabola/includes/theme-setup.php on line 105 PHP Warning:? Undefined array key “parabola_colimagewidth” in /home/dh_hxn249/rainsnap.org/wp-content/themes/parabola/includes/theme-setup.php on line 106 PHP Warning:? Undefined array key “parabola_colimageheight” in /home/dh_hxn249/rainsnap.org/wp-content/themes/parabola/includes/theme-setup.php on line 106 PHP Warning:? Undefined array key “parabola_totalSize” in /home/dh_hxn249/rainsnap.org/wp-content/themes/parabola/includes/theme-setup.php on line 112 PHP Warning:? Undefined array key “parabola_sidewidth” in /home/dh_hxn249/rainsnap.org/wp-content/themes/parabola/includes/theme-setup.php on line 320 PHP Warning:? Undefined array key “parabola_sidebar” in /home/dh_hxn249/rainsnap.org/wp-content/themes/parabola/includes/theme-setup.php on line 320 PHP Warning:? Undefined array key “parabola_nrcolumns” in /home/dh_hxn249/rainsnap.org/wp-content/themes/parabola/includes/theme-setup.php on line 322 PHP Warning:? Undefined array key “parabola_colimageheight” in /home/dh_hxn249/rainsnap.org/wp-content/themes/parabola/includes/theme-setup.php on line 331
]]>I’m loading wp-load.php outside wordpress and with the plugin I get redirected to homepage.
How can I use the plugin and not be redirect?
Thanks
]]>
PHP Fatal error: require(): Failed opening required '../../../../wp-load.php' (include_path='.:/usr/share/php') in /srv/www/example.com/releases/20211224140010/web/app/plugins/wp-piwik/proxy/config.php on line 3" while reading response header from upstream
One reason could be that different paths are used for core, plugins, themes, etc. – but this shouldn’t be an issue. This plugin probably has this path hardcoded instead of retrieving it using the proper WordPress function:
$wpRootDir = isset($wpRootDir)?$wpRootDir:'../../../../';
require ($wpRootDir.'wp-load.php');
]]>I am loading WordPress in an external PHP file (will be run via CLI). WordPress loading:
require_once("../../../wp-load.php");
When the external file is run it returns the following error:
PHP Fatal error: Uncaught Error:
Class 'Cyr_To_Lat\Main' not found in
/pathtowp/wp-content/plugins/cyr2lat/cyr-to-lat.php:88
When the plugin is deactivated WordPress loads fine without any errors. Any possible solutions? If need any clarification, please ask!
Version 5.0.0
]]>Fatal error: Uncaught Error: Call to undefined function wp() in /home1/biolab11/public_html/wp-blog-header.php:16 Stack trace: #0 /home1/biolab11/public_html/index.php(17): require() #1 {main} thrown in /home1/biolab11/public_html/wp-blog-header.php on line 16
Now try everything, reinstall Wordprees clean but without deleting (WP-CONFIG.PHP) (WP-CONTENT) And it works again but after a few hours the same error comes out again, try removing all the Plugins and Themes and the same thing happens after a few hours, what I notice is that the content of (WP-LOAD is always erased .PHP) remains at 0.00B when uploading again only the WP-LOAD.PHP the website revives but after a few minutes the same error occurs from the sender start installing everything without the previous content and the same thing happens, install new Mql and The same thing continues, the ERROR_LOG file shows this error
[21-Jun-2020 14:49:44 America / Chicago] PHP Fatal error: Uncaught Error: Call to undefined function wp () in /home1/biolab11/public_html/wp-blog-header.php:16 Stack trace: # 0 /home1/biolab11/public_html/index.php(17): require () # 1 {main} thrown in /home1/biolab11/public_html/wp-blog-header.php on line 16 [21-Jun-2020 14: 50:23 America / Chicago] PHP Fatal error: Uncaught Error: Call to undefined function wp () in /home1/biolab11/public_html/wp-blog-header.php:16 Stack trace: # 0 / home1 / biolab11 / public_html / index.php (17): require () # 1 {main} thrown in /home1/biolab11/public_html/wp-blog-header.php on line 16
]]>I need to add a button in the edit post screen which allows the user to see all the post data in a print-friendly template.
It’s a custom post type with lots of custom fields.
The button is not a problem, I think I’ll add it to the admin bar.
The problem is with the custom template.
I’ll explain my possible solution but I think there are better methods.
I create a plugin with a custom PHP file with the “print-friendly” template and I call this file when I click on the button. I’ll pass the post ID in a URL parameter.
So, the button link will be something like this: https://mywebsite.com/path/to/plugin/print-friendly.php?id=1234
When the user clicks on the button, a new tab opens with my print-friendly template and the post data. Then the user can print it using the browser print functionality.
The issue is that in my custom PHP file I can’t use the WordPress functions. I’ll need to include the “wp-load” file in order to do this.
I know that using a custom PHP file and the including “wp-load” is not a good thing to do.
Any advices?
]]>require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
global $wpdb, $user_ID;
echo $user_ID; // reruns 0, always
is_user_logged_in() // returns false, always
But I can check another one function will work. e.g. get_bloginfo('name')
Note: I can try to require_once( dirname( dirname( __FILE__ ) ) . '/wp-config.php' );
but results is same!
I have today installed WordPress as a CMS base. But I am not using WordPress for it’s theme, mostly for it’s user security. So I have created a “regular” php page, which starts with require(“wp-load.php”); in start to get access to wordpress functions. Which means I can develop the page/project anyway I want.
The thing is, I am including wise chat both with short code (do_shortcode(“[wise-chat]”):) and by using php directly (wise_chat();)
So the problem is, the buttons don’t work and I can’t chat or send messsages. If I go into wordpress and use the WP theme function I can do all things. Which made me compare the “view sourcecode” and found that somehow the WP theme includes some CSS and JavaScript code that is not automatically included in my themeless page.
So short question: What code is necessary for me to put in to make wise chat work?
]]>Showing posts from one blog is easy:
<?php
define(‘WP_USE_THEMES’, false);
require_once(‘a/wp-load.php’);
query_posts(‘posts_per_page=3’);
while (have_posts()): the_post();
… ?>
After this, how do I switch from blog a to blog b in the same script? Thanks.
]]>echo 'output_start'; $parse_uri = explode('wp-content', $_SERVER['SCRIPT_FILENAME']); require_once( $parse_uri[0] . 'wp-load.php' ); echo 'output_end';
This new behavior brakes the functionality if you use something like ZipArchive because by the output to the browser it pushes this two characters in front of the zip file and makes the archive unreadable.
Is there something I could do? Because until the output is repaired part of the functionality of my site is gone. Thanks for your help.
Greetings,
Manuel