Question

PHP Error 503 in Apache

Posted September 29, 2021 77 views
ApachePHP

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] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13
[0x00007f9791015070] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/index.php:17

[29-Sep-2021 18:45:50] [pool marroquin] pid 18826
scriptfilename = /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] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/astra-addon/classes/builder/class-astra-addon-builder-customizer.php:124
[0x00007f9791015d10] loadheadercomponents() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/astra-addon/classes/builder/class-astra-addon-builder-customizer.php:70
[0x00007f9791015c00] loadbasecomponents() /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] INCLUDEOREVAL /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] getinstance() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/astra-addon/classes/class-astra-addon-builder-loader.php:75
[0x00007f9791015800] INCLUDEOREVAL /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] doaction() /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] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-config.php:139
[0x00007f97910151a0] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-load.php:50
[0x00007f9791015100] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13
[0x00007f9791015070] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/index.php:17

[29-Sep-2021 18:45:50] [pool marroquin] pid 18827
scriptfilename = /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] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-content/themes/astra/inc/customizer/class-astra-builder-customizer.php:246
[0x00007f9791016990] loadheadercomponents() /srv/users/marroquin/apps/marroquin/public/wp-content/themes/astra/inc/customizer/class-astra-builder-customizer.php:216
[0x00007f9791016890] loadbasecomponents() /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] INCLUDEOREVAL /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] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-content/themes/astra/functions.php:156
[0x00007f97910153f0] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-settings.php:546
[0x00007f9791015240] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-config.php:139
[0x00007f97910151a0] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-load.php:50
[0x00007f9791015100] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13
[0x00007f9791015070] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/index.php:17

[29-Sep-2021 18:45:50] [pool marroquin] pid 18829
scriptfilename = /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
autoloadcall() /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] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/wp-rocket/inc/3rd-party/3rd-party.php:34
[0x00007f97910159e0] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/wp-rocket/inc/main.php:68
[0x00007f9791015620] rocketinit() /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] doaction() /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] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-config.php:139
[0x00007f97910151a0] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-load.php:50
[0x00007f9791015100] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13
[0x00007f9791015070] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/index.php:17

[29-Sep-2021 18:46:10] [pool marroquin] pid 18836
scriptfilename = /srv/users/marroquin/apps/marroquin/public/index.php
[0x00007f9791015a80] mysqli
query() /srv/users/marroquin/apps/marroquin/public/wp-includes/wp-db.php:2056
[0x00007f9791015a10] doquery() /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] getrow() /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] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-settings.php:409
[0x00007f9791015240] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-config.php:139
[0x00007f97910151a0] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-load.php:50
[0x00007f9791015100] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13
[0x00007f9791015070] INCLUDEOREVAL /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] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-config.php:139
[0x00007f97910151a0] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-load.php:50
[0x00007f9791015100] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13
[0x00007f9791015070] INCLUDEOREVAL /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] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-config.php:139
[0x00007f97910151a0] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-load.php:50
[0x00007f9791015100] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13
[0x00007f9791015070] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/index.php:17

[29-Sep-2021 18:46:37] [pool marroquin] pid 18857
scriptfilename = /srv/users/marroquin/apps/marroquin/public/index.php
[0x00007f9791015e60] mysqli
query() /srv/users/marroquin/apps/marroquin/public/wp-includes/wp-db.php:2056
[0x00007f9791015df0] doquery() /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] getresults() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/redirection/models/redirect/redirect.php:304
[0x00007f9791015980] get
formatchedurl() /srv/users/marroquin/apps/marroquin/public/wp-content/plugins/redirection/models/redirect/redirect.php:279
[0x00007f97910158b0] getforurl() /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] applyfilters() /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] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-config.php:139
[0x00007f97910151a0] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-load.php:50
[0x00007f9791015100] INCLUDEOREVAL /srv/users/marroquin/apps/marroquin/public/wp-blog-header.php:13
[0x00007f9791015070] INCLUDEOREVAL /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?

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.

×
Submit an Answer
1 answer

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.