• Fatal error: Cannot redeclare get_post_to_edit() (previously declared in /hermes/bosoraweb079/b2135/ipg.janettlewiscom/Interactive Media/wp-admin/includes/post.php:473) in /hermes/bosoraweb079/b2135/ipg.janettlewiscom/Interactive Media/wp-admin/includes/deprecated.php on line 993

    Help please!

Viewing 3 replies - 1 through 3 (of 3 total)
  • I saw this same issue today after upgrading to WordPress 3.5 on a blog we’re developing right now (not yet in production). Oddly, we had another copy of the same blog hosted on the same server which we upgraded to 3.5 first, and it worked fine. I compared the file contents of the two blogs and they were identical, yet one reported this php error:

    PHP Fatal error: Cannot redeclare get_post_to_edit() (previously declared in <blogroot>\wp-admin\includes\post.php:473) in <blogroot>\wp-admin\includes\deprecated.php on line 993)

    This made me suspicious of state, so I reset the IIS server that was hosting both blogs, and the problem went away. This makes me suspect that perhaps some old php content was cached (which I have seen before in IIS and is maddening to diagnose). This theory is further supported by the fact that line 473 of post.php (as listed in the php error) is in the middle of a comment block — it’s not a function declaration. It looks like the get_post_to_edit() function was deprecated in the 3.5 release and moved to the deprecated.php file, but the cached copy of the old post.php still had it declared.

    Not sure if you have access to your IIS server, but if you do, running “iisreset” (from a Run As Administrator command prompt) should fix the problem. I’m also interested to hear from others hosting wordpress on IIS (not my choice) and how you deal with this php caching issue.

    –Joe

    I see now that you’re probably not running on IIS (based on the Linux paths in your error message). Still looks to be a cached php issue, since line 473 of post.php is not a declaration, and the 3.5 version of post.php doesn’t contain a declaration of get_post_to_edit() at all.

    So I think if you can force all cached php scripts to be reloaded, you should be okay. Restarting the app server is probably harsher than you need, but should work.

    I have linux based server and getting a variant on the same error..however, I’m on a shared server, so what do I do to get rid of the error?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I'm getting an error message and not able to log into my dashboard’ is closed to new replies.