bitnami / containers

Bitnami container images
https://bitnami.com
Other
3.41k stars 4.87k forks source link

[bitnami/wordpress] Stuck on older Wordpress Docker due to failure with "wp_execute_print_output core update-db" #23140

Closed Paperone80 closed 1 year ago

Paperone80 commented 1 year ago

Name and Version

bitnami/wordpress:5.8.6

What steps will reproduce the bug?

Trying to change the image tag to latest.

What is the expected behavior?

Update Wordpress to 6.1.1

What do you see instead?

wordpress_1  | + wp_execute_print_output core update-db
compose.cli.verbose_proxy.proxy_callable: docker wait <- (u'a64e8ecc7560fa1a321f5ebdedb7f9c7885293c5fb4d590b828d5a63c8e77cb6')
compose.cli.verbose_proxy.proxy_callable: docker inspect_container <- (u'a64e8ecc7560fa1a321f5ebdedb7f9c7885293c5fb4d590b828d5a63c8e77cb6')
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.25/containers/a64e8ecc7560fa1a321f5ebdedb7f9c7885293c5fb4d590b828d5a63c8e77cb6/json HTTP/1.1" 200 None

docker_wordpress_1 exited with code 255

Additional information

No response

javsalgar commented 1 year ago

Hi,

Could you launch the image with the env var BITNAMI_DEBUG=true? This should provide more output.

Paperone80 commented 1 year ago

@javsalgar , thanks for the help. Here is the new log output: Additionally, I had to change the line in httpd.conf to adjust for PHP8: Old LoadModule php7_module modules/libphp7.so

New LoadModule php_module modules/libphp.so

wordpress_1 | + wp_execute_print_output core update-db

wordpress_1 | + env=('env' 'WP_CLI_CONFIG_PATH=/opt/bitnami/wp-cli/conf/wp-cli.yml' 'WP_CLI_CACHE_DIR=/dev/null') wordpress_1 | + local -a env wordpress_1 | + cmd=('/opt/bitnami/php/bin/php' '/opt/bitnami/wp-cli/bin/wp-cli.phar' 'core' 'update-db') wordpress_1 | + local -a cmd wordpress_1 | + local -a wp_extra_cli_flags wordpress_1 | + read -r -a wp_extra_cli_flags wordpress_1 | + [[ 0 -gt 0 ]] wordpress_1 | + am_i_root wordpress_1 | ++ id -u wordpress_1 | + [[ 1001 = \0 ]] wordpress_1 | + false wordpress_1 | + env WP_CLI_CONFIG_PATH=/opt/bitnami/wp-cli/conf/wp-cli.yml WP_CLI_CACHE_DIR=/dev/null /opt/bitnami/php/bin/php /opt/bitnami/wp-cli/bin/wp-cli.phar core update-db wordpress_1 | [07-Feb-2023 10:47:09 UTC] PHP Warning: Constant CRYPT_BLOWFISH already defined in phar:///opt/bitnami/wp-cli/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1296) : eval()'d code on line 30 wordpress_1 | [07-Feb-2023 10:47:09 UTC] PHP Deprecated: Return type of WP_Hook::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 498 wordpress_1 | [07-Feb-2023 10:47:09 UTC] PHP Deprecated: Return type of WP_Hook::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 511 wordpress_1 | [07-Feb-2023 10:47:09 UTC] PHP Deprecated: Return type of WP_Hook::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 524 wordpress_1 | [07-Feb-2023 10:47:09 UTC] PHP Deprecated: Return type of WP_Hook::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 537 wordpress_1 | [07-Feb-2023 10:47:09 UTC] PHP Deprecated: Return type of WP_Hook::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 548 wordpress_1 | [07-Feb-2023 10:47:09 UTC] PHP Deprecated: Return type of WP_Hook::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 440 wordpress_1 | [07-Feb-2023 10:47:09 UTC] PHP Deprecated: Return type of WP_Hook::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 454 wordpress_1 | [07-Feb-2023 10:47:09 UTC] PHP Deprecated: Return type of WP_Hook::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 468 wordpress_1 | [07-Feb-2023 10:47:09 UTC] PHP Deprecated: Return type of WP_Hook::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 485 wordpress_1 | wordpress_1 | Deprecated: Return type of WP_Hook::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 498 wordpress_1 | wordpress_1 | Deprecated: Return type of WP_Hook::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 511 wordpress_1 | wordpress_1 | Deprecated: Return type of WP_Hook::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 524 wordpress_1 | wordpress_1 | Deprecated: Return type of WP_Hook::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 537 wordpress_1 | wordpress_1 | Deprecated: Return type of WP_Hook::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 548 wordpress_1 | wordpress_1 | Deprecated: Return type of WP_Hook::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 440 wordpress_1 | wordpress_1 | Deprecated: Return type of WP_Hook::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 454 wordpress_1 | wordpress_1 | Deprecated: Return type of WP_Hook::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 468 wordpress_1 | wordpress_1 | Deprecated: Return type of WP_Hook::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /bitnami/wordpress/wp-includes/class-wp-hook.php on line 485 wordpress_1 | Warning: require_once(/opt/bitnami/wordpress/wp-includes/class-wp-textdomain-registry.php): Failed to open stream: No such file or directory in /opt/bitnami/wordpress/wp-settings.php on line 155 wordpress_1 | Fatal error: Uncaught Error: Failed opening required '/opt/bitnami/wordpress/wp-includes/class-wp-textdomain-registry.php' (include_path='.:/opt/bitnami/php/lib/php') in /opt/bitnami/wordpress/wp-settings.php:155 wordpress_1 | Stack trace: wordpress_1 | #0 phar:///opt/bitnami/wp-cli/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1336): require() wordpress_1 | #1 phar:///opt/bitnami/wp-cli/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1254): WP_CLI\Runner->load_wordpress() wordpress_1 | #2 phar:///opt/bitnami/wp-cli/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start() wordpress_1 | #3 phar:///opt/bitnami/wp-cli/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process() wordpress_1 | #4 phar:///opt/bitnami/wp-cli/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap() wordpress_1 | #5 phar:///opt/bitnami/wp-cli/bin/wp-cli.phar/php/boot-phar.php(11): include('...') wordpress_1 | #6 /opt/bitnami/wp-cli/bin/wp-cli.phar(4): include('...') wordpress_1 | #7 {main} wordpress_1 | thrown in /opt/bitnami/wordpress/wp-settings.php on line 155 ... docker_wordpress_1 exited with code 255

Paperone80 commented 1 year ago

@javsalgar, found the culprit.

In docker-compose.yml, section environemnt, I had persisted wp-admin and wp-includes which caused a lot of issues.

New settings which seems to be working fine: - WORDPRESS_DATA_TO_PERSIST=wp-config.php wp-content wordfence-waf.php

@javsalgar , thanks for the hint with BITNAMI_DEBUG=true.

I noticed now BITNAMI_DEBUG is in a lot of scripts but not mentioned in the environment variable section of the docs.

Maybe worth adding to the Wordpress Readme.md environment-variables section?