Using PEAR Mail
Posted: Sat Nov 15, 2008 10:06 pm
how exactly do i install and use PEAR Mail?
i installed PEAR Mail using cPanel (i attached an image)
then how do i use it? from what i Google-ed i need to include/require Mail.php (Net/Socket & SMTP also?)
so i did
huh? so i tried i add the folder Net containing Socket.php & SMTP.php into Net again... it looks like this
/home/xxx/php/Mail
/home/xxx/php/Net/Socket.php
/home/xxx/php/Net/SMTP.php
/home/xxx/php/Net/Net/Socket.php
/home/xxx/php/Net/Net/SMTP.php
then i get
i thought using require_once should require ONLY ONCE? y does it need to require again? i also noticed it might be because in /home/xxx/php/Net/SMTP.php it wants to include Net/Socket.php when it should be just Socket.php
please help
i installed PEAR Mail using cPanel (i attached an image)
then how do i use it? from what i Google-ed i need to include/require Mail.php (Net/Socket & SMTP also?)
so i did
Code: Select all
require_once "/home/xxx/php/Mail.php";
require_once "/home/xxx/php/Net/Socket.php";
require_once "/home/xxx/php/Net/SMTP.php";Code: Select all
Warning: require_once(Net/Socket.php) [function.require-once]: failed to open stream: No such file or directory in /home/flashwe2/php/Net/SMTP.php on line 24
Fatal error: require_once() [function.require]: Failed opening required 'Net/Socket.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/flashwe2/php/Net/SMTP.php on line 24/home/xxx/php/Mail
/home/xxx/php/Net/Socket.php
/home/xxx/php/Net/SMTP.php
/home/xxx/php/Net/Net/Socket.php
/home/xxx/php/Net/Net/SMTP.php
then i get
Code: Select all
Fatal error: Cannot redeclare class Net_Socket in /home/flashwe2/php/Net/Net/Socket.php on line 592please help