MWDelaney / bootstrap-3-shortcodes

WordPress shortcodes for easier use of Bootstrap elements in your content.
https://wordpress.org/plugins/bootstrap-3-shortcodes/
MIT License
377 stars 118 forks source link

Parse error in backend #81

Closed psteinweber closed 10 years ago

psteinweber commented 10 years ago

Hi there,

I just moved hosting environments and since this change I'm getting the following error message in the backend/wp-admin:

Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/xxxxxxx/public_html/wp-content/plugins/bootstrap-3-shortcodes/includes/bootstrap-shortcodes-help.php on line 24

The message is being displayed at the very bottom of the admin panel. It also prevents some functionality in the admin panel from working correctly, e.g. showing submenus on hover, changing permalink of posts, quick edit of posts etc...

The error is gone and everything works fine without the plugin. I already deleted the shortcode plugin folder and installed the newest version, but same issue.

Any ideas how to solve this? Thanks in advance!

Philipp

simonyeldon commented 10 years ago

That line has a namespace declaration on it. Can you confirm what version of PHP you're using on your new environment?

Namespaces were introduced in PHP 5.3 and as such you need to run a version >= to 5.3

psteinweber commented 10 years ago

It's runnning PHP Version 5.2.17. Shared hosting, so not much one can do about it. Any chance of making it compatible? Seems to be only a file related to documentation.

Thanks.

simonyeldon commented 10 years ago

I cant speak for all the maintainers on this repository, but my feeling is we would be willing to support any officially supported PHP versions. 5.2.17 has reached its end of life, and as such is no longer supported by PHP. Please see http://php.net/eol.php

I would also strongly suggest that you review your hosting provider as they are providing you with an inherently insecure system

psteinweber commented 10 years ago

Thanks for the advice!

I was able to change to PHP 5.3 via a htaccess flag, and phpinfo confirms it with PHP Version 5.3.28 running.

However, there's still a related error message, even though it slightly evolved:

Warning: require_once(php_markdown/Michelf/MarkdownExtra.inc.php) [function.require-once]: failed to open stream: No such file or directory in /home/XXXXX/public_html/wp-content/plugins/bootstrap-3-shortcodes/includes/bootstrap-shortcodes-help.php on line 19

Fatal error: require_once() [function.require]: Failed opening required 'php_markdown/Michelf/MarkdownExtra.inc.php' (include_path='.:/opt/php53/lib/php') in /home/XXXXX/public_html/wp-content/plugins/bootstrap-3-shortcodes/includes/bootstrap-shortcodes-help.php on line 19

Any advice on this one? Thank you!

simonyeldon commented 10 years ago

Did you install from the wordpress plugin repo or from github?

If you downloaded from github you also need to download the submodule https://github.com/michelf/php-markdown into the php_markdown folder or if you cloned the repository then you can run git submodule init

psteinweber commented 10 years ago

Thanks for your time Simon, switched over to the repo version. Wasn't aware this exists. Resolved.