Page 1 of 1

Parse error: syntax error, unexpected '}' in stamps.php

Posted: Fri Feb 19, 2016 4:03 am
by joshbarrett
Hi All,

I have stamps.com working on this issue but wanted to see if anyone else has this issue. I have connected the stamps.com program to the opencart website. However no orders are imported. When you view the stamps.php file from stamps.com in a browser you get this error.

Code: Select all

Parse error: syntax error, unexpected '}' in /home/home/public_html/stamps.php on line 462
So they fixed their typo and now they get this error.

Code: Select all

XML Parsing Error: junk after document element
Location: http://userdomainname.com/stamps.php
Line Number 2, Column 1:<b>Notice</b>:  unserialize(): Error at offset 0 of 5 bytes in <b>/home/user/public_html/stamps.php</b> on line <b>56</b><br />
After several phone calls back and forth they cant figure it out and have sent it to their "R&D Team" meanwhile giving me no updates other than the ticket has not been updated.

I have tried the file on 4 different web servers with different configs.

Re: Parse error: syntax error, unexpected '}' in stamps.php

Posted: Fri Feb 19, 2016 4:53 am
by IP_CAM
well, what you expect now? No-one has such Source, exept for those (few), paying for.
You should better have published the stamps.php Line 430 - 480, so, one would be able,
to see, why this 'left-curly bracket' exists, where it possibly should not exist.
https://en.wikipedia.org/wiki/Bracket

It DOES NOT have to be this 'left-curly', seemengly beeing mis-placed, in the server tasklist of execution, it may be another 'left-curly' , also in another file, somewhere, already CLOSING a WHATEVER SEQUENCE, and so not 'going along' with the 'left-curly', error-complained, just, because it's coming 'Second' in some task, obviously already closed, by a first 'left curly bracket'. If you know, what I'm trying to tell you... 8)

But who knows, exept for possibly one, familiar with this STAMPS Stuff. So, don't expect much...
BTW. The last Comment-Post of the Author has been past September, and since then, nothing.
So, depending on the OC Version you use, you need Mod-Seller assistance anyway. Or the money back.

Good Luck ;)
Ernie
hitline.info

Re: Parse error: syntax error, unexpected '}' in stamps.php

Posted: Fri Feb 19, 2016 5:16 am
by joshbarrett
@IP_CAM Ill do you one better. Here is the entire file in an attachment. Its publicly available for free on stamps.com website. You pay for your postage is how they are making money.

;)

Re: Parse error: syntax error, unexpected '}' in stamps.php

Posted: Tue Aug 30, 2016 8:24 pm
by kedesignz
Were you able to resolve this issue?

Re: Parse error: syntax error, unexpected '}' in stamps.php

Posted: Sat Oct 15, 2016 4:04 am
by cffrost2
It's a pretty simple fix if anyone is wondering. The stamps.php file contains a small error on line 461.

Code: Select all

catch(Exception $e)
	{
		$wtStr =$weight
	}
The error is caused by the missing semicolon after $weight.

Change it to be

Code: Select all

catch(Exception $e)
	{
		$wtStr = $weight;
	}
Either way, I still can't import my orders to stamps.com. Something is still wrong somewhere. It seems to connect to my opencart but will not import orders. I've sent a message to stamps support. We'll see. There is no help anywhere I can find on the internet. If anyone has a solution, please post here.

Re: Parse error: syntax error, unexpected '}' in stamps.php

Posted: Fri Mar 03, 2017 4:36 pm
by Howence
I'm also having the same problem after using cffrost2's fix. I now have the error message:
XML Parsing Error: junk after document element
Did anyone figure out how to do this?

Re: Parse error: syntax error, unexpected '}' in stamps.php

Posted: Sun Sep 08, 2019 11:40 am
by drclawscat
Did anyone figure this out? I updated the file (stamps still hasn't patched that ; bug) but I still get no orders flowing in from opencart. :(

Re: Parse error: syntax error, unexpected '}' in stamps.php

Posted: Sun Sep 08, 2019 5:11 pm
by thekrotek
drclawscat wrote:
Sun Sep 08, 2019 11:40 am
Did anyone figure this out? I updated the file (stamps still hasn't patched that ; bug) but I still get no orders flowing in from opencart. :(
Have you even read the replies? It was said in the very beginning that this files IS NOT a part of OpenCart. Contact its developer to resolve the issue.

Re: Parse error: syntax error, unexpected '}' in stamps.php

Posted: Sat May 23, 2020 7:09 am
by sw1138lr
Today, I spent two hours on the phone with Stamps.com about this issue with stamps.php file. The issue turns out to be the version of stamps.php only works with PHP 5. We are now on version 7.3. I asked if they plan to fix the stamps.php file. The answer was OpenCart is only used by 0.35% of their customers. It is not a high priority to fix and will never be a high priority. Is there anyone willing to make the coding changes to the stamps.php file to make it work?

Re: Parse error: syntax error, unexpected '}' in stamps.php

Posted: Sat May 23, 2020 7:58 am
by thekrotek
sw1138lr wrote:
Sat May 23, 2020 7:09 am
Is there anyone willing to make the coding changes to the stamps.php file to make it work?
If you willing to invest in custom development I could help.