jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

PHP 7.1 Compatibility

Open jeherve opened this issue 9 years ago • 19 comments

Synopsis: As PHP 7.1 becomes more and more popular, we should make sure Jetpack is fully compatible.

Responsible: @zinigor

Complete: 70%

Difficulty: 10

Last Updated: May 3rd, 2017 (by @zinigor)

jeherve avatar Jan 16 '17 14:01 jeherve

According to #5821, Jetpack is fully compatible with PHP 7.1, but we can't merge it yet because it fails with WordPress 4.6. I propose we add 7.1 to allow_failures for now and merge it anyway.

zinigor avatar Jan 16 '17 14:01 zinigor

We've had multiple reports of failures (notices, fatal errors, ...) with PHP 7.1 in the past few weeks, so more unit tests is definitely good.

jeherve avatar Jan 16 '17 14:01 jeherve

Error logs from a user with 7.1.1 in 3018870-t.

Downgrading to 7.0 resolved.

cena avatar Jan 23 '17 18:01 cena

Error logs from another user with 7.1 in 3110100-t.

Downgrading to 7.0 resolved them.

richardmtl avatar Mar 17 '17 15:03 richardmtl

Error logs from another user: 3141978-t

Asked to downgrade to 7.0 to see if that resolves the issue. Will report back once they respond.

csonnek avatar Apr 04 '17 18:04 csonnek

Even on Jetpack 4.8, php 7.1 is still a no-go for me. Disabling opcache works of course.

xyzulu avatar Apr 05 '17 05:04 xyzulu

@xyzulu have you tried upgrading to latest PHP 7.1 since they have deployed a fix for the opcache segfault? If you can try the newest version, that would be very helpful. And if it still doesn't work, can you give us at least some error messages and logs?

Thank you!

zinigor avatar May 03 '17 19:05 zinigor

7.1.4 still same issue..

xyzulu avatar May 03 '17 21:05 xyzulu

@xyzulu can you please describe the symptoms you're getting? Also, how is your opcache configured? I'm running 7.1.4 with opcache enabled through FPM, albeit on the settings close to default, and I can't reproduce any errors.

zinigor avatar May 04 '17 09:05 zinigor

  • Switch to php 7.1 (opcache enabled .. FPM) then visit the Jetpack dashboard on wordpress.com
  • Attempting to retrieve the site settings/plugins etc shows you an error

xyzulu avatar May 04 '17 09:05 xyzulu

Thank you, I was able to reproduce, currently trying to narrow it down to file a bug. It doesn't look like it has something to do with Jetpack code, though. I'll post here when I find out more.

zinigor avatar May 04 '17 14:05 zinigor

Created a new bug report for PHP 7.1.4, let's see where that goes.

zinigor avatar May 04 '17 21:05 zinigor

3298603-t

User is reporting that the iOS app app shows no posts, pages, or comments. Gets the following error when trying to update:

Unable to sync
The Jetpack site is inaccessible or returned an error: transport error -- http
status code was not 200
(502) [-32300]

Asked them for server error logs, and requested that they ask their host to roll back their PHP version.

jenhooks avatar Jun 30 '17 19:06 jenhooks

@zinigor On the PHP bug report, can you add a permalink to the code? master has changed in the last couple of months and not sure which lines segfault now.

kraftbj avatar Jul 12 '17 15:07 kraftbj

I'm getting the same on a clean install of Ubuntu 16.04.2, PHP 7.1.7 (FPM), Apache, latest WordPress and Jetpack - which is also throwing the error 503 in the iOS app.

PHP FPM log shows very little:

[01-Aug-2017 20:40:15] WARNING: [pool www] child 3372 exited on signal 11 (SIGSEGV) after 21.649971 seconds from start [01-Aug-2017 20:40:15] NOTICE: [pool www] child 3375 started

Downgrading to PHP 7.0 works fine.

andysh-uk avatar Aug 01 '17 20:08 andysh-uk

@pandy06269 yep, you're not the only one. Thousands of Wordpress clients here on my fresh new PHP 7.1.7 servers, all the same problems. The only "solution" here (because I still want to keep the opcache enabled of course) was defining if ( defined( 'XMLRPC_REQUEST' ) && true === XMLRPC_REQUEST ) { ini_set( 'opcache.enable', 0 ); } in all the wp-config.php files of all the clients... 😳

HansVanEijsden avatar Aug 01 '17 21:08 HansVanEijsden

There hasn't been any traction on the PHP bug report. @zinigor Is it time for us to shiv something in place to work around this?

kraftbj avatar Aug 01 '17 22:08 kraftbj

@zinigor is this really only blocked by https://github.com/Automattic/jetpack/issues/6629 ?

Can we mark this one as closed and defer only to 6629?

kraftbj avatar Aug 02 '17 22:08 kraftbj

Yes, let's close this one and leave only the remaining issue, thanks!

zinigor avatar Aug 17 '17 17:08 zinigor