I have the sample code running on my website. I can list all associated contacts, but when adding a contact after clicking the submit button the page is blank. it seems that I am not getting a response back from the API. I echo text to the screen before this line in the code "$contactXML = $ccContactOBJ->createContactXML(null,$postFields);" After that point the page is blank. I dont get any errors at all. It is working on a locally running joomla website but when moving to the production site it will not work. I have all files in there own directory and is not a page created from the Joomla cms. It is accssible here, http://www.cbcmagazine.com/ConnectionsSignUp/simple_form.php. Any help is appreciated.
Try stetting the value of
on line 29 of cc_class.php to true . This should be displaying any curl errors that exist and give us some clue as to what may have gone wrong
I'm also curious what PHP version you are running. Versions of PHP prior to 5 will not be able to make curl requests, and may also have issues using some of the simpleXmlElement() functions as well. If you aren't sure what PHP version you are using on your production site, you can use the following line to display this information for you.
I hope this helps. Please let us know if you have any other questions, thanks!
Thanks for your reply. I have set $curl_debug = true. cURL support is enabled and the php version is 5.0.4. Clicking the Add Contact button brings up a blank page and it doesnt indicate that there are any errors. Is there anything else that I can try?
While this should still be throwing an error, it sounds like the version you are using might be what is causing the issue. The SimpleXmlElement::addChild() function does not work in versions of PHP prior to 5.1.3 (http://www.php.net/manual/en/simplexmlelement.addchild.php). You could try adjusting your error reporting settings on this page and see if you start to get an actual description of the issue from PHP. You can this by adding the following line at the top of your PHP page to override the error_reporting settings in your PHP.ini file
If the PHP version is what is causing an issue, upgrading the version of PHP install should resolve that issue. If this not an option for you, you may want to take a look at a 3rd party Constant Contact PHP Library which is compatible with PHP 4. You can find this at http://integrationservic.es/constant-contact/php-developers-code.php
I hope this helps. Please let us know if you have any other questions. Thanks.