We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

problems with sample php script


problems with sample php script

I am having some problems with adding the sample php script.


Here is a link to where I uploaded my sample script. I added my api key and user name info etc., but did not alter anything else.




As you can see you get a blank page...so just to see what would happen, I put the exact same files on a different website to test it...




and here it shows up fine? It is the exact same script in the exact same location.


Any ideas what could be causing this?


Thanks so much for your help.



Provided that they are identical installations on different servers I would say that the difference is caused by the server configuration. Chances are that there is an error occurring due to the version of PHP or Apache. These errors may not be displayed due to the error settings in the PHP ini file.


Our API sample script does require PHP 5. If you would like to see what your current server configuration is you can create a new php file with this code and read through the information.


     echo phpinfo();



Depending on what your current configuration is and what access you have to modify/upgrade the system you may be able to resolve this.

Dan H

Support Engineer, Constant Contact

Developer Portal

View API documentation, code samples, get your API key.

Visit Page