Question

PHP Error 503 in Apache

I’m getting a Service Unavailable message from the Chrome browser regarding Apache while I’m working on a WordPress site. I’m using Server Pilot with Digital Ocean.

The php 7.4 error log shows this: [29-Sep-2021 16:08:35 UTC] PHP Warning: Invalid argument supplied for foreach() in /srv/users/marroquin/apps/marroquin/public/wp-admin/includes/plugin.php on line 1758

The php 7.4 slow log shows this: [0x00007f9791015100] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13 [0x00007f9791015070] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/index.php:17

[29-Sep-2021 18:45:50] [pool marroquin] pid 18826 script_filename = /srv/users/marroquin/apps/marroquin/public/index.php [0x00007f9791015f10] __construct() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/astra-addon/classes/builder/type/header/menu/class-astra-addon-header-menu-component.php:45 [0x00007f9791015e80] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/astra-addon/classes/builder/class-astra-addon-builder-customizer.php:124 [0x00007f9791015d10] load_header_components() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/astra-addon/classes/builder/class-astra-addon-builder-customizer.php:70 [0x00007f9791015c00] load_base_components() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/astra-addon/classes/builder/class-astra-addon-builder-customizer.php:38 [0x00007f9791015a80] __construct() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/astra-addon/classes/builder/class-astra-addon-builder-customizer.php:244 [0x00007f9791015a10] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/astra-addon/classes/class-astra-addon-builder-loader.php:67 [0x00007f9791015940] __construct() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/astra-addon/classes/class-astra-addon-builder-loader.php:33 [0x00007f9791015880] get_instance() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/astra-addon/classes/class-astra-addon-builder-loader.php:75 [0x00007f9791015800] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/astra-addon/classes/class-astra-theme-extension.php:568 [0x00007f9791015620] setup() /srv/users/marroquin/apps/marroquin/public/wp-includes/class-wp-hook.php:303 [0x00007f9791015540] apply_filters() /srv/users/marroquin/apps/marroquin/public/wp-includes/class-wp-hook.php:327 [0x00007f97910154d0] do_action() /srv/users/marroquin/apps/marroquin/public/wp-includes/plugin.php:470 [0x00007f97910153f0] do_action() /srv/users/marroquin/apps/marroquin/public/wp-settings.php:556 [0x00007f9791015240] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-config.php:139 [0x00007f97910151a0] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-load.php:50 [0x00007f9791015100] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13 [0x00007f9791015070] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/index.php:17

[29-Sep-2021 18:45:50] [pool marroquin] pid 18827 script_filename = /srv/users/marroquin/apps/marroquin/public/index.php [0x00007f9791016cd0] __construct() /srv/users/marroquin/apps/marroquin/public/wp-content/themes/astra/inc/builder/type/header/woo-cart/class-astra-header-woo-cart-component.php:47 [0x00007f9791016c20] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-content/themes/astra/inc/customizer/class-astra-builder-customizer.php:246 [0x00007f9791016990] load_header_components() /srv/users/marroquin/apps/marroquin/public/wp-content/themes/astra/inc/customizer/class-astra-builder-customizer.php:216 [0x00007f9791016890] load_base_components() /srv/users/marroquin/apps/marroquin/public/wp-content/themes/astra/inc/customizer/class-astra-builder-customizer.php:37 [0x00007f9791016690] __construct() /srv/users/marroquin/apps/marroquin/public/wp-content/themes/astra/inc/customizer/class-astra-builder-customizer.php:375 [0x00007f9791016620] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-content/themes/astra/inc/builder/class-astra-builder-loader.php:69 [0x00007f9791016490] __construct() /srv/users/marroquin/apps/marroquin/public/wp-content/themes/astra/inc/builder/class-astra-builder-loader.php:33 [0x00007f97910163d0] get_instance() /srv/users/marroquin/apps/marroquin/public/wp-content/themes/astra/inc/builder/class-astra-builder-loader.php:166 [0x00007f9791016330] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-content/themes/astra/functions.php:156 [0x00007f97910153f0] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-settings.php:546 [0x00007f9791015240] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-config.php:139 [0x00007f97910151a0] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-load.php:50 [0x00007f9791015100] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13 [0x00007f9791015070] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/index.php:17

