mod_fcgid: stderr: PHP Fatal error:

Discussion in 'ISPConfig 3 Priority Support' started by lee.veal, Apr 30, 2013.

  1. lee.veal

    lee.veal Member

    When deleting Mail Domain's I get the following error:

    [Tue Apr 30 09:50:36 2013] [warn] [client XXX.XXX.XXX.XXX] mod_fcgid: stderr: PHP Fatal error: Call to a member function fetch_assoc() on a non-object in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php on line 181, referer: https://xxxxxxxx.net:8080/index.php#


    [notice] Apache/2.2.17 (Ubuntu) DAV/2 mod_fcgid/2.3.6 PHP/5.3.5-1ubuntu7.11 with Suhosin-Patch mod_ssl/2.2.17 OpenSSL/0.9.8o configured -- resuming normal operations

    I am able to delete records from DNS/Sites with out an issue. It looks to only be an issue with this table (dbispconfig.mail_domain) command line MYSQL works fine.


    Thanks for looking!

    Lee
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you have any functions disabled in php.ini?
     
  3. lee.veal

    lee.veal Member

    No sir


    root@web:/usr/local/ispconfig/interface/lib# for i in `locate php.ini` ;do grep disable_functions $i; done
    disable_functions =
    disable_functions =
    disable_functions =
    ;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru,
    disable_functions =
    disable_functions =
    disable_functions =
    disable_functions =
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I checked it in the ispconfig code, there might be an issue with the new mysqli library were a error condition is not catched in case that there is no record returned in the nextRecord function. I was not able to reproduce that here. Have you checked the mysql database table with phpmyadmin's check and optimize functions?
     
  5. lee.veal

    lee.veal Member

    Table returned OK, but the error persists.

    turned up logging and got the following


    613 Query SELECT forwarding_id as id FROM mail_forwarding WHERE source like '%@birch.XXXXXX.com' OR (destination like '%@birch.XXXXXX.com' AND type != 'forward'
    613 Query INSERT INTO sys_log (server_id,datalog_id,loglevel,tstamp,message) VALUES (0,0,1,1367345944,'[INTERFACE]: DB::query(SELECT forwarding_id as id FROM mail_forwarding WHERE source like \'%@birch.XXXXXX.com\' OR (destination like \'%@birch.XXXXXX.com\' AND type != \'forward\') -> mysqli_query You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'\' at line 1')

    mysql Ver 14.14 Distrib 5.1.63, for debian-linux-gnu (x86_64) using readline 6.2
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if the closing ) is missing in the query. I just chekd it in svn and it is there, maybe it has been fixed in the meantime. Does line 63 in the file /usr/local/ispconfig/interface/web/mail/mail_domain_del.php looks like this on your server?

    Code:
    $records = $app->db->queryAllRecords("SELECT forwarding_id as id FROM mail_forwarding WHERE source like '%@".$app->db->quote($domain)."' OR (destination like '%@".$app->db->quote($domain)."' AND type != 'forward')");
     
  7. lee.veal

    lee.veal Member

    SQL works fine from the console

    Database changed
    mysql> SELECT forwarding_id as id FROM mail_forwarding WHERE source like '%@birch.XXXXX.com' OR (destination like '%@birch.XXXXX.com' AND type != 'forward');
    Empty set (0.00 sec)
     
  8. lee.veal

    lee.veal Member

    Code:
                    // Delete all forwardings where the osurce or destination belongs to this domain
                    $records = $app->db->queryAllRecords("SELECT forwarding_id as id FROM mail_forwarding WHERE source like '%@".$app->db->quote($domain)."' OR (destination like '%@".$app->db->quote($domain)."' AND type != 'forward'");
                    foreach($records as $rec) {
                            $app->db->datalogDelete('mail_forwarding','forwarding_id',$rec['id']);
                    }
    
    
     
  9. lee.veal

    lee.veal Member

    Works perfect now, thank you! I own ya a pint or 3 .. Thanks!
     

Share This Page