• We value your experience with Plesk during 2026
    Please help us understand which Plesk features made your work easier this year, what is still missing and how AI should help you in Plesk ?
    Take this short 5-minutes survey. Your answers go straight into the Plesk roadmap for 2027.

Internal error: PHP Warning : Invalid argument supplied for foreach

Webroy

Regular Pleskian
I have installed plesk 10.3 with centos 5.5.

In plesk i am getting this error:

Internal error: PHP Warning : Invalid argument supplied for foreach()
Message PHP Warning : Invalid argument supplied for foreach()
File Config.php
Line 124
Type Base_SyntaxException


Any ideas?
 
How this error can be reproduced? What sort of errors in /var/log/sw-cp-server/error_log ? What is version of PHP you have?
 
Hi Igor,

I am using php 5.2.17

This is the error log :

2011-09-01 09:38:21: (log.c.135) server stopped
2011-09-01 09:46:34: (log.c.75) server started
2011-09-01T09:47:06+02:00 CRIT (2): Base_SyntaxException: PHP Warning : Invalid argument supplied for foreach()
file: /usr/local/sb/include/SB/Config.php
line: 124
code: 2
all children busy, launch additional (total 3, limit 30)
2011-09-01 09:50:51: (log.c.135) server stopped
2011-09-01 09:50:57: (log.c.75) server started
2011-09-01T09:51:11+02:00 CRIT (2): Base_SyntaxException: PHP Warning : Invalid argument supplied for foreach()
file: /usr/local/sb/include/SB/Config.php
line: 124
code: 2
2011-09-01T09:51:19+02:00 CRIT (2): Base_SyntaxException: PHP Warning : Invalid argument supplied for foreach()
file: /usr/local/sb/include/SB/Config.php
line: 124
code: 2
 
I tried the bootstrapper repair but i am getting this error:

Stop running named daemon
Trying to stop service named... number of zones: 2
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/1000
tcp clients: 0/100
server is up and running
named dead but pid file exists
done
Trying to untar named run-root directory structure...
ERROR while trying to untar named run-root directory structure
 
Hi Igor,

I did a upgrade to plesk 10.3.1 the upgrade went oke. But when i logged into plesk i stell get :

Message PHP Warning : Invalid argument supplied for foreach()
File Config.php
Line 124
Type Base_SyntaxException
 
Do you have custom PHP on your server or PHP what is shipped with Plesk and available for selection in autoinstaller?
 
I have installed the php of atomic. On other servers i have also installed this version of php ( most of them are still plesk 9.5)
 
I cannot see wat is on that line:

Message PHP Warning : Invalid argument supplied for foreach()
File Config.php
Line 124
Type Base_SyntaxException

Can it be a corrupt file ore something else? Is there something missing?

Plesk is giving that error but al the domains are not working to. I get the default apache page.

When i start plesk i am NOT getting any error, login i good to. But when i go to domains or to the control panel i get this error...
 
More in the error log:

2011-09-01T11:02:18+02:00 CRIT (2): Base_SyntaxException: PHP Warning : Invalid argument supplied for foreach()
file: /usr/local/sb/include/SB/Config.php
line: 124
code: 2
2011-09-01 11:02:18: (mod_fastcgi.c.2588) FastCGI-stderr: Error report was sent successfully
Report body:
<?xml version="1.0"?>
<error><type>Base_SyntaxException</type><message>PHP Warning : Invalid argument supplied for foreach()</message><file>/usr/local/sb/include/SB/Config.php</file><line>124</line><code>2</code><trace>#0 /usr/local/sb/include/SB/Config.php(124): Base_SyntaxException::handleError(2, 'Invalid argumen...', '/usr/local/sb/i...', 124, Array)
#1 /usr/local/sb/include/SB/Config.php(89): SB_Config-&gt;_loadConfigIni()
#2 /usr/local/sb/include/SB/Config.php(45): SB_Config-&gt;_loadConfig()
#3 /usr/local/sb/include/SB/Config.php(55): SB_Config-&gt;__construct()
#4 /usr/local/sb/include/SB/Application/Abstract.php(26): SB_Config::getInstance()
#5 /usr/local/sb/include/SB/Application/Api.php(19): SB_Application_Abstract-&gt;__construct()
#6 /usr/local/psa/admin/plib/Sitebuilder/Connector.php(16): SB_Application_Api::init()
#7 /usr/local/psa/admin/plib/Limits/DomainLimitsManager.php(185): Sitebuilder_Connector::getInstance()
#8 /usr/local/psa/admin/plib/Limits/LimitsManager.php(439): DomainLimitsManager-&gt;doGetUsed('max_site_builde...')
#9 /usr/local/psa/admin/plib/CommonPanel/Controller/Helper/Subscription.php(271): LimitsManager-&gt;getUsed('max_site_builde...')
#10 /usr/local/psa/admin/plib/CommonPanel/Controller/Helper/Subscription.php(56): CommonPanel_Controller_Helper_Subscription::_getLimitDetails(Object(DomainLimitsManager), 'max_site_builde...')
#11 /usr/local/psa/admin/panel/application/controllers/SubscriptionController.php(190): CommonPanel_Controller_Helper_Subscription::getCustomResourceLimits(Object(DomainLimitsManager))
#12 /usr/local/psa/admin/plib/Zend/Controller/Action.php(503): SubscriptionController-&gt;overviewAction()
#13 /usr/local/psa/admin/plib/Zend/Controller/Dispatcher/Standard.php(285): Zend_Controller_Action-&gt;dispatch('overviewAction')
#14 /usr/local/psa/admin/plib/Zend/Controller/Front.php(934): Zend_Controller_Dispatcher_Standard-&gt;dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#15 /usr/local/psa/admin/panel/application/library/AdminPanel/Application/Web.php(21): Zend_Controller_Front-&gt;dispatch()
#16 /usr/local/psa/admin/panel/application/public/index.php(15): AdminPanel_Application_Web-&gt;run()
#17 {main}</trace><user-ip>::ffff:xxx</user-ip><host>1.2.3.4:8443</host><request-url>/admin/subscription/overview/id/108</request-url><request-method>GET</request-method><product-version>10.3.1 CentOS 5 1013110726.09
</product-version></error>
 
There is really something wrong with PHP. I see SiteBuilder errors there. I think it would be more effectively if you contact Support Team for detailed investigation directly on your server.
 
Back
Top