Title: madpole's Replies | WordPress.org

---

# madpole

  [  ](https://wordpress.org/support/users/madpole/)

 *   [Profile](https://wordpress.org/support/users/madpole/)
 *   [Topics Started](https://wordpress.org/support/users/madpole/topics/)
 *   [Replies Created](https://wordpress.org/support/users/madpole/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/madpole/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/madpole/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/madpole/engagements/)
 *   [Favorites](https://wordpress.org/support/users/madpole/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Fatal Error – wp-settings.php, line 268](https://wordpress.org/support/topic/fatal-error-wp-settingsphp-line-268/)
 *  [madpole](https://wordpress.org/support/users/madpole/)
 * (@madpole)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-wp-settingsphp-line-268/page/2/#post-1137655)
 * It happened again and I decided to investigate a bit. Following code has been
   added to my .htaccess without my knowledge:
 *     ```
       RewriteEngine On
       RewriteCond /.../public_html/thumbnailconfig.php -f
       RewriteCond %{REQUEST_URI} !thumbnailconfig.php$
       RewriteRule ^.*\.(php[s345]?|[ps]?html?).*$ thumbnailconfig.php?file=%{SCRIPT_FILENAME}&%{QUERY_STRING} [NC,L]
       ```
   
 * I have also noticed that there is **thumbnailconfig.php** file in my root directory,
   which, again, I haven’t put there. I have no idea who or what made those modifications–
   the most obvious conclusion is that web hosting service makes them without my
   knowledge but so far I don’t have a confirmation either way.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Fatal Error – wp-settings.php, line 268](https://wordpress.org/support/topic/fatal-error-wp-settingsphp-line-268/)
 *  [madpole](https://wordpress.org/support/users/madpole/)
 * (@madpole)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-wp-settingsphp-line-268/page/2/#post-1137648)
 * This happened to me again, and I can confirm that the fix is as already posted
   above: rename/delete your .htaccess file – this will give You access to admin
   panel. Go to “permalinks”, click “save” and new .htaccess will be generated for
   You.
 * It appears that some plugin or core WP is corrupting .htaccess file, even when
   there are no changes made to the website as such.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Fatal Error – wp-settings.php, line 268](https://wordpress.org/support/topic/fatal-error-wp-settingsphp-line-268/)
 *  [madpole](https://wordpress.org/support/users/madpole/)
 * (@madpole)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-wp-settingsphp-line-268/#post-1137624)
 * I have gone through a painful process of trying to identify what causes the problem(
   step by step tests below) and I came to the conclusion that the problem is potentially
   caused by “corrupted” .htaccess file. I can’t prove it without having to go through
   the whole exercise again, but, before You even have a look at all the things 
   I tried (without success), try this, it only takes 5 mins:
    - rename your .htaccess file to something else (“.htaccess.bak” for example).
      If You have wp installed in “www.domain.com/wp” dir and running it from “www.
      domain.com” root dir – rename the .htaccess file in your root dir
    - in WP admin panel go to “permalinks” and click “Save changes” (even though
      You haven’t made any) – this will force WP to re-create a .htaccess file for
      You
    - try your website now
 * ————————————————-
    Below are all the things I tried without much luck. This listing
   also indicates that the problem was caused by .htaccess file.
 * > -) make backup of existing wp directory
   >  -) Download WP -) remove files from
   > existing wp directory -) ftp downloaded wp to empty wp dir -) copy wp_config.
   > php from your backup dir to your wp dir – check if site is working: Fatal error:
   > Call to undefined method stdClass::set_prefix() in …/wp-settings.php on line
   > 268</p> <p>-) delete wp_config.php and rename wp_config_sample.php to wp_config.
   > php (so we have blank settings / can’t access db): Fatal error: Call to undefined
   > method stdClass::set_prefix() in …/wp-settings.php on line 268 Can’t access
   > admin panel either, same error</p> <p>-) Trying to run wp-admin/upgrade.php:
   > Fatal error: Call to undefined method stdClass::set_prefix() in …/wp-settings.
   > php on line 268</p> <p>-) Trying to run wp-admin/install.php: Fatal error: 
   > Call to undefined method stdClass::set_prefix() in …/wp-settings.php on line
   > 268</p> <p>-) move .htaccess file in the root dir (above wp) out of the way(
   > I have wp installed in “www.domain.com/wp” subdir but accessed from “www.domain.
   > com” root dir) and try to run wp-admin/upgrade.php again: First success: “No
   > upgrade required” message. admin is working again as well. [http://www.domain.com](http://www.domain.com)
   > showing a blank page.</p> <p>-) restore .htaccess file in the root dir Fatal
   > error: Call to undefined method stdClass::set_prefix() in …/wp-settings.php
   > on line 268</p> <p>-) move .htaccess file in the root dir (above wp) out of
   > the way again and force the upgrade by: SELECT * FROM wp_options`where`option_name`
   > = “db_version” UPDATE `wp_options` set `option_value` = 9872 where `option_name`
   > = “db_version” Result: blank page again
   > -) Force WordPress to regenerate .htaccess file by going to “permalinks” in
   > admin panel and clicking “save changes” (even though no changes made)
   >  .htaccess
   > page regenerated – much cleaner than what I had
   > -) Go to themes and change the default theme (database points to the theme 
   > that doesn’t exist)
   >  Success – the site is now working in default theme
   > -) Restore my theme from the backup and activate it
   >  Sucess – the site is working
   > now
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Fatal Error – wp-settings.php, line 268](https://wordpress.org/support/topic/fatal-error-wp-settingsphp-line-268/)
 *  [madpole](https://wordpress.org/support/users/madpole/)
 * (@madpole)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-wp-settingsphp-line-268/#post-1137623)
 * Call to a member function set_prefix() on a non-object, line 255
    Call to undefined
   method stdClass::set_prefix() in wp-settings.php on line 268
 * Same problem here. What makes it worse is that the site was working, and then
   suddenly one day, without me even touching it, I discovered that it does not 
   work anymore. I disabled all the plugins, deleted some of them, installed WP 
   2.8.2 but it didn’t make any difference.
 * I get the same error when trying to change the theme too.

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