Does anyone know what causes this error?

warning: Invalid argument supplied for foreach() in /home/mugu/public_html/includes/common.inc on line 1352.

Mugu.Info displays this error intermittently on the admin page. Functionality is not affected, by this error. I have upgraded to 4.5.1.

Thanks in advance.

MuguMaster

Comments

MuguMaster’s picture

None of the Drupal Experts have any idea about this? I suspect it happened due to one of the many modules I have installed.

Do I have to remove all of the installed modules, return Drupal to its pristine state, then start to reinstall the modules to ascertain the culprit, then, post to the Dev responsible for the module? Is this the usual process? I am clueless when it comes to PHP/MySQL - and I am loathe to remove ALL of the added functionality.

TIA,
MM

http://mugu.info/ leading Nigerian 419 Advance Fee, Lottery and other internet Fraudsters up the garden path!

carlmcdade’s picture

I am looking at my common.inc at line 1352 and seeing a function. Is this warning coming from watchdog (admin log) or direct to page from PHP?

What are you running Drupal on ? Knowing PHP and MySQL versions help
---------------------------
info for Drupal installation
__________________________
Carl McDade
Information Technology Consult
Team Macromedia
www.hivemindz.com
www.fireorb.org

MuguMaster’s picture

I am looking at my common.inc at line 1352 and seeing a function. Is this warning coming from watchdog (admin log) or direct to page from PHP?

I dont know sorry. My knowledge is too scarce in this regard. Its intermittent and is really more aesthetic then anything else ...

I notice that once I login, if I go to the Administration page, the error is not displayed, then say I choose Content, the error is not displayed, then if I go to one of the nodes and edit it, the error is not displayed. If I then click on the Home link, the error is displayed.

I dont know if it only applies to the SuperUser or if it applies to the Registered Users and Anonymous as well. If it is restricted to the SuperUser, I dont really care as only I get to see it.

What are you running Drupal on ? Knowing PHP and MySQL versions help

Its a shared Linux hosting service and phpinfo.php shows me:

PHP Version = 4.3.9 and MySQLClient API version = 4.0.22 does that help any?

Thanks for your interest!

Mugu.Info leading Nigerian 419 Advance Fee, Lottery and other internet Fraudsters up the garden path!

jnt’s picture

I am seeing the exact same error. It is odd because it is very intermittant and appears not to correlate with any specific node selection. I also cannot see any site functionality impairment.

In my case I am getting about one incident per hour with very low loading (1-2 users)

I *believe*can make a slightly higher frequency of occurances by constantly recycling the watchdog listing.

It appears to me to occur *after* a period of time. That is, if everything is left alone for a while, it seems to be visible on the first action. I also believe there is a very slight delay apparent in the screen rendering when the incident occurs. Unfortunately, these characteristics are so slight as to be potentialy my imagination. I am using the PushButton theme.

I am running 4.5.1, with quite a few modules and I have not enabled the throttle configuration module.

jnt

MuguMaster’s picture

Thank heavens for that ... I thought I was the only one seeing it ... of course, I am sorry that more then one person is affected by it ... maybe the Drupal PHP Coders will take this up and rectify the fault ... =8^)

--
MuguMaster

Mugu.Info, leading Nigerian 419 Advance Fee, Lottery and other internet Fraudsters up the garden path!

killes@www.drop.org’s picture

Ths info is pretty vague and I've never seen the problem. Unlikely somebody will find a solution without more info.
--
If you have troubles with a particular contrib project, please consider filing a support request. Thanks. And, by the way, Drupal 4.5 does not work with PHP 5.

MuguMaster’s picture

What more info can I provide? Please let me know ...

--
MuguMaster

Mugu.Info, leading Nigerian 419 Advance Fee, Lottery and other internet Fraudsters up the garden path!

killes@www.drop.org’s picture

You should make a list of installed modules and check if you always got the right version. Dieabling them one by one and checkign for the error re-occuring would also be a good strategy.
--
If you have troubles with a particular contrib project, please consider filing a support request. Thanks. And, by the way, Drupal 4.5 does not work with PHP 5.

jnt’s picture

I don't have recourse to many debugging tools so I am trying to isolate most likely culprit through code.

The offending function is called when there is a requirement to make a drop-down menu of scrolling selection box. There is no common node that I have viewed for me that has these characteristics 'except' the Instant Messenger module which presents on my installation on a side block.

jnt

jnt’s picture

If you are inactive for more than X mins drupal classifies you as not being there. The Instant Messenger user selection list then has zero elements to render and when it calls the form_select function in common.inc I think this may be causing the problem.

Still investigating.

jnt

jnt’s picture

I have put in an issue request for the manager of Instant Messenger module.

You can read it here.

