[SOLVED] MySQL binlog_format causing "Unexpected Error" on Issue Submit

Submitted by Matrix7 on 2011-12-20

I've installed Wi 1.0 today, running on linux, apache-2-21-r1 and php-5.3.8, and it looks great.

Unfortunately I get a lot of PHP Warning: include_once errors in my Wi logs, of which this is the first:

PHP Warning: include_once(/srv/webissues/all issues.inc.php): failed to open stream: No such file or directory in /srv/webissues/system/bootstrap.inc.php on line 85

I've searched the forums and haven't found anything. Does anyone have a quick answer before I paste in lots of error messages?

OK, after a bit of troubleshooting I've found that the problem arises after submitting an issue, which raises an "Unexpected Error" message.

I think the associated error message in the Wi log is:

PHP Warning: include_once(/srv/webissues/all issues.inc.php): failed to open stream: No such file or directory in /srv/webissues/system/bootstrap.inc.php on line 85

Note the improper formatting, with the space in stead of a slash, and the references to non-existent directory (all) and file (issues.inc.php) in this case.

That's only one of the errors. There are many more, like this one:

PHP Warning: include_once(/srv/webissues/1 / 10,000.inc.php): failed to open stream: No such file or directory in /srv/webissues/system/bootstrap.inc.php on line 85

I enabled debug mode, and got this:

The following error(s) occured while processing the request:

Unhandled System_Db_Exception: Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT' in /srv/webissues/system/db/mysqli/engine.inc.php on line 264
Stack trace:
#0 /srv/webissues/system/db/mysqli/engine.inc.php(129): System_Db_Mysqli_Engine->handleError(Object(mysqli_stmt))
#1 /srv/webissues/system/db/mysqli/engine.inc.php(81): System_Db_Mysqli_Engine->executeStatement('INSERT INTO sta...', Array)
#2 /srv/webissues/system/db/connection.inc.php(207): System_Db_Mysqli_Engine->execute('INSERT INTO sta...', Array)
#3 /srv/webissues/system/db/connection.inc.php(178): System_Db_Connection->executeArgs('INSERT INTO {st...', Array)
#4 /srv/webissues/system/api/issuemanager.inc.php(376): System_Db_Connection->execute('INSERT INTO {st...', 1, 1324482027)
#5 /srv/webissues/client/issues/issue.inc.php(259): System_Api_IssueManager->addIssue(Array, 'Test Issue', Array)
#6 /srv/webissues/client/issues/issue.inc.php(110): Client_Issues_Issue->submitValues()
#7 /srv/webissues/system/web/component.inc.php(100): Client_Issues_Issue->execute()
#8 /srv/webissues/system/web/application.inc.php(77): System_Web_Component->run()
#9 /srv/webissues/system/core/application.inc.php(210): System_Web_Application->execute()
#10 /srv/webissues/system/bootstrap.inc.php(124): System_Core_Application->run()
#11 /srv/webissues/client/issues/addissue.php(23): System_Bootstrap::run('Common_Applicat...', 'Client_Issues_I...')
#12 {main}

AHA! Progress.

Ensure you have MySQL configured as follows (/etc/my.cnf under the [mysqld] section):

binlog_format = 'MIXED'

Still getting this though:

PHP Warning: include_once(/srv/webissues/all issues.inc.php): failed to open stream: No such file or directory in /srv/webissues/system/bootstrap.inc.php on line 85
PHP Warning: include_once(): Failed opening '/srv/webissues/all issues.inc.php' for inclusion (include_path='.:/usr/share/php5:/usr/share/php') in /srv/webissues/system/bootstrap.inc.php on line 85