Consolibyte QuickBooks PHP Library - How Do You Debug / View Errors? - quickbooks

I am currently trying to import a list of customers from my QB installation using the _quickbooks_customer_import_request() and _quickbooks_customer_import_response() methods found in Consolibyte's QB PHP library in the docs/web_connector/example_web_connector_import.php file.
When I run Web Connector, it is able to establish a connection and receive the request from my server. It then errors out on the response (where QB contacts my server and tries to pass to it response data). The error shown in Web Connector is a generic getLastError() message:
When I look in the quickbooks_log table that the Consolibyte library created in the quickbooks MySQL database, I see the following:
The above doesn't show the reason for the error. How do I log the underlying errors here? I would prefer a solution where the detailed error description can be inserted into the quickbooks_log table in a JSON format.

There's a Troubleshooting section of the docs here:
http://wiki.consolibyte.com/wiki/doku.php/quickbooks_integration_php_consolibyte?s[]=troubleshooting#troubleshooting
You should start by putting the Web Connector in VERBOSE mode, and looking at what's in the Web Connector log file.
Also, check your PHP error log.
There's many different places an error could be occurring (PHP, configuration, SSL/TLS, QuickBooks, etc.) so start with the Web Connector log and go from there.

Related

How to configure Serilog for WCF

I am upgrading our old application for Serilog... One of the existing functionality is ... When log level = ERROR, it will log into local file and send 'WCF' request to the remote server, remote server will update database...
Basically it will log into multiple source(local file, remote database by sending wcf request) if it level is 'ERROR'.
I understand using 'rollingfile' appender to logging into local file.
However, i do not know how to configure 'WCF Service' for Serilog... is there any 'WCF SINK' can help me achieve this?
As of this writing there's no generic sink that makes "WCF" calls... You'd have to build your own sink, implementing the calls you need.
You can see a list of documented sinks in the "Provided Sinks" page on Serilog's wiki, and you can also see available sinks in NuGet.org.

Twilio IP Messaging token issue

I'm setting up an iOS app to use the IP Messaging and video calling apis. I'm able to connect, create channels and setup a video call if I manually create hard-coded tokens for the app. However, if I want to use the PHP server (as described here https://www.twilio.com/docs/api/ip-messaging/guides/quickstart-ios) then I always get an error and it can't connect anymore.
I'm attaching a screenshot of what I see when I hit the http://localhost:8080 address which seems to produce a 500 Internal error on this URL: https://cds.twilio.com/v2/Streams
Thanks so much!
After much time spent on this I decided to try the node backend instead - under other server-side languages of the PHP and I have it running in 2 minutes! I used the exact same credentials as the ones that I was using on the PHP config file so either my PHP environment has something strange or the PHP backend needs some fixing. In any case, I'm able to move forward using the node backend, so if you run into the same issue just try node instead of PHP. woohoo!

QuickBooks RDS client (or maybe server) is throwing Public key exchange error: Object already exists

I am working with intuit SDK tech support on this without much luck. I was hoping someone here might know what object this error might be referring to.
I am basically sending a request from one computer to QuickBooks on another machine via PowerShell and Remote Data Sharing (RDS) Client/Server provided in the QuickBooks SDK. The relative portion of the Powershell script looks something like this..
$myQBXMLRP = New-Object -com QBXMLRP2.RequestProcessor
$myQBXMLRP.OpenConnection2("qb4D","CCFolioPro",2)
The first line instantiates the COM object QBXMLRP2.RequestProcessor. The second line opens a connection with QuickBooks. RDS Client on the local machine receives the OpenConnection request and passes it on to the RDS Server on the machine where QB resides which in turn opens the connection with QB. The second line is throwing the following error...
Exception calling "OpenConnection2" with "3" argument(s): "Public key exchange error: Object already exists
Reading here in stackoverflow and elsewhere via google I see that this error occurs to other programmers not dealing in any way with QuickBooks, so I am hoping somone here might be able to help me figure out how to fix the problem.
I have QB/RDS working fine prior to this installation. So I know it should work as is. Something is hung up on this computer, the server computer, or ????
Thanks,
John
Your mileage may vary. I cleared the following file, reboot and reinstall RDS then things are back to normal. It was on a Windows Server 2012 but you get the idea. You need to change your view options so these folders are not hidden. Worths a shot, and I hope this helps.
Clear one of the key files created by RDS by prior runs or installations

Unstable log4net emails with a Windows Service on a Windows Server 2003 R3 using Exchange Server

I am running a Windows Service on a Windows Server 2003 R2. We are using Exchange Server to send out the emails.
I am using log4net.dll 1.2.11.0.
I have situation where log4net sometimes sends emails and sometimes don't eventhough no changes has been made to the set up.
All the other log4net logging works very fine. And as said sometimes the application sends out emails and some times it don't, having made no change to the application.
All my methods are in try-catch clauses, but I don't get any errors.
When I run the the Windows Service on my local machine, the log4net email always works, and as said on the remote server, sometimes the log4net email works, sometimes it don't, having made no changes to the setup.
I am using log4net.Internal.Debug and have a System.Diagnostics.TextWriterTraceListener file where stuff is written to.
Scanning thorugh this file I haven't noticed anything in particular, but I don't know what specific to look for.
Any ideas about what the problem is or what to do?
If the SMTP appender cannot send an email it would log an exception with this text: Error occurred while sending e-mail notification. This would be visible if internal debugging is enabled. Maybe you have filters or something like that configured that prevents log4net from sending an email.
You could download the source code of log4net and add extra logging to the SMTP appender to find out if the "SendMail" method of the appender gets called at all. If it does and no email and no error is shown, then we need to assume that the exchange server somehow swallows the emails. If the appender is not triggered, then you need to review your filter / buffer / threshold configuration.
Alternatively you could try to use the SmtpPickupDirAppender.

Using [delphi] MadExcept errorhandling with MS Exchange Server 2007

I currently use madExcept.MailAsSmtpClient to send my bug reports. However a couple of large clients have upgraded to Exchange Server 2007 and we can't get the SMTP support for our app configured (the app runs on individual workstations so the messages aren't all coming from one IP. We can configure an authenticated account in exchange and access it via SMTP from other clients but it rejects madExcept for some reason).
So I have two questions
1) has anyone successfully configured that combo ? or
2) is there an example somewhere of how to use the madExcept.UploadViaHTTP option?
If you upload a madExceptbug report via HTTP a web server is required which accepts POST requests. The bug report parts will be posted as form parameters, encoded as multipart/form-data. PHP example code for HTTP upload can be found here: http://forum.madshi.net/viewtopic.php?t=4611

Resources