Articles of fatal error

PHP error when trying to upload .mp3 files via Media Library

When I’m trying to upload a sound file (mostly .mp3’s) via the media library, I get the following errors: Warning: require(/path/to/website/wp-includes/ID3/getid3.php): failed to open stream: No such file or directory in /path/to/website/wp-admin/includes/media.php on line 2997 Fatal error: require(): Failed opening required ‘/path/to/website/wp-includes/ID3/getid3.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /path/to/website/wp-admin/includes/media.php on line 2997 First I thought there is a permission […]

Fatal error: Uncaught Error: Call to undefined function do_action_ref_array() when using wp_signon function

I am newbee to web development,since last few days i am struggling to login through php code. My PHP code is as follow //my php code @include_once ‘../wp-includes/user.php’; $creds = array( ‘user_login’ => ‘abc’, ‘user_password’ => ‘abc’, ‘rememember’ => false ); $user = wp_signon( $creds, 0 ); if ( is_wp_error($user) ) echo $user->get_error_message(); when the […]

PHP Helper Class to create shortcodes

I created a helper class to extend other classes for shortcodes. When I try to use $this in the add_shortcode() function I’m getting this error: Using $this when not in object context How can I solve this? Code below: Parent Class //shortcode-helper.php abstract class ShortcodeHelper { private $post_name_id; private $short_code_name; /** * ShortcodeHelper constructor. * […]

Specify multiple categories for custom post template – FATAL ERROR

I am using this code below to specify a post template for a specific category in my functions.php file. function get_custom_cat_template($single_template) { global $post; if ( in_category( ‘ms-conversations’ )) { $single_template = dirname( __FILE__ ) . ‘/CUSTOM-POST-BLOG-POST.php’; } return $single_template; } add_filter( “single_template”, “get_custom_cat_template” ) ; The code technically works, however I need to specify […]

My site is not working because of this: Fatal error: Cannot redeclare be_themes_contact_authentication

I´m trying to update some plugins. Sudenly this message was on my site: Fatal error: Cannot redeclare be_themes_contact_authentication() (previously declared in /home/content/24/11734224/html/wp-content/plugins/be-page-builder/functions/be-pb-ajax-handler.php:12) in /home/content/24/11734224/html/wp-content/themes/oshin/ajax-handler.php on line 41 Now i can not get in the site, admin, or nothing. How can I fixit?

White screen after a couple hours?

I get a white screen after a couple hours of my site working fine. I get the following error: Fatal error: Call to undefined function of_get_option() in /home/talg/public_html/wp-content/themes/avanter/header.php on line 19 I am still able to access the backend portion of the site. I have tried to install a theme update blocker but have had […]

Error using wp_mail inside custom function

I have this function that sends various emails for me: function tps_send_email($emailTo, $subject, $content) { //Allow HTML in email function tps_set_html_email_content_type() { return ‘text/html’; } add_filter( ‘wp_mail_content_type’, ‘tps_set_html_email_content_type’ ); //Send the email $mailSent = wp_mail($emailTo, $subject, $content); //Reset HTML content type back to text only (avoids conflicts) remove_filter( ‘wp_mail_content_type’, ‘tps_set_html_email_content_type’ ); return $mailSent; } I […]

Wp Enviroment problem with included file

i have a file i am including across site to index.php, single.php etc. This file behaves really strage and acts like it not part of wordpress Enviroment meaning: i get errors on get_bloginfo(‘template_url’) and it won’t get the values from my options page. Any idea what this might happen? Here is the include code i […]

Allowed memory size exhausted. WordPress side solution

I’m getting a well known error from the question title. The problem is, website is running on a shared server and I don’t have access to php.ini file. I’ve set `php_value memory_limit‘ inside .htaccess to higher value. I’ve set WP_MEMORY_LIMIT inside wp_config.php to higher value. phpinfo() says that max_execution_time is set to 30 and safe_mode […]

Fatal error: Cannot redeclare admin_notice()

I’m writing a plugin, most of my code is wrapped in classes, except for an admin_notice fallback function that I call when I am not loading the main plugin class: class MyClass { //Main plugin class } if ( $check = true ) { $myClass = new MyClass(); } else { add_action( ‘admin_notices’, ‘admin_notice’ ); […]