Page 1 of 1

Trying to use swiftmailer but get an error!?

Posted: Thu Dec 07, 2006 2:54 am
by Viperia
Hello,

I have a small problem i downloaded the last swiftmailer and copyed it to my webserver etc. I changed a little in the /docs/examples/ files to try my smtp but i get an error saying "Parse error: parse error, unexpected T_STRING in /var/www/web1/web/Swift.php on line 70" and i cant get anything to work as it should.

Anyone have a clue why i get this? Line 70 contains the following: interface Swift_IPlugin

Hope someone can help me fast!

Regards,
Viperia

Posted: Thu Dec 07, 2006 3:00 am
by Zoxive
Could you please post the whole php code inside

Code: Select all

code brakets? Showing just 1 line of code shows us nothing. The error could be just before and just after line 70.

Posted: Thu Dec 07, 2006 3:05 am
by Viperia
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


[quote="Zoxive"]Could you please post the whole php code inside

Code: Select all

code brakets? Showing just 1 line of code shows us nothing. The error could be just before and just after line 70.[/quote]
Well if you have swiftmailer files you could just open the Swift.php file and check your self but i will post a couple of lines extra then. 

[php]
if (!defined('SWIFT_VERSION')) define('SWIFT_VERSION', '2.1.17');

/**
 * Swift Plugin Interface. Describes the methods which plugins should implement
 * @package Swift
 */
interface Swift_IPlugin
{
	/**
	 * Required Properties
	 *
	 * private SwiftInstance;
	 * public pluginName;
	 */
	
	/**
	 * Loads an instance of Swift to the Plugin
	 * @param  object  SwiftInstance
	 * @return  void
	 */
	public function loadBaseObject(&$object);

[/php]

Take notice that i have not edited this file at all so it is the original file that came in Swift-2.1.17.zip from the download page.

Regards,
Viperia


[color=red][b]feyd[/b] | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Thu Dec 07, 2006 5:32 am
by jbh
I went through that. I downloaded that zip and the same thing happened. It was because I have php 4 and that is for php 5

The zip file that has php 4 at the end of it is the one for php 4 servers.

Check that.

Posted: Thu Dec 07, 2006 7:33 am
by Chris Corbyn
jbh wrote:I went through that. I downloaded that zip and the same thing happened. It was because I have php 4 and that is for php 5

The zip file that has php 4 at the end of it is the one for php 4 servers.

Check that.
Correct :)

I'm gonna start sticking -php5 in the PHP5 versions too.