From: "Roque Santana-Vaz" on


Hi,

I am using your script to send email from our website using the smtp server
with code generated from a php script.

I have installed the necessary packages, but keep getting the below whenever
I attempt a submit:



Warning: include_once(Net/SMTP.php) [function.include-once
<http://www.calnat.com/Test/function.include-once> ]: failed to open stream:
No such file or directory in /usr/local/lib/php/Mail/smtp.php on line 206

Warning: include_once() [function.include
<http://www.calnat.com/Test/function.include> ]: Failed opening
'Net/SMTP.php' for inclusion
(include_path='.:/usr/lib/php:/usr/local/lib/php') in
/usr/local/lib/php/Mail/smtp.php on line 206

Fatal error: Class 'Net_SMTP' not found in /usr/local/lib/php/Mail/smtp.php
on line 210



Are you able to please advise what I may do to get over the issue.

Regards,
Roque Santana-Vaz

+ email: <mailto:rsv(a)calnat.com> rsv(a)calnat.com



From: Christian Weiske on
Hallo Roque,


> Warning: include_once(Net/SMTP.php) [function.include-once
> <http://www.calnat.com/Test/function.include-once> ]: failed to open
> stream: No such file or directory in /usr/local/lib/php/Mail/smtp.php
> on line 206
> Are you able to please advise what I may do to get over the issue.
Yes, we are able to.


--
Regards/Mit freundlichen Grüßen
Christian Weiske

-= Geeking around in the name of science since 1982 =-
From: Roque on
Christian Weiske <cweiske <at> cweiske.de> writes:

>
> Hallo Roque,
>
> > Warning: include_once(Net/SMTP.php) [function.include-once
> > <http://www.calnat.com/Test/function.include-once> ]: failed to open
> > stream: No such file or directory in /usr/local/lib/php/Mail/smtp.php
> > on line 206
> > Are you able to please advise what I may do to get over the issue.
> Yes, we are able to.
>


Hi Christian

What is the method to overcome this problem please?
Regards
Roque

From: Christian Weiske on
Hello Roque,


> > > Warning: include_once(Net/SMTP.php) [function.include-once
> > > <http://www.calnat.com/Test/function.include-once> ]: failed to
> > > open stream: No such file or directory
> > > in /usr/local/lib/php/Mail/smtp.php on line 206
> > > Are you able to please advise what I may do to get over the issue.
> > Yes, we are able to.
> What is the method to overcome this problem please?

Install the Net_SMTP package.
$ pear install net_smtp


--
Regards/Mit freundlichen Grüßen
Christian Weiske

-= Geeking around in the name of science since 1982 =-
From: Al on


Christian Weiske wrote:
> Hello Roque,
>
>
>>>> Warning: include_once(Net/SMTP.php) [function.include-once
>>>> <http://www.calnat.com/Test/function.include-once> ]: failed to
>>>> open stream: No such file or directory
>>>> in /usr/local/lib/php/Mail/smtp.php on line 206
>>>> Are you able to please advise what I may do to get over the issue.
>>> Yes, we are able to.
>> What is the method to overcome this problem please?
>
> Install the Net_SMTP package.
> $ pear install net_smtp
>
>

It's probably not that simple. Note, he said that he'd installed the classes.

I have exactly the same problem on a shared host that used cPanel to install
mail and smtp. I also have two similar hosts on which the problem does not
occur. Unfortunately, as a shared host, we don't have access above the web-root
to see what's going on.

So, here is a snippet i just finished to me figure out what's going on. I have
run it yet on the broken host.

define('BASE_PATH', str_ireplace('public_html', '', $_SERVER['DOCUMENT_ROOT']));

function showPearDirs()
{
$report='Pear Mail and Net dirs=> <br />';
$report .= 'php Dir=>'. printArray(scandir(BASE_PATH . '/php/')). '<br />';
$report .= 'Mail Dir=>'. printArray(scandir(BASE_PATH . '/php/Mail/')).
'<br />';
$report .= 'Net Dir=>'.printArray(scandir(BASE_PATH . '/php/Net/'));
return $report;
}

echo showPearDirs;

This shows the contents of /php, /Mail and /Net.

You shold see something like this.

Mail Dir=>
Array
(
[0] => .
[1] => ..
[2] => RFC822.php
[3] => mail.php
[4] => null.php
[5] => sendmail.php
[6] => smtp.php
)


Net Dir=>
Array
(
[0] => .
[1] => ..
[2] => FTP
[3] => FTP.php
[4] => SMTP.php
[5] => Socket.php
[6] => URL.php
)