We've had an odd issue with a new site that's running DataGrab via CRON on EE2 that I'm really hoping someone can help with.

Everything was working fine for the first few weeks and data was being fed through automatically every 10 minutes. However, we recently noticed that our import URL had stopped working for no apparent reason. Debugging the URL, we receive the following error:

A PHP Error was encountered Severity: Notice Message: Array to string conversion Filename: database/DB_active_rec.php Line Number: 442 A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at /home/********/system/codeigniter/system/core/Exceptions.php:170) Filename: core/Common.php Line Number: 475 A Database Error Occurred Error Number: 1054 Unknown column ‘Array’ in ‘where clause’ SELECT * FROM (exp_member_groups) WHERE group_id = Array Filename: libraries/Session.php Line Number: 369

The feed runs successfully within the EE control panel and the Import URL also works if logged into EE. However, when not logged in, the Import URL fails. We’ve tried re-installing and re-configuring DataGrab but that hasn’t made any difference. I can't think of any changes we've made to EE that would have caused the Import URL to start failing.

So my main question is: Can anyone think of a setting within EE that could cause DataGrab to stop working if not logged in? Anything to do with Sessions?

FYI, I have a back-up version from a few weeks ago running on the same server which still works perfectly. I've spent time going through the Control Panel screens trying to compare settings and find something that's different but I can't see any anomalies.

I'm kinda out of ideas on things to try and haven't had a reply from DataGrab's developer.

Really hope someone can help.

Thanks, Gary

  • Wild guess as errors similar to this have happened on a few of my sites. Double check the php hasn't been uograded on the server. Some hosts seem to update without notification. Commented Apr 22, 2016 at 6:05
  • Thanks @stuartmcd69. I actually have a version of the site running on the same server (same PHP etc) which does work. It's so odd.
    – GazCrane
    Commented Apr 22, 2016 at 9:11

1 Answer 1


I was running into this issue as well, I don't know if this will resolve your issue.

It tries to create a session for a member with a member_id of 1, do you have a member with an id of 1 that belongs to the group id 1? If not, change a member with superadmin group id 1 access to a member_id of 1.

function _check_member_status() {

    // If not currently logged in, create a dummy session
    // @todo: currently hard-coded, need to search db for admin user?
    $this->current_user = $this->session->userdata['member_id'];
    if( $this->session->userdata['member_id'] == 0) {
        $this->session->create_new_session(1, TRUE);
        //$this->session->userdata['username']  = "dummy";
        $this->session->userdata['group_id']  = 1;
        $this->session->userdata['can_edit_other_entries'] = 'y';
        $this->session->userdata['can_delete_self_entries'] = 'y';
        $this->session->userdata['can_delete_all_entries'] = 'y';

  • Thanks Brad. You're right, this was the issue...though I actually figured it out a few weeks ago but got so wrapped up in other projects I forgot to update this thread. The user with ID 1 had been deleted from the system. Adding one back in fix the issue.
    – GazCrane
    Commented Jun 3, 2016 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.