I'm getting the following when trying to log in as other people (for testing) with my setup: PHP: WARNING: Invalid argument supplied for foreach() in line 296 of file moodle.inc.php WARNING: Cannot modify header information - headers already sent by (output started at /usr/www/users/pcmech2/moodle/rconfig-zend.inc.php-bin:329) in line 272 of file moodle.inc.php WARNING: Cannot modify header information - headers already sent by (output started at /usr/www/users/pcmech2/moodle/rconfig-zend.inc.php-bin:329) in line 273 of file moodle.inc.php WARNING: Cannot modify header information - headers already sent by (output started at /usr/www/users/pcmech2/moodle/rconfig-zend.inc.php-bin:329) in line 274 of file moodle.inc.php WARNING: Cannot modify header information - headers already sent by (output started at /usr/www/users/pcmech2/moodle/rconfig-zend.inc.php-bin:329) in line 275 of file moodle.inc.php WARNING: Cannot modify header information - headers already sent by (output started at /usr/www/users/pcmech2/moodle/rconfig-zend.inc.php-bin:329) in line 276 of file moodle.inc.php WARNING: Cannot modify header information - headers already sent by (output started at /usr/www/users/pcmech2/moodle/rconfig-zend.inc.php-bin:329) in line 227 of file check.inc.php I don't know what the problem is. I can get in fine, but others have been reporting this problem. And when I try logging in as them, sure enough, I get the same. Any ideas?
Related information: This happens when I try to log in as a member who is in aMember as PENDING. So, they have no capabilities in Moodle yet, and I think that is leading to the WARNING being generated. If this is a bug with the plug-in, it should be fixed because PENDING members should be able to log in and complete their payment via aMember.
Sorry, I may have posted too early. I had to modify moodle.inc.php in the integration plug-in so so that it tests if $moodle_courses_context is actually an array before executing the foreach() statement. After making that hack, I am able to log into aMember. Perhaps this is useful for somebody else.
Same Problem Also! Could Drisley or someone else who understands this issue post the fix. Thanks! If not guess I will be trying to figure out the code. I hope for a response though.
a common issue is where extra spaces exist at the end of one of the files. In the case of the above example, checking moodle.inc.php for extra spaces at the bottom of the file. If you are getting a different file name in your error, check that one as well.
That doesn't seem the be my problem. The last thing in the moodle.inc.php file is ?> No extra spaces. Full error is: WARNING: Invalid argument supplied for foreach() in line 296 of file moodle.inc.php WARNING: Cannot modify header information - headers already sent by (output started at /home6/cyberwit/public_html/amember/rconfig.inc.php(19) : eval()'d code(1) : eval()'d code:385) in line 272 of file moodle.inc.php WARNING: Cannot modify header information - headers already sent by (output started at /home6/cyberwit/public_html/amember/rconfig.inc.php(19) : eval()'d code(1) : eval()'d code:385) in line 273 of file moodle.inc.php WARNING: Cannot modify header information - headers already sent by (output started at /home6/cyberwit/public_html/amember/rconfig.inc.php(19) : eval()'d code(1) : eval()'d code:385) in line 274 of file moodle.inc.php WARNING: Cannot modify header information - headers already sent by (output started at /home6/cyberwit/public_html/amember/rconfig.inc.php(19) : eval()'d code(1) : eval()'d code:385) in line 275 of file moodle.inc.php WARNING: Cannot modify header information - headers already sent by (output started at /home6/cyberwit/public_html/amember/rconfig.inc.php(19) : eval()'d code(1) : eval()'d code:385) in line 276 of file moodle.inc.php WARNING: Cannot modify header information - headers already sent by (output started at /home6/cyberwit/public_html/amember/rconfig.inc.php(19) : eval()'d code(1) : eval()'d code:385) in line 54 of file new_rewrite.inc.php I can log on as a regular user, but this error comes up as soon as I do. I am unable to purchase any products, though the products that are already purchased seem to work fine. This is not a pending user. This is the user I have for testing, and is fully authorized in aMember. I don't know PHP, though I have been a programmer in other languages for 30 years. Any suggestions?
Ok, I'm not sure what was going on, but it seems that users that were already in the amember database, had problems with the login. I deleted my test user, and resubscribed and everything works fine. I now have everything with Moodle set up, and ready to go. Now to create classes.