Title: Random php errors and warnings &#8211; function.require, compat.php, etc
Last modified: August 19, 2016

---

# Random php errors and warnings – function.require, compat.php, etc

 *  [mreider](https://wordpress.org/support/users/mreider/)
 * (@mreider)
 * [18 years ago](https://wordpress.org/support/topic/random-php-errors-and-warnings-functionrequire-compatphp-etc/)
 * Hey all,
 * I’ve just upgraded to 2.5 hoping to resolve some issues with my wordpress installation,
   but so far, no success.
 * ‘[01-Apr-2008 21:23:20] PHP Warning: main(/home/usr/public_html/wp-includes/compat.
   php) [[function.main](https://wordpress.org/support/topic/random-php-errors-and-warnings-functionrequire-compatphp-etc/function.main?output_format=md)]:
   failed to open stream: No such file or directory in /home/usr/public_html/wp-
   settings.php on line 200
    [01-Apr-2008 21:23:20] PHP Warning: main(/home/usr/
   public_html/wp-includes/compat.php) [[function.main](https://wordpress.org/support/topic/random-php-errors-and-warnings-functionrequire-compatphp-etc/function.main?output_format=md)]:
   failed to open stream: No such file or directory in /home/usr/public_html/wp-
   settings.php on line 200 [01-Apr-2008 21:23:20] PHP Fatal error: main() [[function.require](https://wordpress.org/support/topic/random-php-errors-and-warnings-functionrequire-compatphp-etc/function.require?output_format=md)]:
   Failed opening required ‘/home/usr/public_html/wp-includes/compat.php’ (include_path
   =’.:/usr/lib/php:/usr/local/lib/php’) in /home/usr/public_html/wp-settings.php
   on line 200′
 * That’s what’s appearing in my error log.
 * Any ideas? I’ve been having issues the last few days (even before I upgraded)
   with the main index file opening up a tonne of processes to the point of crashing
   the server, so I’m just trying to eliminate any potential errors.

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

 *  [Nathan Rice](https://wordpress.org/support/users/nathanrice/)
 * (@nathanrice)
 * [18 years ago](https://wordpress.org/support/topic/random-php-errors-and-warnings-functionrequire-compatphp-etc/#post-727978)
 * make sure the /wp-includes/compat.php file actually exists on your server. To
   be double sure, download the 2.5 package and re-upload the file again.
 *  Thread Starter [mreider](https://wordpress.org/support/users/mreider/)
 * (@mreider)
 * [18 years ago](https://wordpress.org/support/topic/random-php-errors-and-warnings-functionrequire-compatphp-etc/#post-727981)
 * Heya,
 * Its’ there – deleted and re-uploaded as well.
 *  [Nathan Rice](https://wordpress.org/support/users/nathanrice/)
 * (@nathanrice)
 * [18 years ago](https://wordpress.org/support/topic/random-php-errors-and-warnings-functionrequire-compatphp-etc/#post-727982)
 * line 200 of wp-settings.php says:
    `require (ABSPATH . WPINC . '/compat.php');`
 * if the file is there, it shouldn’t be giving you an error.
 * Not that this is recommended, but you could always just comment out line 200 
   temporarily and see if it still gives you the error. Past that, this is probably
   a little over my head.
 *  Thread Starter [mreider](https://wordpress.org/support/users/mreider/)
 * (@mreider)
 * [18 years ago](https://wordpress.org/support/topic/random-php-errors-and-warnings-functionrequire-compatphp-etc/#post-727986)
 * I wonder if it could be a permissions error, but I’m a little hesitant to mess
   around with that stuff.

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

The topic ‘Random php errors and warnings – function.require, compat.php, etc’ is
closed to new replies.

## Tags

 * [compat.php](https://wordpress.org/support/topic-tag/compat-php/)
 * [function.require](https://wordpress.org/support/topic-tag/function-require/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [mreider](https://wordpress.org/support/users/mreider/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/random-php-errors-and-warnings-functionrequire-compatphp-etc/#post-727986)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
