Class 'Swift' not found : strange

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
kigoobe
Forum Commoner
Posts: 38
Joined: Mon Jul 10, 2006 3:26 am

Class 'Swift' not found : strange

Post by kigoobe »

I'm getting this, while trying the new 3.3.3 version of swift mailer

Class 'Swift' not found in /home/user/public_html/class/gen.php on line 319

Line 317,318 and 319 reads:

Code: Select all

require_once ROOT."Swift-3.3.3-php5/lib/Swift.php";
require_once ROOT."Swift-3.3.3-php5/lib/Swift/Connection/SMTP.php";
$swift =& new Swift(new Swift_Connection_SMTP("mysite.com",25));
Now this is strange, as class Swift IS present in Swift.php at the given path.

Any help from anywhere?
For php5 users, we also have a problem with allow_url_include which needs to be "On" for this to work (In my server it was set to "Off").
User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: Class 'Swift' not found : strange

Post by omniuni »

In your code, what is ROOT? Are you referencing your PHP files correctly for inclusion?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Class 'Swift' not found : strange

Post by Chris Corbyn »

omniuni wrote:In your code, what is ROOT? Are you referencing your PHP files correctly for inclusion?
My question exactly. What allow_url_include has to do with this I'm not sure. If ROOT starts with "http://" then this ain't gonna work. The include must be a local file include.
Post Reply