something is configured wrong (pear and mail classes)
Moderator: General Moderators
something is configured wrong (pear and mail classes)
This latest issue has come up because I am trying to send mail through a SMTP server but I cant figure out where to put the swiftmail folder (once it is extracted).
I dont know what is going on.
PHP tells me Fatal error: Class 'PEAR' not found in C:\apachefriends\xampp\php\pear\Net\Socket.php on line 35
And Fatal error: Class 'Mail' not found in C:\apachefriends\xampp\php\pear\Mail\smtp.php on line 26
Thing is... I have PEAR in my PHP folder and I have MAIL in my PEAR folder
Something is not configured correctly??
I dont know what is going on.
PHP tells me Fatal error: Class 'PEAR' not found in C:\apachefriends\xampp\php\pear\Net\Socket.php on line 35
And Fatal error: Class 'Mail' not found in C:\apachefriends\xampp\php\pear\Mail\smtp.php on line 26
Thing is... I have PEAR in my PHP folder and I have MAIL in my PEAR folder
Something is not configured correctly??
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Pear requires some installation before it can be used. The documentation can be a bit hard to find.
http://pear.php.net/manual/en/installation.getting.php is the starting point.
Alternatively, you could use a different emailing package such as Swift or phpMailer.
http://pear.php.net/manual/en/installation.getting.php is the starting point.
Alternatively, you could use a different emailing package such as Swift or phpMailer.
I tried swift.feyd wrote:Pear requires some installation before it can be used. The documentation can be a bit hard to find.
http://pear.php.net/manual/en/installation.getting.php is the starting point.
Alternatively, you could use a different emailing package such as Swift or phpMailer.
Both the Mail class and Pear class cannot be found:
Fatal error: Class 'PEAR' not found in C:\apachefriends\xampp\php\pear\Net\Socket.php on line 35
Fatal error: Class 'Mail' not found in C:\apachefriends\xampp\php\pear\Mail\smtp.php on line 26
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
and?jmilane wrote:I tried swift.
Thanks for repeating your original post.jmilane wrote:Both the Mail class and Pear class cannot be found:
Fatal error: Class 'PEAR' not found in C:\apachefriends\xampp\php\pear\Net\Socket.php on line 35
Fatal error: Class 'Mail' not found in C:\apachefriends\xampp\php\pear\Mail\smtp.php on line 26
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Dude, my original post actually says that I cannot figure out where to put the extracted swiftmail folder. I am trying to use swiftmail, and the errors I posted are what results.feyd wrote:and?jmilane wrote:I tried swift.
Thanks for repeating your original post.jmilane wrote:Both the Mail class and Pear class cannot be found:
Fatal error: Class 'PEAR' not found in C:\apachefriends\xampp\php\pear\Net\Socket.php on line 35
Fatal error: Class 'Mail' not found in C:\apachefriends\xampp\php\pear\Mail\smtp.php on line 26
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Just rename the entire folder from say "Swift-2.1.10" to "swift". Then upload that entire folder to your website somewhere where PHP can access it. You don't need to move any of the files out of the folder or anything, it will works as is.jmilane wrote:Hey... yeah... I just dont know what to do with the folder once it is downloaded... I am kind of stupid I guess.d11wtq wrote:~jmilane, is there anything you need help with in swift? Or anything you find unclear in the documentation. I do like feedback... even bad feedback
Make sure you download the PHP4 version if you are using PHP4 or the other versions will give parse errors.
The errors you got did not come from the swift mailer library... those errors relate to PEAR and Swift Mailer has no class called. Mail.
http://www.swiftmailer.org/docs/
Okay. You rock.d11wtq wrote:Just rename the entire folder from say "Swift-2.1.10" to "swift". Then upload that entire folder to your website somewhere where PHP can access it. You don't need to move any of the files out of the folder or anything, it will works as is.jmilane wrote:Hey... yeah... I just dont know what to do with the folder once it is downloaded... I am kind of stupid I guess.d11wtq wrote:~jmilane, is there anything you need help with in swift? Or anything you find unclear in the documentation. I do like feedback... even bad feedback
Make sure you download the PHP4 version if you are using PHP4 or the other versions will give parse errors.
The errors you got did not come from the swift mailer library... those errors relate to PEAR and Swift Mailer has no class called. Mail.
http://www.swiftmailer.org/docs/
I will stick the swift folder right in the PHP folder.
I think that will work.
Thanks!
Warning: require(../../Swift.php) [function.require]: failed to open stream: No such file or directory in C:\apachefriends\xampp\htdocs\testswift.php on line 3
I know I am doing something really dumb. I dont know where to set this path. I have 2 php.ini files... one for php4 and one for php5. I am using php5. Nowhere in there do I see an include path.
I always hated having this problem with my eye but now I am really upset about it. There is so much to read.
I know I am doing something really dumb. I dont know where to set this path. I have 2 php.ini files... one for php4 and one for php5. I am using php5. Nowhere in there do I see an include path.
I always hated having this problem with my eye but now I am really upset about it. There is so much to read.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Look at the path. Change the path in require() to match.jmilane wrote:Warning: require(../../Swift.php) [function.require]: failed to open stream: No such file or directory in C:\apachefriends\xampp\htdocs\testswift.php on line 3
I know I am doing something really dumb. I dont know where to set this path. I have 2 php.ini files... one for php4 and one for php5. I am using php5. Nowhere in there do I see an include path.
I always hated having this problem with my eye but now I am really upset about it. There is so much to read.
Code: Select all
require('swift/Swift.php');
require('swift/Swift/Connection/SMTP.php');I just dont get it.d11wtq wrote:Look at the path. Change the path in require() to match.jmilane wrote:Warning: require(../../Swift.php) [function.require]: failed to open stream: No such file or directory in C:\apachefriends\xampp\htdocs\testswift.php on line 3
I know I am doing something really dumb. I dont know where to set this path. I have 2 php.ini files... one for php4 and one for php5. I am using php5. Nowhere in there do I see an include path.
I always hated having this problem with my eye but now I am really upset about it. There is so much to read.
Code: Select all
require('swift/Swift.php'); require('swift/Swift/Connection/SMTP.php');
Doesnt work.
C:\apachefriends\xampp\php\Swiftfeyd wrote:What's the full path to Swift.php?
And this file that I am running is at
http://127.0.0.1/testswift.php
C:\apachefriends\xampp\htdocs is my root directory
so why isnt ../php/Swift/swift.php working?
Last edited by jmilane on Wed Aug 16, 2006 3:17 pm, edited 1 time in total.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
require('/apachefriends/xampp/php/Swift/Swift.php');
require('/apachefriends/xampp/php/Swift/Swift/Connection/SMTP.php');