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.

PHP syntax errors with CCSFG

Highlighted
New Member

PHP syntax errors with CCSFG

Hi all,


I seem to be having some issues with CCSFG. I installed it where it was described to be placed in the documentation,


and our server is running PHP 5.2, so I don't think its a compliance or compatibility issue. Also, this is a fresh install


of the file. If someone could please help me out, It would be much appreciated.


Example:


http://bunchofgardeners.com/CCSFG_x.x.x/setup/


Error Message:


Parse error: syntax error, unexpected T_VARIABLE in /home/content/86/7349686/html/CCSFG_x.x.x/setup/header.php on line 1


thanks guys,


John

7 REPLIES 7
Highlighted
Employee

Re: PHP syntax errors with CCSFG

Hi John,


 


I've just downloaded and installed the CCSFG again without any errors in header.php on line 1, so I do not believe we're looking at a coding issue. We have seen this issue occur when the folder is uploaded to a web server by an FTP client using the transfer type "ASCII". When this is switched to "Binary", this typically is resolved. You can find a very similar post here where a customer runs through almost the same thing.


 


Please let me know if this resolves your issue, or if you have any other questions/concerns. Thanks.

David J

Highlighted
Regular Visitor

Re: PHP syntax errors with CCSFG

Thanks David J!

 

I was having the same issue & that resolved the problem. It appears that CC hasn't updated their documenation for this yet. Thank goodness for "googling"! :smileywink:

Highlighted
New Member

Re: PHP syntax errors with CCSFG

David, 


I just gave that a try, with the same error message. I uploaded with FileZilla, switched to Binary transfer,


but to no avail. If you have any other ideas, I would really appreciate them.


 


Thanks,


John

Highlighted
Employee

Re: Re: PHP syntax errors with CCSFG

Uploading the ASCII transfer type is the only thing I have seen cause this error. I've been able to use the CCSFG without an issue and I've not heard any other reports of this, so I do not think there is anything wrong with the files. I know that the default transfer type for FileZilla is ASCII, and it will only work if manually switched to binary. I would recommend deleteing these files off of your server, and attempting to upload a brand new CCSFG again without opening or making any modifications after you've extracted it.


 


You could try to download another FTP client and see if that resolves your issue, but as it's not something I am able to replicate I am not really able to offer other suggestions.

David J

Highlighted
Regular Visitor

Re: Re: PHP syntax errors with CCSFG

I have had the same problem with 0.0.6, and I use WS_FTP.  I also changed the transfer type to Binary, with no success.  No difference with ASCII.

 

Any other ideas?  Here's the code in question on line 1:

 

<?php$ccConfigOBJ = new CC_Config();$login = $ccConfigOBJ->login;$contact_lists = $ccConfigOBJ->

 

Thanks, Ned

Highlighted
Employee

Re: Re: PHP syntax errors with CCSFG

Hi Ned,

 

Are you receiving the exact same error message, ie:

"Parse error: syntax error, unexpected T_VARIABLE in /home/content/86/7349686/html/CCSFG_x.x.x/setup/header.php on line 1"

 

If so, the improper upload method is the only cause I am aware of. However, if you are receiving a slightly different error message, this could be due to not having the cURL extension enabled, or to having an older version of php.

 

Is what I pasted above the error you are receiving?

David J

Highlighted
Regular Visitor

Re: Re: PHP syntax errors with CCSFG

Hi David:

 

It appears to be working now, so the Binary upload was successful.  Perhaps the hosting server took some time to process.

 

Maybe an updated version of the Documentation can include a mention of the upload settings.

 

Thanks again, Ned

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