Title: Functions.php File Error
Last modified: August 20, 2016

---

# Functions.php File Error

 *  [ChronicD](https://wordpress.org/support/users/chronicd/)
 * (@chronicd)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/)
 * While removing some tool bar menu items in the functions.php file of my theme,
   I seem to have broken my site (www.lyriquest.com) and now get the following error:
 * Warning: dir(TEMPLATEPATHhome/wp-content/themes/setlist/) [function.dir]: failed
   to open dir: No such file or directory in /home/content/26/9196326/html/wp-includes/
   functions.php on line 100
 * Fatal error: Call to a member function read() on a non-object in /home/content/
   26/9196326/html/wp-includes/functions.php on line 101
 * Any assistance would be appreciated.
 * ChronicD

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

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082372)
 * Can you access functions.php?
 *  Thread Starter [ChronicD](https://wordpress.org/support/users/chronicd/)
 * (@chronicd)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082375)
 * Yes. Thanks for your quick response!
 *  Thread Starter [ChronicD](https://wordpress.org/support/users/chronicd/)
 * (@chronicd)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082377)
 * After receiving an error from a functions.php edit, i went to replace the problem
   functions.php file with the original from the theme (which has worked before)
   and may have inadvertently placed it in the wp-includes dir. I’ve made sure the
   original functions.php is in the theme directory and have tried to delete functions.
   php from the wp-includes dir but no luck.
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082380)
 * What’s line 100 of functions.php?
 *  Thread Starter [ChronicD](https://wordpress.org/support/users/chronicd/)
 * (@chronicd)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082383)
 * $dir = dir(TEMPLATEPATH.”/”);
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082386)
 * can you `var_dump($dir);exit;` and paste here what it outputs?
 *  Thread Starter [ChronicD](https://wordpress.org/support/users/chronicd/)
 * (@chronicd)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082388)
 * Not quite sure how to execute that. Can you provide how-to?
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082391)
 * For example, on line 100,
 *     ```
       $dir = dir(TEMPLATEPATH."/");     var_dump($dir);exit;
       ```
   
 *  Thread Starter [ChronicD](https://wordpress.org/support/users/chronicd/)
 * (@chronicd)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082399)
 * OK. Modified file per above, replaced existing file on site, re-downloaded but
   no dump result. Is there something I need to do to execute the command?
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082404)
 * Sorry, on line 100 try;
 *     ```
       var_dump(TEMPLATEPATH."/");exit; $dir = dir(TEMPLATEPATH."/");
       ```
   
 *  Thread Starter [ChronicD](https://wordpress.org/support/users/chronicd/)
 * (@chronicd)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082405)
 * Here is what I get.
 * function get_availableCss(){
    $result = array(); $dir = dir(TEMPLATEPATH.”/”);
   var_dump($dir);exit; while (false !== ($file = $dir->read())) { if(ereg(“\.css”,
   $file, $r)){ $result[] = $file; } } $dir->close(); return $result; }
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082407)
 * Does it output anything on the webpage?
 *  Thread Starter [ChronicD](https://wordpress.org/support/users/chronicd/)
 * (@chronicd)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082414)
 * Not sure if the dump should appear in functions.php file or on the web page after
   the modified file is loaded. Here is from the file:
    /* Get Available CSS */ 
   function get_availableCss(){ $result = array(); var_dump(TEMPLATEPATH.”/”);exit;
   $dir = dir(TEMPLATEPATH.”/”); while (false !== ($file = $dir->read())) { if(ereg(“\.
   css”, $file, $r)){ $result[] = $file; } } $dir->close(); return $result; }
 * Here is from the site with the modified file loaded.
 * Warning: dir(TEMPLATEPATH/) [function.dir]: failed to open dir: No such file 
   or directory in /home/content/26/9196326/html/wp-includes/functions.php on line
   100
    bool(false)
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082416)
 * I’m sorry, I can’t find the solution to this.
    Remove the code I recommended 
   you add.
 * I’m sure you’ll receive help from others.
 *  Thread Starter [ChronicD](https://wordpress.org/support/users/chronicd/)
 * (@chronicd)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082421)
 * Thanks very much Andrew. I appreciate your efforts.

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

The topic ‘Functions.php File Error’ is closed to new replies.

 * 15 replies
 * 2 participants
 * Last reply from: [ChronicD](https://wordpress.org/support/users/chronicd/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/functionsphp-file-error/#post-3082421)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
