bitnami / vms

Bitnami VMs
https://bitnami.com
Other
206 stars 43 forks source link

[WordPress] Failed to start Apache after installing new plugin #1482

Closed peterlemacts closed 5 months ago

peterlemacts commented 5 months ago

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

12345

bndiagnostic output

? Resources: Found possible issues ✓ Connectivity: No issues found ✓ Mariadb: No issues found ✓ Processes: No issues found ✓ Wordpress: No issues found ? Apache: Found possible issues ✓ Php: No issues found

bndiagnostic was not useful. Could you please tell us why?

When doing the suggested changes, other things break

Describe your issue as much as you can

Hi,

We've been using a bitnami wordpress ami for some time. Yesterday a colleague updated a plugin through the user interface and it crashed the site. I have been trying to get everything backup again but I am running into apache issues somehow. Several questions:

===== Begin of bndiagnostic tool output =====

Action '-t -f /opt/bitnami/apache2/conf/httpd.conf' failed. The Apache error log may have more information.

? Resources: Found possible issues
✓ Connectivity: No issues found
✓ Mariadb: No issues found
✓ Processes: No issues found
✓ Wordpress: No issues found
? Apache: Found possible issues
✓ Php: No issues found

[Resources]

Your instance has little available RAM memory.

 total used free shared buff/cache available Mem: 954 588 63 30 302 188 Swap:
634 50 584

Press [Enter] to continue: You could try to increase your instance's memory. Please check your cloud provider's documentation for more information.

[Apache]

Found recent error or warning messages in the Apache error log.

[Thu Apr 11 05:17:49.327702 2024] [proxy_fcgi:error] [pid 3736:tid
140505216116480] [client **ip_address**:32968] AH01071: Got error 'PHP message:
PHP Fatal error: Uncaught Error: Class "WP_Translation_Controller" not found in
/opt/bitnami/wordpress/wp-includes/l10n.php:796
Stack trace:
#0 /opt/bitnami/wordpress/wp-includes/l10n.php(953): load_textdomain()
#1 /opt/bitnami/wordpress/wp-settings.php(581): load_default_textdomain()
#2 /bitnami/wordpress/wp-config.php(192): require_once('...')\ [Thu Apr 11
05:18:30.752763 2024] [proxy_fcgi:error] [pid 3239:tid 140505803212544] [client
**ip_address**:49903] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught
Error: Class "WP_Translation_Controller" not found in
/opt/bitnami/wordpress/wp-includes/l10n.php:796
Stack trace:
#0 /opt/bitnami/wordpress/wp-includes/l10n.php(953): load_textdomain()
#1 /opt/bitnami/wordpress/wp-settings.php(581): load_default_textdomain()
#2 /bitnami/wordpress/wp-config.php(192): require_once('...')
Press [Enter] to continue:
# [Thu Apr 11 05:18:38.080291 2024] [proxy_fcgi:error] [pid 3736:tid
140505199331072] [client **ip_address**:45668] AH01071: Got error 'PHP message:
PHP Fatal error: Uncaught Error: Class "WP_Translation_Controller" not found in
/opt/bitnami/wordpress/wp-includes/l10n.php:796
Stack trace:
#0 /opt/bitnami/wordpress/wp-includes/l10n.php(953): load_textdomain()
#1 /opt/bitnami/wordpress/wp-settings.php(581): load_default_textdomain()
#2 /bitnami/wordpress/wp-config.php(192): require_once('...')\n```
Please check the following guide to troubleshoot server issues:

https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-erro
rs-apache/

The Apache configuration has errors:

apache2: Syntax error on line 145 of /opt/bitnami/apache2/conf/httpd.conf: module unixd_module is built-in and can't be loaded


Please check the configuration.

Basically two errors
- The PHP load_textdomain() error seems to be related to an update to a recent wordpress update that is not fully compatible with the latest version of all plugins. So my plan was to disable all plugins and add them one by one and see where the problem is. However as apache is not running, I cannot do that right now as even wp plugin list gives the error

PHP Fatal error:  Uncaught Error: Class "WP_Translation_Controller" not found in /opt/bitnami/wordpress/wp-includes/l10n.php:796

- The error module unixd_module is built-in and can't be loaded looks quite specific and obvious. However when when I comment the corresponding line in httpd.conf, The apache server logs have this kind of error mesasge

AH00136: Server MUST relinquish startup privileges before accepting connections.  Please ensure mod_unixd or other system security module is loaded.
AH00016: Configuration Failed

I feel like that if I can get Apache to work properly and can disable/enable plugins I can do the rest, but I seem to be stuck in the current settings. 

Many thanks for your help!
jotamartos commented 5 months ago

This seems to be a problem with the Divi theme in WordPress

https://wordpress.org/support/topic/wordpress-6-5-divi-fatal-error/

If you can't access the admin interface now, you can either use the WP CLI tool

https://docs.bitnami.com/general/apps/wordpress/administration/use-wpcli/

or rename the themes and plugins folders inside the /opt/bitnami/wordpress/wp-content folder to disable them. You can recover them later one by one to ensure everything works as expected.

peterlemacts commented 5 months ago

Hi @jotamartos, thanks a lot for your quick response. We are not using the Divi theme, but I could imagine that another theme would have similar issues.

I renamed all folders in /plugins and in /themes and then I executed sudo /opt/bitnami/ctlscript.sh restart. I do get the same errors as previously. Is there another way I need to restart the installation?

Additionally I cannot use the WP CLI as doing something like sudo wp plugin deactivate --all results in the message " Uncaught Error: Class "WP_Translation_Controller" not found in /opt/bitnami/wordpress/wp-includes/l10n.php"

PS I have a diagnostic id : e1674232-00fc-ba31-3e48-46876fbdc586

jotamartos commented 5 months ago

I renamed all folders in /plugins and in /themes and then I executed sudo /opt/bitnami/ctlscript.sh restart. I do get the same errors as previously. Is there another way I need to restart the installation?

If renaming the plugins and themes folder doesn't resolve the issue, there may be something wrong in the WordPress' code. In this case, it's better if you contact the app's developers to try to know more about the issue and what to do to recover it.

github-actions[bot] commented 5 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 5 months ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.