Page 1 of 1

newbie question - error from Swift.php file?

Posted: Mon Nov 19, 2007 11:39 pm
by pmaisonneuve
I am getting the following error after trying my first email:

Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/lunches/public_html/swift/Swift.php on line 36

Line 36 in Swift.php is: "const VERSION = "3.3.2";"

I don't see anything particularly wrong with any of the code, but it doesn't like defining the constants. If I comment the first one out, I get the same error on the second one.

Anyone seen something similar? I'm sure this is something silly, but this is my first time using Swift.

Thanks in advance for any assistance.

Paul

Posted: Tue Nov 20, 2007 1:39 am
by choubix
bonjour Paul et bienvenue,

I had a couple of problems with swift (mostly due to my own incompetence...) but I've never had this one.
As it seems you get parse errors I remember seeing in the FAQ something about this.

basically: if you get the wrong version of swft you will get parse errors (likely to occur if you are using the php5 version of swift on a server using php4).

found this for you:
http://www.swiftmailer.org/wikidocs/v3/faq/parseerror

hope it is relevant adn that will help you.