PHP is not working after updating to PHP 8.1 RC5
Asked Answered
E

4

9

After updating PHP 7.4 to PHP 8.1 RC5, PHP has stopped working on my machine and produces following error:

PHP Warning: PHP Startup: ^(text/|application/xhtml+xml) (offset=0): unrecognised compile-time option bit(s) in Unknown on line 0

it produces the error even when I ask for php version:

PHP Warning:  PHP Startup: ^(text/|application/xhtml\+xml) (offset=0): unrecognised compile-time option bit(s) in Unknown on line 0
PHP 8.1.0RC5 (cli) (built: Nov  4 2021 14:57:53) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.0-dev, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.0RC5, Copyright (c), by Zend Technologies

OS: Ubuntu 20.04

updated using this repository:

sudo add-apt-repository ppa:ondrej/php

do you know what the problem could be?

Extreme answered 8/11, 2021 at 16:14 Comment(8)
Might be worth waiting until 8.1 is released in a few weeksBollix
Thats a Release Candidate so not actually ready for full release. Report issue to the PHP developers if you think there is a problem. Of course it may just be that the core PHP and an Extention are not yet compatibleBennir
I am getting this problem on 8.0.13Schutzstaffel
Same issue here with 8.0.13Hindrance
same issue here to with 8.0.13Shuster
Solved on PHP 8.0.13 by making apt update and apt upgradeHindrance
I think this is an issue in the ppa:ondrej/php repo. I'm getting the same error for PHP 8.0 from a container that was working up until a few days ago on debian with packages.sury.org. Issue is here: github.com/oerdnj/deb.sury.org/issues/1682Reinold
@DouglasRoos your comment should be the answer. It solved my problem too.Lethbridge
E
0

The problem is solved, just update the repository and re-install PHP 8.1. I think it was just in RC5

Extreme answered 10/12, 2021 at 16:23 Comment(0)
O
6

Under debian (i think is same for ubuntu), I fixed by doing:

sudo apt-get install libpcre2-8-0
Outwork answered 20/11, 2021 at 15:26 Comment(0)
H
3

Like @Douglas Roos said in comments,

sudo apt update
sudo apt upgrade

Will fix your problem.

Harrold answered 20/11, 2021 at 11:2 Comment(0)
E
0

The problem is solved, just update the repository and re-install PHP 8.1. I think it was just in RC5

Extreme answered 10/12, 2021 at 16:23 Comment(0)
D
0

The problem is also with old libpcre2 version 10.36, 10.40 works: https://bugs.php.net/bug.php?id=81557

Fixed on Debian with

aptitude install -V -t testing libpcre2-8-0
Daggett answered 2/9, 2022 at 3:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.