Title: Fatal error : formatting.php and file.php
Last modified: August 19, 2016

---

# Fatal error : formatting.php and file.php

 *  Resolved [crylike](https://wordpress.org/support/users/crylike/)
 * (@crylike)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-formattingphp-and-filephp/)
 * Hi,
 * Hmmm..my last question didn’t get resolve, but I hope this one will, because 
   I am really lost.
 * I was trying to upgrade a site with wordpress automatic upgrade. First, I deleted
   index.php.wpau.bak file for the maintenance mode to activate. It get me pass 
   through that step, but I got more errors which are all the same about permission(
   I didn’t get to save what it was). And then, when I hit the next button, it gave
   me this error :
 * **Fatal error: Cannot redeclare validate_file() (previously declared in /home/
   ramjtmp/public_html/wp-includes/functions.php:2245) in /home/ramjtmp/public_html/
   wp-admin/includes/file.php on line 73**
 * Now, I can’t get into dashboard because of this error.
 * When I got visit the site, this error appears:
 * **Fatal error: Call to undefined function get_shortcode_regex() in /home/ramjtmp/
   public_html/wp-includes/formatting.php on line 100**
 * I don’t know what to do. Please help…

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

 *  Thread Starter [crylike](https://wordpress.org/support/users/crylike/)
 * (@crylike)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-formattingphp-and-filephp/#post-856319)
 * Sorry, I did not write down what’s on those line.
    Here’s what in line 100 formatting.
   php
 * _$pee = preg\_replace(‘/<p>\s*?(‘ . get\_shortcode\_regex() . ‘)\s*<\/p>/s’, ‘
   $1’, $pee);_
 * and this is from line 59 to 73 of file.php
 * function validate_file( $file, $allowed_files = ” ) {
    if ( false !== strpos(
   $file, ‘..’ )) return 1;
 *  if ( false !== strpos( $file, ‘./’ ))
    return 1;
 *  if (‘:’ == substr( $file, 1, 1 ))
    return 2;
 *  if (!empty ( $allowed_files ) && (!in_array( $file, $allowed_files ) ) )
    return
   3;
 *  return 0;
    }
 *  Thread Starter [crylike](https://wordpress.org/support/users/crylike/)
 * (@crylike)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-formattingphp-and-filephp/#post-856549)
 * I forgot to do to the whole process of updating wordpress. I forgot to upload
   some files…

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

The topic ‘Fatal error : formatting.php and file.php’ is closed to new replies.

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [file.php](https://wordpress.org/support/topic-tag/file-php/)
 * [formatting.php](https://wordpress.org/support/topic-tag/formatting-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [crylike](https://wordpress.org/support/users/crylike/)
 * Last activity: [17 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-formattingphp-and-filephp/#post-856549)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
