HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   ISPConfig 3 Priority Support (http://www.howtoforge.com/forums/forumdisplay.php?f=35)
-   -   mod_fcgid: stderr: PHP Fatal error: (http://www.howtoforge.com/forums/showthread.php?t=61666)

lee.veal 30th April 2013 16:45

mod_fcgid: stderr: PHP Fatal error:
 
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

till 30th April 2013 18:44

Do you have any functions disabled in php.ini?

lee.veal 30th April 2013 19:27

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,pass thru,
disable_functions =
disable_functions =
disable_functions =
disable_functions =

till 30th April 2013 20:08

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?

lee.veal 30th April 2013 20:26

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

till 30th April 2013 20:36

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')");

lee.veal 30th April 2013 20:42

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)

lee.veal 30th April 2013 20:43

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']);
                }


lee.veal 30th April 2013 20:47

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


All times are GMT +2. The time now is 17:48.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.