Support » Fixing WordPress » Error when posting with php 5.4

  • Hi I’m using the latest version of wordpress with the Thesis theme version 1.8.1.

    My web host 1&1 recently requested that I change my global php to version 5.4 because as of april 2013 they will no longer support older versions.

    The problem occurred when I tried to publish a post. After clicking publish the page reloads to a page with the following error message printed from top to bottom. (the preview button gets the same result)

    Warning: Illegal string offset ‘type’ in
    hp on line 150

    If I check my posts, the post has actually been published but I am forced to backtrack to escape the error messages.

    I changed my global php back to version 5.2 and the problem went away. I then email my web host (1&1) and thier response was the following:

    As of the moment, I would advise you to set the php version back to 5.2 first as it seems that there is an issue when switching to the said version. PhP version 5.4 does not support register globals anymore and this causes the CMS softwares (Ex: Joomla, WordPress, Drupal & etc.) error.

    If you may also contact WordPress Support to check for other workarounds as we do not have the full control of the said third party software.“

    I am kind of out of my depth with this stuff. Would appreciate any advice anyone could give me. I have a couple of clients for whom I set up websites with 1&1 so obviously I’m anxious to resolve the problem before I’m forced to switch to php 5.4 next april.

Viewing 1 replies (of 1 total)
  • What I’ve read is that PHP 5.4 is more strict than earlier versions, which may have allowed some poor code to execute in your theme’s options_post.php script without issuing a warning.

    WordPress does not require register_globals at all as far as I know; I always set it to “off” in all my PHP installs and WordPress works just fine.

    If I were you, I would switch web hosts. : ) That’s pretty sad tech support. The host I use, and most others I have used in the past, allows users to specify the version of PHP they use, usually including two previous major versions to allow time for upgrading scripts.

    The other thing to do is to see if there is an updated version of your theme available that has correct code. If not you could just fix the code yourself, or switch themes to something that doesn’t generate the warnings.

    If you want some advice on fixing the code, you could post the code block here and ask.

Viewing 1 replies (of 1 total)
  • The topic ‘Error when posting with php 5.4’ is closed to new replies.