This may not be the culprit in your case but it will be generically similar. Please advise if you are actually running this module.

jnt

jnt’s picture

I can confirm that that fix has stopped occurences for me.

jnt

killes@www.drop.org’s picture

Disabling all modules and enabling them one after another is a good strategy. You could also use a debuger such as xdebug. Did you make any changes to common.inc?
--
If you have troubles with a particular contrib project, please consider filing a support request. Thanks. And, by the way, Drupal 4.5 does not work with PHP 5.

MuguMaster’s picture

I did not make changes to the common.inc file ... I only would do that in relation to advice from an expert. It should therefore be the standard file.

I will try the disable, and re-enable routine, later on today. I dont know what xdebug is so I have to skip on that ...

Will post my experiences when I have a chance. Thanks for the reply!

http://mugu.info/ leading Nigerian 419 Advance Fee, Lottery and other internet Fraudsters up the garden path!

mariagwyn’s picture

I have the exact same error. However, I suspect that it is my fault. I recently took the 'bookreview' module and made some changes, tailoring it for journal articles. I did not add any fields, I simply changed them, uploaded them in to mysql, did find/replace in the .module file, and uploaded. Everything works fine until I actually try to create a 'journal article.' It is at this point the error appears.

Note that on my drupal installation, the error appears, but I can still input information. The content does not display however. On my CivicSpace installation, it simply brings up the error.

The file (as text) is here.

cubano’s picture

Hi. I installed the image module (Drupal 4.5.1), had initial troubles with ImageMagick (thumb was missing etc) and ever since I have the same message:
warning: Invalid argument supplied for foreach() en /home/htdocs/www.elcolectivo.com/includes/common.inc en la línea 1352.
I never bothered to find the cause but I would guess it is related to a thumb/reduced size image/image missing.

srh’s picture

I received this message after installing article.module when navigating to ...admin/settings/article

It was fixed after I added vocabulary in 'categories' [...admin/taxonomy]

I guess the article_settings() function in article.module doesnt have a clause for an empty 'Article Vocabularies' array.

cherylchase’s picture

I just encountered this problem with 4.6.1 and image.module (1.146.2.6 2005/05/28). The error was produced when I did create content/image/ browsed to a jpg and hit submit. As a result, the node was created, but no image was attached.

When I attempted to reproduce it, the error did not occur.

Because I do not have article.module or instant message installed, these are not the culprit.

My environment:

drupal 4.6.1
image.module 1.146.2.6
php4
RHEL3
apache2

chall3ng3r’s picture

my env:
php 4.3.11
image.module
share linux hosting

error:
warning: Invalid argument supplied for foreach() in /home/my8051/public_html/modules/image/image.module on line 310.
warning: Cannot modify header information - headers already sent by (output started at /home/my8051/public_html/includes/common.inc:384) in /home/my8051/public_html/includes/common.inc on line 192

occurzs when i try to create image type entry with img_assist

// chall3ng3r //

tredgettdm’s picture

I am experiencing the same problem. but different code line number

"warning: Invalid argument supplied for foreach() in /files/home1/tredgettdm/drupal/modules/pathauto/pathauto_node.inc on line 155.
warning: Cannot modify header information - headers already sent by (output started at /files/home1/tredgettdm/drupal/includes/common.inc:384) in /files/home1/tredgettdm/drupal/includes/common.inc on line 192."

This occured immediately after installing modules fscache and filestore2. Until then eevrytihng was OK. The problem occurs using File upload on "submit".

Any ideas please ?

Drupal V4.6.3

Dave T

fresh-off’s picture

hello,
i have a fresh (out the box) install of Drupal 4.6.5, and i'm following the bryght "how to create a dynamic web 2.0 brochure site in an hour" tutorial.

i've just downloaded and installed the following modules:

articles
forms
surveys
htmlarea

when reading the install instructions for Articles, it stated:

The most important setting here is the "Article Vocabularies" section. The
vocabularies that you select here will determine which categories and nodes
will be displayed on the articles index page.

Once you have associated a vocabulary with the Article module you should be
ready to use it. If you already had nodes in the associated vocabularies then
they should already show up in the article index. If you do not have nodes then
add a couple to test out the module.

as i dont exactly know what vocabularies are, and havetn created any, there were none to add.

anyhow, i'm going to go back and continue following the tutorial.. from reading a few of the entries above, i'm hoping this error wont cause me any problems. but i'm just playing around and learning anyways. =P

but.. hopefully me giving the details of how i encountered the error will help anybody who attempts to find a soloution!

igrcic’s picture

hi i got same error but in line 1331!

it was connected with page.tpl.php file included in flexinode 4.6.

i solved it and reported here: http://drupal.org/node/47961

bye :)