PHP 7.0 compatibility
-
I currently have the latest Cloudflare install, but since I’m using PHP 7.0 it seems to be incompatible. Is there any timeline to adding this?
Thanks,
Kevin
-
Hi,
The plugin is compatible with PHP 7.0 can you give me some more details about whats breaking? Are you seeing errors in the browser logs or php error logs? Is specific functionality not working?
Thanks,
JohnThe problem I’m getting is that’s is requesting php5-curl. It notifies me of this when I try to activate it.
I’m also running a multi site if that makes a difference.
Best,
KevinHe probably has php7-curl installed. We’ll need to revisit how we detect curl I think.
@furkan811 correct, I don’t have php5 installed at all currently, it’s a fresh DO server with just PHP7. As @jwineman mentioned I do have PHP 7 curl installed though.
Hey,
So looks like I was mistaken, we don’t check for ext5-curl we check for
!extension_loaded('curl')
https://github.com/cloudflare/CloudFlare-Wordpress/blob/master/src/WordPress/Hooks.php#L100So it looks like you haven’t installed curl on your server yet. You can try:
apt-get install php-curl
Thanks,
JohnThat was it! My apologies for missing that, thank you for your support!
No worries! Thanks for using Cloudflare!
To add to this, when I do a scan of my site with PHP Compatibility checker I get the following errors… I am looking to upgrade my website to PHP 7.x and this plugin is currently the only thing holding me back from just going for it although its not in the end going to keep me from it if I have to stop using the cloudflare plugin altogether if need be.
Although I’m sure there is a reason I am seeing this. Currently I am running PHP 5.6 on a siteground server and WordPress 4.7 (latest). Also using W3TC for caching etc.
FILE: …/wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorApplyBatched.php
——————————————————————————————————————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
——————————————————————————————————————————————————————-
3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
——————————————————————————————————————————————————————-FILE: …/wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorClassFactory.php
——————————————————————————————————————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
——————————————————————————————————————————————————————-
3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
——————————————————————————————————————————————————————-FILE: …/wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/MapResourceIteratorFactory.php
——————————————————————————————————————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
——————————————————————————————————————————————————————-
3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
——————————————————————————————————————————————————————-FILE: …/wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/CompositeResourceIteratorFactory.php
——————————————————————————————————————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
——————————————————————————————————————————————————————-
3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
——————————————————————————————————————————————————————-FILE: …/wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorInterface.php
——————————————————————————————————————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
——————————————————————————————————————————————————————-
3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
——————————————————————————————————————————————————————-FILE: …/wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/AbstractResourceIteratorFactory.php
——————————————————————————————————————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
——————————————————————————————————————————————————————-
3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
——————————————————————————————————————————————————————-FILE: …/wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorFactoryInterface.php
——————————————————————————————————————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
——————————————————————————————————————————————————————-
3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
——————————————————————————————————————————————————————-FILE: …/wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIterator.php
——————————————————————————————————————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
——————————————————————————————————————————————————————-
3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
——————————————————————————————————————————————————————-FILE: …/wp-content/plugins/cloudflare/vendor/guzzle/guzzle/src/Guzzle/Service/Resource/Model.php
——————————————————————————————————————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
——————————————————————————————————————————————————————-
3 | ERROR | ‘resource’ is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
——————————————————————————————————————————————————————-We’re removing guzzle in the next release, this shouldn’t be an issue after that.
Thanks,
JohnWhen is the next release coming out that will be compatible with Php7?
@pateljxgmailcom,
Current version is compatible with PHP7. The given error is not used anywhere in the plugin and it’ll be removed in the next version.
In the near future – probably less than 2 weeks – the new version will be released.
Thanks….Will proceed accordingly. Love your service and the plugin.
- This reply was modified 7 years, 9 months ago by Anonymous User 11660062.
- The topic ‘PHP 7.0 compatibility’ is closed to new replies.