Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php error with latest version? #60

Open
elisehu opened this issue Dec 13, 2018 · 6 comments
Open

php error with latest version? #60

elisehu opened this issue Dec 13, 2018 · 6 comments

Comments

@elisehu
Copy link

elisehu commented Dec 13, 2018

All my shortcodes are broken now that I'm unable to activate this plugin -- Here's the message I get:

Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/mattstiles/webapps/heyelise/wp-content/plugins/pym-shortcode/inc/shortcode.php on line 8

Halp?

@benlk
Copy link
Collaborator

benlk commented Dec 13, 2018

Hi Elise; thanks for reporting this issue. Can you tell us:

  • the version of PHP you're using
  • the version of WordPress you're using
  • the version of the plugin you're using

This is line 8 of the current version of the plugin: https://github.com/INN/pym-shortcode/blob/f08d558680623e31294fb1d728a734db2f18e440/inc/shortcode.php#L8

If you're getting a T_STRING there, I'm worried that you're using a version of PHP that may not be supported by this plugin. We've required at least PHP 5.3 since Pym.js Embeds version 1.3.2.1, and the current version of the plugin is 1.3.2.2.

The current versions of the PHP language that are supported by PHP's maintainers are:

  • 5.6 (active support until last year, security-only support until the end of this month)
  • 7.1 (active support until last month, security-only support until 1 Dec 2019)
  • 7.2 (active support until 30 Nov 2019)
  • 7.3 (active support until 6 Dec 2020)

@elisehu
Copy link
Author

elisehu commented Dec 13, 2018

Hey team, yeah my theme was super old and they stopped updating it so in order to remove THAT variable, I updated to a new, supported theme. But when I tried to activate the plug-in, it still sent the same fatal error.

I'm running version 4.9.9 of WordPress. If the theme I'm now using is fresh, then I'm assuming the php version is much newer as well. Theoretically that would allow me to activate the plugin again, right?

@benlk
Copy link
Collaborator

benlk commented Dec 13, 2018

I'm running version 4.9.9 of WordPress. If the theme I'm now using is fresh, then I'm assuming the php version is much newer as well.

That's not necessarily the case; WordPress itself supports PHP versions back to PHP 5.2.

Assuming that /home/mattstiles/webapps/heyelise/ is the root of your WordPress site, if you put the following code in a file named "test-file.php" at /home/mattstiles/webapps/heyelise/test-file.php

<?php
phpinfo();

and then visit your-site/test-file.php in a browser, you should be able to see the output of the phpinfo function. It'll look something like this:

screen shot 2018-12-13 at 1 30 41 pm

What PHP version does phpinfo report?

If it's version 5.2 or prior:

@benlk
Copy link
Collaborator

benlk commented Dec 14, 2018

@benlk
Copy link
Collaborator

benlk commented Nov 14, 2019

  • provide message in admin, using that snippet, about PHP version dependency.

@benlk benlk removed this from the 1.3.2.3 milestone Mar 2, 2020
@benlk
Copy link
Collaborator

benlk commented Mar 2, 2020

Removing this from the 1.3.2.3 milestone because I don't have a way to test PHP < 7.3 at the moment, and also because PHP 5.6 has been EOL since 31 December 2018: https://www.php.net/eol.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants