The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

edit_contact.php giving 500 internal server error

Highlighted
Occasional Participant

edit_contact.php giving 500 internal server error

I downloaded the files from your site and uploaded them to my server and I am getting a 500 internal server error when trying to access the edit_contact.php file.

 

I can get rid of this if I comment out the following line:

      header('Content-Type: text/html; charset=UTF-8');

 

This will then display the form, but nothing will be populated as it should be.

 

When I look in my error logs I see the following errors:

 

      PHP Fatal error: Call to undefined function phpheader() - this is when I header line is not commented out

 

      PHP Warning: Invalid argument supplied for foreach() in /*/*/*/cc/edit_contact.php on line 1 - this is when the header line is commented out.

 

 

The other forms seem to be working just fine. What can I do to fix this problem?

4 REPLIES 4
Highlighted
Occasional Participant

Re: edit_contact.php giving 500 internal server error

Also, this works on my local install of MAMP, but not when I upload it to my bluehost account.

Highlighted
Employee

Re: edit_contact.php giving 500 internal server error

Hi,

 

I'd recommend checking a few things.  First, make sure when you upload to bluehost you are uploading in binary, NOT ASCII mode.

 

Second, make sure bluehost has at least PHP version 5 or higher.

 

Thirdly, go into the file and line that is generating the "Call to undefined function phpheader()" error, and make sure nothing looks wrong.  In some cases, a server won't recognize a line break, so I would go into that file and put an extra line break around the line that seems to be causing problems.

 

Best Regards,

Shannon W.

API Support Specialist

Highlighted
Occasional Participant

Re: edit_contact.php giving 500 internal server error

Thanks for the steps. I got this working yesterday by recreating the file (by copy and pasting into a brand new file).

Highlighted
Honored Contributor

Re: edit_contact.php giving 500 internal server error

Thanks for the update on this!

Elijah G.
API Support Engineer
Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured