English 日本語
INTERSTELLAR TECH BLOG

I got stuck with various errors when I moved my WordPress site for the first time in a while.

The reason for this was that I didn’t keep proper records of my work.

The cause was that all the PHP modules were missing.

php-mysqli

When accessing the site, an error message appears stating that the database cannot be connected.

Ah, I see… I don’t have php-mysql installed…

sudo apt install php-mysql

php-mbstring

When I accessed the site, only “A serious error has occurred” was displayed. I thought, “Hey, tell me what the problem is,” but when I looked at the nginx error log, the following was output.

2025/05/02 01:34:01 [error] 42975#42975: *260 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function mb_strtolower() in /var/www/example.com/wp-content/plugins/vk-all-in-one-expansion-unit/inc/display-ie-alert.php:12
Stack trace:
#0 /var/www/example.com/wp-content/plugins/vk-all-in-one-expansion-unit/inc/display-ie-alert.php(51): veu_is_ie()
#1 /var/www/example.com/wp-includes/class-wp-hook.php(324): veu_insert_alert()
#2 /var/www/example.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#3 /var/www/example.com/wp-includes/plugin.php(517): WP_Hook->do_action()
#4 /var/www/example.com/wp-includes/general-template.php(3224): do_action()
#5 /var/www/example.com/wp-content/themes/liquid-magazine/header.php(190): wp_body_open()
#6 /var/www/example.com/wp-includes/template.php(810): require_once('...')
#7 /var/www/example.com/wp-includes/template.php(745): load_template()
#8 /var/www/example.com/w" while reading response header from upstream, client: 111.217.190.239, server: example.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php-fpm.sock:", host: "example.com", referrer: "<https://example.com/wp-admin/network/about.php>"

The VK All in One Expansion Unit is calling an undefined function mb_strtolower(), causing an error.

This function belongs to the php-mbstring module.

Installing php-mbstring will resolve this issue.

sudo apt install php-mbstring

php-xml

When I accessed the site, the design was broken.

I checked the nginx error log and found the following.

2025/05/02 01:45:56 [error] 44674#44674: *39 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Class "DOMDocument" not found in /var/www/example.com/wp-content/plugins/wordpress-popular-posts/src/Output.php:176
Stack trace:
#0 /var/www/example.com/wp-content/plugins/wordpress-popular-posts/src/Shortcode/Posts.php(248): WordPressPopularPosts\\Output->get_output()
#1 /var/www/example.com/wp-includes/shortcodes.php(434): WordPressPopularPosts\\Shortcode\\Posts->handle()
#2 [internal function]: do_shortcode_tag()
#3 /var/www/example.com/wp-includes/shortcodes.php(273): preg_replace_callback()
#4 /var/www/example.com/wp-content/plugins/wordpress-popular-posts/src/template-tags.php(220): do_shortcode()
#5 /var/www/example.com/wp-content/themes/liquid-magazine/popularposts.php(132): wpp_get_mostpopular()
#6 /var/www/example.com/wp-content/themes/liquid-magazine/index.php(229): liquid_popular_post()
#7 /var/www/example.com/wp-includes/template-loader.php(106): include('...')
#8 /var/www/example.com/wp-blog-header.php(19): require_once('...')
#9 /var/www/m" while reading response header from upstream, client: 35.199.90.14, server: example.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php-fpm.sock:", host: "example.com"

The WordPressPopularPosts plugin is trying to use the DOMDocument class, but it cannot be found, resulting in an error.

This class belongs to the php-xml module.

Installing php-xml will resolve the issue.

sudo apt install php-xml

php-gd

When I accessed the site, the layout was broken and a message saying “A serious error has occurred on this site” appeared in the login status section.

Looking at the nginx error log, I found the following error.

2025/05/02 02:36:30 [error] 49059#49059: *2 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function imagecreatetruecolor() in /var/www/example.com/wp-content/plugins/siteguard/really-simple-captcha/siteguard-really-simple-captcha.php:181
Stack trace:
#0 /var/www/example.com/wp-content/plugins/siteguard/classes/siteguard-captcha.php(186): SiteGuardReallySimpleCaptcha->generate_image()
#1 /var/www/example.com/wp-content/plugins/siteguard/classes/siteguard-captcha.php(192): SiteGuard_CAPTCHA->put_captcha()
#2 /var/www/example.com/wp-includes/class-wp-hook.php(324): SiteGuard_CAPTCHA->handler_login_form()
#3 /var/www/example.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#4 /var/www/example.com/wp-includes/plugin.php(517): WP_Hook->do_action()
#5 /var/www/example.com/wp-content/plugins/wp-members/includes/class-wp-members-widget.php(280): do_action()
#6 /var/www/example.com/wp-content/plugins/wp-members/includes/class-wp-members-widget.php(115): widget_wpmemwidget->do_sidebar()
#7 /var/www/tmc-obog.co" while reading response header from upstream, client: 111.217.190.239, server: example.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php-fpm.sock:", host: "example.com"

SiteGuard is calling an undefined function imagecreatetruecolor() and causing an error.

This function belongs to php-gd.

Installing php-gd will resolve the issue.

sudo apt install php-gd

After all, work records are important.

That’s all for this time.

PAGE TOP