Re: Re: Problem with SMTP sevrer mail from php

From: Date: Fri, 20 Nov 2009 17:28:32 +0000
Subject: Re: Re: Problem with SMTP sevrer mail from php
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-30162@lists.php.net to get a copy of this message
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
)

« previous php.pear.general (#30162) next »