-
Notifications
You must be signed in to change notification settings - Fork 1.1k
-
When I try to run with wordpress:5.8.3-php8.1 as my image, instead of being redirected to /wp-admin/install.php on first navigation, it throws a fatal error:
Fatal error: Uncaught mysqli_sql_exception: Table 'wordpress.wp_options' doesn't exist in /var/www/html/wp-includes/wp-db.php:2056
This seems to be isolated to PHP 8.1, as dropping my image down to wordpress:5.8.3-php8.0 gets me passed the error and onto the installation screen.
Any ideas what might be causing that? I am new to running WordPress in Docker so I do not want to exclude user error...
If you want to reproduce the error, you can use docker-compose:
version: '3' services: database: image: mariadb:10.6.5 restart: unless-stopped volumes: - database-volume:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: "root" MYSQL_DATABASE: "wordpress" MYSQL_USER: "wordpress" MYSQL_PASSWORD: "wordpress" networks: - wordpress web: image: wordpress:5.8.3-php8.1 restart: unless-stopped environment: WORDPRESS_DB_HOST: database WORDPRESS_DB_NAME: "wordpress" WORDPRESS_TABLE_PREFIX: "wp_" WORDPRESS_DB_USER: "wordpress" WORDPRESS_DB_PASSWORD: "wordpress" WORDPRESS_DEBUG: 1 ports: - 80:80 depends_on: - database networks: - wordpress networks: wordpress: volumes: database-volume:
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
Replies: 1 comment 3 replies
-
Turns out starting a discussion thread here was a form of rubber ducking.
The problem is something discussed with regards to the upcoming WordPress 5.9 release, described on the blog: PHP 8.1 MySQLi default error mode changed. I am a little surprised that the fix for this (which landed back in august!) was not back-ported to WP 5.8.
Have people just not been running on PHP 8.1? Or is it only a really breaking problem during installation, so people with existing blogs that are upgrading to PHP 8.1 after installation are never hit by it?
Beta Was this translation helpful? Give feedback.
All reactions
-
You beat me to it by about 20 seconds. 😂 ❤️
In the relevant bits of WordPress code, there's a suppress_errors bit of functionality which doesn't cope with this new exception default, but yeah, it appears it's probably only really used seriously on the initialization of a new site? 😅
There are 5.9 RCs available, so probably worth testing one of those to validate the fix? 😄
Beta Was this translation helpful? Give feedback.
All reactions
-
Yep, I just ran with wordpress:beta-5.9-RC2-php8.1 and it worked without issue. Again, I am surprised WordPress did not backport this.
It does make me wonder if offering a PHP 8.1 image at all is a good idea, if it is known installation cannot even run in it...
Beta Was this translation helpful? Give feedback.
All reactions
-
That type of issue is part of why it's not the default (yet) until WordPress says it's stable and recommended for use 😄
Once 5.9 leaves RCs, we won't be updating the 5.8 images any more, so I think it'll be a moot point either way "soon"
Beta Was this translation helpful? Give feedback.