Title: error with latest PHP version 5.4.31
Last modified: August 22, 2016

---

# error with latest PHP version 5.4.31

 *  Resolved [kansari.com](https://wordpress.org/support/users/kansaricom/)
 * (@kansaricom)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-with-latest-php-version-5431/)
 * please fix these bugs in custum sidebar plugin
 * i get the following error msg in my godaddy hosting but its working fine in my
   local PC ammps .
 * godaddy is using PHP version PHP Version 5.4.31
 * my PHP version PHP Version 5.3.2
 * here is the error msg that i get when i try to edit my wordpress post .
 * Parse error: syntax error, unexpected ‘global’ (T_GLOBAL) in /home/mjonas15/public_html/
   wp-content/plugins/custom-sidebars/views/metabox.php on line 2
 * to see the problem in more detail pls see…i got this on the internet ..everybody
   is facing the problem ..
 * [http://stackoverflow.com/questions/25317241/parse-error-syntax-error-unexpected-metabox-php-custon-sidebar](http://stackoverflow.com/questions/25317241/parse-error-syntax-error-unexpected-metabox-php-custon-sidebar)
 * [https://wordpress.org/plugins/custom-sidebars/](https://wordpress.org/plugins/custom-sidebars/)

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

 *  [David](https://wordpress.org/support/users/ugotsta/)
 * (@ugotsta)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-with-latest-php-version-5431/#post-5210338)
 * Hi there [@kansari](https://wordpress.org/support/users/kansari/)!
 * Hope your’e doing great today! 🙂
 * I’ve just re-tested the plugin on PHP 5.4 and am not able to replicate this issue.
 * Could I ask if you’ve tried it with all other plugins deactivated and using Twenty
   Fourteen theme?
 * Is not, could you please try that and let us know how it works with that?
 * Thanks,
    David
 *  [David](https://wordpress.org/support/users/ugotsta/)
 * (@ugotsta)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-with-latest-php-version-5431/#post-5210343)
 * Hi [@kansari](https://wordpress.org/support/users/kansari/)! I meant to mention
   this previously, but the plugin actually “includes” that metabox.php file within
   a function, which is perfectly fine according to PHP rules as noted here:
    [http://php.net/manual/en/language.variables.scope.php](http://php.net/manual/en/language.variables.scope.php)
 * You’ll see the following note in that page.
    **Note: Using global keyword outside
   a function is not an error. It can be used if the file is included from inside
   a function.
 * I’m not sure why you’re getting that error message myself but would love to look
   into it if you’ll let me know how that test goes with the plugins/theme deactivation.
 * Looking forward to your reply. 🙂
 *  Thread Starter [kansari.com](https://wordpress.org/support/users/kansaricom/)
 * (@kansaricom)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-with-latest-php-version-5431/#post-5210376)
 * thanks for the reply i am using some other methods /plugin to avoid the error
   msgs .Has it got some thing to do with godaddy PHP settings ?.i am not sure .
   Its a weird bug the content of the post does not appear in the admin panel .it
   was working fine on my localhost PC.Problem started when i uploaded files on 
   godaddy .
 *  [David](https://wordpress.org/support/users/ugotsta/)
 * (@ugotsta)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-with-latest-php-version-5431/#post-5210442)
 * Hi [@kansari](https://wordpress.org/support/users/kansari/),
 * Thanks for your reply and indeed, that is strange! I’ve specifically tested in
   both PHP 5.3 and 5.4, no trouble with either.
 * I can’t really imagine it being related to godaddy specifically but to hopefully
   get to the bottom of this quickly, could you let me know if you tried it with
   Twenty Fourteen and having deactivated all other plugins?
 * Could I ask also how you’ve checked the PHP version?
 * Perhaps you could try using this:
    [https://wordpress.org/plugins/display-php-version/](https://wordpress.org/plugins/display-php-version/)
 * I just mention that check as a way to see the PHP version from the site itself
   as sometimes it might be reported that a particular version is used whereas on-
   site it’s different.
 * Cheers,
    David
 *  [bowenac](https://wordpress.org/support/users/bowenac/)
 * (@bowenac)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-with-latest-php-version-5431/#post-5210529)
 * I’m getting this as well, moved a site from domain.com/new-site to domain.com
   used wp migrate db which I have used 100’s of times but this clients site is 
   using this plugin and I get this error.
 * Also visual composer is not working not sure if related.
 * Deactivating this plugin and visual composer starts working again.
 * UPDATE: After deactivating I then re activated and it showed an update updated
   this plugin now its working and visual composer is working again.
 *  [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * (@wpmudev-support1)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-with-latest-php-version-5431/#post-5210531)
 * Hi [@bowenac](https://wordpress.org/support/users/bowenac/),
 * Glad it’s working for you now after updating the plugin 🙂
 * Please advise if you have more questions.
 * Have a great day!
 * Cheers,
    WPMU DEV
 *  [seany187](https://wordpress.org/support/users/seany187/)
 * (@seany187)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-with-latest-php-version-5431/#post-5210540)
 * Hello,
 * We had this working fine on our server running PHP 5.5 and WordPress MU. We Migrated
   to a new server running PHP 5.4 and now we get the same error. We tried deleting
   the plugin, re-installing, still get the error.
 * Any ideas?
 * Running PHP Version 5.4.32
 *  [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * (@wpmudev-support1)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-with-latest-php-version-5431/#post-5210546)
 * Hi [@seany187](https://wordpress.org/support/users/seany187/),
 * Sorry to hear of the problem you are having.
 * Which hosting provider are you using to host your website?
 * Could you please tell me what version of Custom Sidebars plugin and WordPress
   you are using?
 * I could not reproduce the issue on my test site even when setting wp debug to
   true but could you please try temporary removing/commenting the following code
   from the below Custom Sidebars plugin file on line number 10 to resolve the issue?
 * **Custom Sidebars plugin file :**
    custom-sidebars\views\metabox.php
 * **Code to be removed/commented :**
 *     ```
       global $wp_registered_sidebars;
       ```
   
 * Best Regards,
    WPMU DEV
 *  [seany187](https://wordpress.org/support/users/seany187/)
 * (@seany187)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-with-latest-php-version-5431/#post-5210548)
 * I actually commented it out and then it output a different error. I upgraded 
   the server to PHP 5.5 and that resolved the issue, super bizarre. We wree using
   SERVINT VPS Running CENT OS.
 *  [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * (@wpmudev-support1)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-with-latest-php-version-5431/#post-5210549)
 * Hi [@seany187](https://wordpress.org/support/users/seany187/),
 * It would be better for us to troubleshoot if you had shared what’s the different
   error you were getting.
 * It seems this is a PHP version specific issue. I have notified the plugin developer
   to troubleshoot the issue more and we will respond to this thread if we find 
   anything.
 * Cheers,
    WPMU DEV
 *  [Philipp Stracker](https://wordpress.org/support/users/strackerphil-1/)
 * (@strackerphil-1)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/error-with-latest-php-version-5431/#post-5210554)
 * This is a really strange issue…
 * It does not seem to be related to the code itself, as the “global” statement 
   is valid in this context (in any PHP version that supports WordPress)
    We could
   not reproduce the issue on our installations, no matter which PHP version we 
   tested.
 * After googling I found some similar issues that were caused by
 * A) Wrong character-encoding (e.g. file was edited in some text editor that added
   or changed some text)
 * B) A file could be incomplete (e.g. while installing or copying something went
   wrong and is missing now)
 * C) Wrong permissions (very unlikely, but it’s possible that a single file could
   not be updated and is not compatible with the other plugin files anymore)
 * The only solution I can suggest is to delete the plugin and re-install it: Go
   to the Plugins page in WordPress and then click the (1) Deactivate (2) Delete
   actions for the Custom Sidebars plugin. After it is completely deleted go ahead
   and install it again. I recommend to install it via the WordPress plugin search
   and not via “Upload Plugin” function.
 * Let us know if this did work for you!
    Thanks, Philipp

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

The topic ‘error with latest PHP version 5.4.31’ is closed to new replies.

 * ![](https://ps.w.org/custom-sidebars/assets/icon-256x256.png?rev=1414065)
 * [Custom Sidebars - Dynamic Sidebar Classic Widget Area Manager](https://wordpress.org/plugins/custom-sidebars/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-sidebars/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-sidebars/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-sidebars/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-sidebars/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-sidebars/reviews/)

## Tags

 * [global](https://wordpress.org/support/topic-tag/global/)

 * 11 replies
 * 6 participants
 * Last reply from: [Philipp Stracker](https://wordpress.org/support/users/strackerphil-1/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/error-with-latest-php-version-5431/#post-5210554)
 * Status: resolved