Title: Custom Plugin Fatal errors
Last modified: August 20, 2016

---

# Custom Plugin Fatal errors

 *  Resolved [420DankStank](https://wordpress.org/support/users/420dankstank/)
 * (@420dankstank)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/custom-plugin-fatal-errors/)
 * I had a custom plugin created, but the creator wont get back to me since the 
   plugin is not working.
 * The website is [http://www.washingtonstatecannabis.org/patient-verification/](http://www.washingtonstatecannabis.org/patient-verification/)
 * The front end seems ok. In the backend, on the plugin admin page, it will not
   load a form to enter new data. Nor can I edit data that is already entered.
 * I looked at the script.error_log ; This is what I got:
 *     ```
       PHP Notice:  Use of undefined constant DB_USER - assumed 'DB_USER' in /usr/home/wash20/www/htdocs/wp-includes/wp-includes/wp-db.php on line 1592
       PHP Notice:  Use of undefined constant DB_PASSWORD - assumed 'DB_PASSWORD' in /usr/home/wash20/www/htdocs/wp-includes/wp-includes/wp-db.php on line 1592
       PHP Notice:  Use of undefined constant DB_NAME - assumed 'DB_NAME' in /usr/home/wash20/www/htdocs/wp-includes/wp-includes/wp-db.php on line 1592
       PHP Notice:  Use of undefined constant DB_HOST - assumed 'DB_HOST' in /usr/home/wash20/www/htdocs/wp-includes/wp-includes/wp-db.php on line 1592
       PHP Notice:  Use of undefined constant WP_DEBUG - assumed 'WP_DEBUG' in /usr/home/wash20/www/htdocs/wp-includes/wp-includes/wp-db.php on line 502
       PHP Fatal error:  Call to undefined function is_multisite() in /usr/home/wash20/www/htdocs/wp-includes/wp-includes/wp-db.php on line 505
       PHP Fatal error:  Call to undefined function _deprecated_file() in /usr/home/wash20/www/htdocs/wp-includes/class-snoopy.php on line 6
       PHP Fatal error:  Class 'SpellChecker' not found in /usr/home/wash20/www/htdocs/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php on line 10
       PHP Fatal error:  Call to undefined function add_action() in /usr/home/wash20/www/htdocs/wp-includes/theme.php on line 1170
       PHP Fatal error:  Call to undefined function add_action() in /usr/home/wash20/www/htdocs/wp-includes/taxonomy.php on line 100
       PHP Fatal error:  Call to undefined function feed_content_type() in /usr/home/wash20/www/htdocs/wp-includes/feed-atom.php on line 8
       PHP Fatal error:  Call to undefined function add_shortcode() in /usr/home/wash20/www/htdocs/wp-includes/media.php on line 707
       PHP Fatal error:  Class 'Walker' not found in /usr/home/wash20/www/htdocs/wp-includes/post-template.php on line 974
       PHP Fatal error:  Call to undefined function add_filter() in /usr/home/wash20/www/htdocs/wp-includes/user.php on line 72
       PHP
       ```
   
 * I’ve tried going in to put ‘quote’ marks around the db_user, etc. However, that
   did nothing. I tried downloading the newest version of WP and copying the wp_setting.
   php and the vars.php files over, and that completely erased the site, and added
   more errors.
 * Now my errors_log still has the errors listed above, but also:
 *     ```
       Fatal error:  Call to undefined function _deprecated_file() in /usr/home/wash20/www/htdocs/wp-includes/wp-includes/theme-compat/comments-popup.php on line 10
       PHP Warning:  require(/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php) [</a><a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required '/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php' (include_path='.:/usr/local/php5/lib/php') in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Warning:  require(/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required '/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php' (include_path='.:/usr/local/php5/lib/php') in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Warning:  require(/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required '/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php' (include_path='.:/usr/local/php5/lib/php') in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Warning:  require(/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required '/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php' (include_path='.:/usr/local/php5/lib/php') in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Warning:  require(/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required '/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php' (include_path='.:/usr/local/php5/lib/php') in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Warning:  require(/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required '/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php' (include_path='.:/usr/local/php5/lib/php') in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Warning:  require(/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required '/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php' (include_path='.:/usr/local/php5/lib/php') in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Warning:  require(/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required '/usr/home/wash20/www/htdocs/wp-includes/class-wp-theme.php' (include_path='.:/usr/local/php5/lib/php') in /usr/home/wash20/www/htdocs/wp-settings.php on line 115
       ```
   
 * I’ve since removed my changes, and am back at square one. I’m not really a techie,
   so I’ve tried to have a couple of other friends help, but without luck.
 * **PLEASE PLEASE PLEASE HELP!**

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

 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/custom-plugin-fatal-errors/#post-2887844)
 * > I tried downloading the newest version of WP and copying the wp_setting.php
   > and the vars.php files over…
 * Unless you were already running the newest version of WordPress, that was not
   a good idea. Mixing and matching files from different releases will cause trouble.
   Please put things back the way they were.
 * When did the plugin stop working? Did you do anything? Add another plugin? Change
   themes? Update WordPress?
 * Post your plugin code to the [pastebin](http://pastebin.com/). Maybe someone 
   can spot the problem.
 *  Thread Starter [420DankStank](https://wordpress.org/support/users/420dankstank/)
 * (@420dankstank)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/custom-plugin-fatal-errors/#post-2887852)
 * I am running the newest version already. I thought that when I did an automatic
   upgrade, maybe things didn’t get copied right. At least, that is what I have 
   been reading on other forums regarding similar problems.
 * The problem happened back in May. I got injected with malware. I completely wiped
   the site. Deleted everything from it and started over. Reinstalled wordpress 
   and uploaded a backup from a week before the injection. Installed a f*ck ton 
   of security measures after that.
 * It wasn’t working after the upload, so I tried changing themes. No help. Changed
   it back. WordPress had a few updates since…
 * [Code](http://pastebin.com/VGr1212S)
 *  Thread Starter [420DankStank](https://wordpress.org/support/users/420dankstank/)
 * (@420dankstank)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/custom-plugin-fatal-errors/#post-2887854)
 * For the past month and a half, I have been racking my brain going through coding.
   I never really knew anything about coding before May, but I think I might be 
   a novice code writer before this is fixed.
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/custom-plugin-fatal-errors/#post-2887862)
 * > I am running the newest version already. I thought that when I did an automatic
   > upgrade, maybe things didn’t get copied right.
 * Ok. That’s good and that is possible. Instead of just copying a couple of select
   files, re-upload the whole thing– all the WordPress files from the same release
   as you are already running.
 * What are those security measure? Something may be causing a conflict. You may
   want to try disabling those one by one to see if it makes a difference.
 * Nothing in the code stands our as especially weird, and none of it looks obviously
   related to that plugin. If it were me, and the stuff above doesn’t help, I’d 
   start commenting out pieces of that to try to find what is triggering those errors.
 * If you don’t already have debugging enabled, switch it on. It may provide a clue.
   Add `define('WP_DEBUG',true)'` to your wp-config.php.
 *  Thread Starter [420DankStank](https://wordpress.org/support/users/420dankstank/)
 * (@420dankstank)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/custom-plugin-fatal-errors/#post-2888002)
 * So, since I last posted about having this WP problem, my computer crashed cause
   of the S.M.A.R.T. HDD virus. I recovered from the virus, but delete my video 
   drivers and couldn’t boot BIOS to fix the problem. Had to have it taken in to
   be repaired. I’m going to try to work with the WP_DEBUG option today. Hopefully
   I can find something there. I feel like it is the DB that is just not defined
   or something. I’ll let you know what I find in a little bit.
 *  Thread Starter [420DankStank](https://wordpress.org/support/users/420dankstank/)
 * (@420dankstank)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/custom-plugin-fatal-errors/#post-2888005)
 * So after I put the WP_Debug in the wp-config.php, what do I check out then? I
   looked at the script error logs again, and now there is only one:
 * PHP Fatal error: Call to undefined function add_action() in /usr/home/wash20/
   www/htdocs/wp-includes/wp-includes/update.php on line 337
 * I checked out the update.php and on line 337 is: add_action( ‘admin_init’, ‘_maybe_update_core’);
 *  Thread Starter [420DankStank](https://wordpress.org/support/users/420dankstank/)
 * (@420dankstank)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/custom-plugin-fatal-errors/#post-2888012)
 * Ok, so far today, I checked out the WP_DEBUG. I fixed most of the Notice errors.
   My theme must be old, cause it had a lot of errors for ‘get_settings’. I had 
   to change all of those to ‘get_option’. I then had to add an extra line in each
   of the Theme php pages: `{
    if(isset($value[‘id’])`) before the ‘get_option’.
 * I also had to delete 3 of my plugins cause the were causing errors. Google Maps,
   Updraft – Backup/Restore, and WP Mobile Pack.
 * I’m now left with only a few errors. Two main ones that I can’t figure out:
 * Missing argument 3 for wp_register_sidebar_widget(), called in /usr/home/wash20/
   www/htdocs/wp-content/themes/connections-reloaded/functions.php on line 152 and
   defined in /usr/home/wash20/www/htdocs/wp-includes/widgets.php on line 604
 * and
 * PHP Notice: get_settings is **deprecated** since version 2.1! Use get_option()
   instead. in /usr/home/wash20/www/htdocs/wp-includes/functions.php on line 3467
 * For the PHP Notice, I went to the file that it mentions, and on line 3467 it 
   only says:` trigger_error( sprintf( __(‘%1$s is <strong>deprecated</strong> since
   version %2$s! Use %3$s instead.’), $function, $version, $replacement ) );
 * The whole line of code that it is referring to is:` // Allow plugin to filter
   the output error trigger
    if ( WP_DEBUG && apply_filters( ‘deprecated_function_trigger_error’,
   true ) ) { if ( ! is_null($replacement) ) trigger_error( sprintf( __(‘%1$s is**
   deprecated** since version %2$s! Use %3$s instead.’), $function, $version, $replacement));
   else trigger_error( sprintf( __(‘%1$s is **deprecated** since version %2$s with
   no alternative available.’), $function, $version ) ); } }`
 *  [practutor](https://wordpress.org/support/users/practutor/)
 * (@practutor)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/custom-plugin-fatal-errors/#post-2888015)
 * Hii I didnt know about anything about coding before.. but after this i will definately
   become a master in coding. Thank You
    - [http://hardik.practutor.com/](http://hardik.practutor.com/)
 *  Thread Starter [420DankStank](https://wordpress.org/support/users/420dankstank/)
 * (@420dankstank)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/custom-plugin-fatal-errors/#post-2888033)
 * Updates:
 * To show me what was being called wrong, I entered `throw(new Exception('Testing'));//
   line added to force an exception <<<<<<<<<<<<<<<<<<` onto my functions.php on
   line 3585
 *     ```
       // Allow plugin to filter the output error trigger
       	if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) {
       throw(new Exception('Testing'));  // line added to force an exception <<<<<<<<<<<<<<<<<<
       		$version = is_null( $version ) ? '' : sprintf( __( '(This message was added in version %s.)' ), $version );
       		$message .= ' ' . __( 'Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information.' );
       		trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
       	}
       ```
   
 * That forced a new error in DEBUG mode:
    `Fatal error: Uncaught exception 'Exception'
   with message 'Testing' in /usr/home/wash20/www/htdocs/wp-includes/functions.php:
   3585 Stack trace: #0 /usr/home/wash20/www/htdocs/wp-includes/functions.wp-scripts.
   php(110): _doing_it_wrong('wp_deregister_s...', 'Scripts and sty...', '3.3') #
   1 /usr/home/wash20/www/htdocs/wp-content/plugins/mmjverify_shortcode/mmjverify_shortcode.
   php(174): wp_deregister_script('jquery') #2 /usr/home/wash20/www/htdocs/wp-settings.
   php(196): include_once('/usr/home/wash2...') #3 /usr/home/wash20/www/htdocs/wp-
   config.php(90): require_once('/usr/home/wash2...') #4 /usr/home/wash20/www/htdocs/
   wp-load.php(29): require_once('/usr/home/wash2...') #5 /usr/home/wash20/www/htdocs/
   wp-blog-header.php(12): require_once('/usr/home/wash2...') #6 /usr/home/wash20/
   www/htdocs/index.php(17): require('/usr/home/wash2...') #7 {main} thrown in /
   usr/home/wash20/www/htdocs/wp-includes/functions.php on line 3585`
 * It seems that in my plugin “MMJVERIFY_SHORTCODE” I have a deregister problem 
   being called on line 174. Looking at that line it just says: `wp_deregister_script('
   jquery'); //deregister current jquery`
 * What do I need to do from here? What seems to be the problem?
 *  Thread Starter [420DankStank](https://wordpress.org/support/users/420dankstank/)
 * (@420dankstank)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/custom-plugin-fatal-errors/#post-2888034)
 * So on my Shortcode.php, near line 174, I had:
 *     ```
       wp_deregister_script('jquery'); //deregister current jquery
       wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.js', false, '1.6', false);
       ```
   
 * I changed it to: `function pubverify_enqueue_scripts() {
    wp_deregister_script(‘
   jquery’); //deregister current jquery wp_register_script(‘jquery’, ‘[http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.js&#8217](http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.js&#8217);,
   false, ‘1.6’, false); wp_enqueue_script(‘jquery’); }`
 * That took care of my error:
    Notice: wp_deregister_script was called incorrectly.
   Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts,
   admin_enqueue_scripts, or init hooks. Please see Debugging in WordPress for more
   information. (This message was added in version 3.3.) in /usr/home/wash20/www/
   htdocs/wp-includes/functions.php on line 3587
 *  Thread Starter [420DankStank](https://wordpress.org/support/users/420dankstank/)
 * (@420dankstank)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/custom-plugin-fatal-errors/#post-2888035)
 * Alright! Error Warning: Warning: Missing argument 3 for wp_register_sidebar_widget(),
   called in /usr/home/wash20/www/htdocs/wp-content/themes/connections-reloaded/
   functions.php on line 151 and defined in /usr/home/wash20/www/htdocs/wp-includes/
   widgets.php on line 604
 * I fixed the error by going to the widgets.php and checking out line 604. It says
   it wanted to see: $wp_register_sidebar_widget
 * So, on my theme function.php near line 151, i changed:
    if ( function_exists(‘
   wp_register_sidebar_widget’) to: if ( function_exists(‘$wp_register_sidebar_widget’)
 * Error gone.
 *  Thread Starter [420DankStank](https://wordpress.org/support/users/420dankstank/)
 * (@420dankstank)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/custom-plugin-fatal-errors/#post-2888038)
 * Now all of my errors are gone from my page, but I still can’t get my plugin to
   work. I’m going to do a some research and update later.

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

The topic ‘Custom Plugin Fatal errors’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 12 replies
 * 3 participants
 * Last reply from: [420DankStank](https://wordpress.org/support/users/420dankstank/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/custom-plugin-fatal-errors/#post-2888038)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
