PHP DevKit for QuickBooks - Troubleshooting

From ConsoliBYTE Wiki
Revision as of 13:02, 15 October 2012 by Consolibyte (Talk | contribs)
Jump to: navigation, search

Below are some steps/hints towards troubleshooting Web Connector problems when using the PHP DevKit.


Contents

Check the PHP error log

If things are going really wrong, make sure you turn on PHP error logging to a file.

Without having PHP log errors to a file, it's difficult (if not impossible) to find PHP errors or warnings that are causing problems and causing requests to QuickBooks to fail.

There's some good information on error logging in the PHP documentation: http://us3.php.net/manual/en/errorfunc.configuration.php


Watch the quickbooks_* SQL tables

Watch the MySQL tables! The two tables to watch are:

  • quickbooks_queue
  • quickbooks_log

The quickbooks_queue table shows a record of each action that we performed on QuickBooks, and what the resulting status was. If you see a status of 'i', that is a bad thing, and generally means that some PHP or database error occurred. If you see a status of 'e', it's bad and means that an error occurred while communicating with QuickBooks. Any other status is OK. The 'ident' field is the primary key of your record you passed into the queueing function (i.e.: The quote ID or the customer ID).

The quickbooks_log table shows a log of all incoming and outgoing XML and SOAP requests/responses, plus other general logging. By watching this table you can see the actual outgoing and incoming qbXML requests and responses your application is producing/consuming.

Visit the AppURL URL in your .QWC file in a browser

What do you see? You should see some diagnostic information as plain-text.

Do you see any PHP errors or warnings?


Check the Web Connector log file

Turn the Web Connector to VERBOSE logging first.

Within the Web Connector, click the "View Log" button. You'll get a somewhat detailed log which often tells you what's wrong. Take the time to actually read the error message.


Authentication failed

If you see something like this:

<source> 20121015.04:44:11 UTC : QBWebConnector.SOAPWebService.do_authenticate() : QBWC1012: Authentication failed due to following error message. Response is not well-formed XML. More info: StackTrace = at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

  at QBWebConnector.localhost.WCWebServiceDoc.authenticate(String strUserName, String strPassword)
  at QBWebConnector.localhost.WCWebService.authenticate(String strUserName, String strPassword)
  at QBWebConnector.SOAPWebService.authenticate(String UserName, String Password)
  at QBWebConnector.WebService.do_authenticate(String& ticket, String& companyFileName)

Source = System.Web.Services </source>

It usually means you have a PHP error or warning. Check your PHP error log and fix the warning.