[29-Sep-2021 18:45:50] [pool marroquin] pid 18829 script_filename = /srv/users/marroquin/apps/marroquin/public/index.php [0x00007f97910165e0] strpos() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/woocommerce/packages/action-scheduler/classes/abstracts/ActionScheduler.php:113 [0x00007f9791016020] autoload() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/wp-rocket/inc/3rd-party/plugins/ecommerce/aelia-currencyswitcher.php:10 [0x00007f9791015fc0] spl_autoload_call() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/wp-rocket/inc/3rd-party/plugins/ecommerce/aelia-currencyswitcher.php:10 [0x00007f9791015f60] class_exists() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/wp-rocket/inc/3rd-party/plugins/ecommerce/aelia-currencyswitcher.php:10 [0x00007f9791015ea0] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/wp-rocket/inc/3rd-party/3rd-party.php:34 [0x00007f97910159e0] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/wp-rocket/inc/main.php:68 [0x00007f9791015620] rocket_init() /srv/users/marroquin/apps/marroquin/public/wp-includes/class-wp-hook.php:303 [0x00007f9791015540] apply_filters() /srv/users/marroquin/apps/marroquin/public/wp-includes/class-wp-hook.php:327 [0x00007f97910154d0] do_action() /srv/users/marroquin/apps/marroquin/public/wp-includes/plugin.php:470 [0x00007f97910153f0] do_action() /srv/users/marroquin/apps/marroquin/public/wp-settings.php:441 [0x00007f9791015240] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-config.php:139 [0x00007f97910151a0] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-load.php:50 [0x00007f9791015100] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13 [0x00007f9791015070] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/index.php:17

[29-Sep-2021 18:46:10] [pool marroquin] pid 18836 script_filename = /srv/users/marroquin/apps/marroquin/public/index.php [0x00007f9791015a80] mysqli_query() /srv/users/marroquin/apps/marroquin/public/wp-includes/wp-db.php:2056 [0x00007f9791015a10] _do_query() /srv/users/marroquin/apps/marroquin/public/wp-includes/wp-db.php:1945 [0x00007f9791015930] query() /srv/users/marroquin/apps/marroquin/public/wp-includes/wp-db.php:2615 [0x00007f9791015860] get_row() /srv/users/marroquin/apps/marroquin/public/wp-includes/option.php:171 [0x00007f9791015740] get_option() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/svg-support/svg-support.php:29 [0x00007f97910153f0] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-settings.php:409 [0x00007f9791015240] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-config.php:139 [0x00007f97910151a0] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-load.php:50 [0x00007f9791015100] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13 [0x00007f9791015070] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/index.php:17

[29-Sep-2021 18:46:18] [pool marroquin] pid 18840 script_filename = /srv/users/marroquin/apps/marroquin/public/index.php [0x00007f9791015240] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-config.php:139 [0x00007f97910151a0] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-load.php:50 [0x00007f9791015100] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13 [0x00007f9791015070] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/index.php:17

[29-Sep-2021 18:46:18] [pool marroquin] pid 18842 script_filename = /srv/users/marroquin/apps/marroquin/public/index.php [0x00007f9791015240] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-config.php:139 [0x00007f97910151a0] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-load.php:50 [0x00007f9791015100] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13 [0x00007f9791015070] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/index.php:17

[29-Sep-2021 18:46:37] [pool marroquin] pid 18857 script_filename = /srv/users/marroquin/apps/marroquin/public/index.php [0x00007f9791015e60] mysqli_query() /srv/users/marroquin/apps/marroquin/public/wp-includes/wp-db.php:2056 [0x00007f9791015df0] _do_query() /srv/users/marroquin/apps/marroquin/public/wp-includes/wp-db.php:1945 [0x00007f9791015d10] query() /srv/users/marroquin/apps/marroquin/public/wp-includes/wp-db.php:2695 [0x00007f9791015c20] get_results() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/redirection/models/redirect/redirect.php:304 [0x00007f9791015980] get_for_matched_url() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/redirection/models/redirect/redirect.php:279 [0x00007f97910158b0] get_for_url() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/redirection/modules/wordpress.php:328 [0x00007f9791015620] init() /srv/users/marroquin/apps/marroquin/public/wp-includes/class-wp-hook.php:303 [0x00007f9791015540] apply_filters() /srv/users/marroquin/apps/marroquin/public/wp-includes/class-wp-hook.php:327 [0x00007f97910154d0] do_action() /srv/users/marroquin/apps/marroquin/public/wp-includes/plugin.php:470 [0x00007f97910153f0] do_action() /srv/users/marroquin/apps/marroquin/public/wp-settings.php:578 [0x00007f9791015240] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-config.php:139 [0x00007f97910151a0] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-load.php:50 [0x00007f9791015100] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13 [0x00007f9791015070] INCLUDE_OR_EVAL /srv/users/marroquin/apps/marroquin/public/index.php:17

It seems like this wasn’t a problem a week or so ago…not sure what would have changed other than theme and plugin updates.

Any ideas on how to fix this?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @sherrigoodman,

I’ll recommend turning your attention to the error log and the message you posted:

The php 7.4 error log shows this:
[29-Sep-2021 16:08:35 UTC] PHP Warning: Invalid argument supplied for foreach() in /srv/users/marroquin/apps/marroquin/public/wp-admin/includes/plugin.php on line 1758

This means there is a PHP error somewhere in the file or a file that is using this plugin.php. It’s possible the error to appear from a plugin that is outdated or just doesn’t support the PHP 7.4 version.

Have you recently installed anything new or updated anything?

I’ll recommend trying with a lower PHP version as well. It might be beneficial.