On Fri, 21 Jan 2011 13:41:21 +0700, Peter Lind <peter.e.l...@gmail.com>

Probably not the solution you were looking for, but I've always found mail()
very unstable and I tend to use a mail library instead. Like phpmailer or
swiftmailer. Easier to configure and figure out problems with.


Peter, that is warranted advice here.

I'm a little new to PHP. I'm set up to develop Apache/PHP/MySQL on my PC
uploading results to a unix server. My situation here is that I am trying
to get a PHP Mailing List program running for a friend's business web site
(on unix). That program has 2 options for mailing: 1) mail()/SMTP and
2) phpmailer options. Mail()/SMTP works, at least, on my PC. But I can't
get either of
the two emailing options to work on the UNIX server. (Whatever those mail
problems are, it is mangled with odd PHP/MySQL problems on unix).
I'm just 'back here' starting debugging with the mail()/SMTP option on
unix and my conclusion based on feedback above (thank you) is that email
IS reaching the unix SMTP server but is not being forwarded (and that's
unresolved now).

My mentioned "SMTP server echo problem" is irrelevant. Maybe they fixed it
last night, or maybe I was smoking something yesterday. It IS echoing
I finally figured out that part of my problem was misunderstanding a
message caused by my not single quoting SMTP (yikes!).

Or maybe I was just
enraged over my lack of success all day yesterday to confirm Apache server
information on the unix server (which would help me guarantee that I have
the same Apache/PHP/MySQL configurations between the PC and unix servers).
But today the SMTP server info IS echo'd on the unix server. From the Unix
server ...

function apacheversion() {
              $ver = split("[/ ]",$_SERVER['SERVER_SOFTWARE']);
              $apver = "$ver[1] $ver[2]";
           return $apver;
echo "<br>";
print ('Apache Version: ' . apacheversion());
echo "<br>";
echo "<br>";

echo "<br>";
echo PHP_OS;
$os = php_uname();
echo 'OS' . "$os";
echo "<br><br>";

echo 'display_errors = ' . ini_get('display_errors') . "\n";
echo 'register_globals = ' . ini_get('register_globals') . "\n";
echo "<br><br>";
echo "SMTP host: " . ini_get("SMTP");
echo "<br>";
echo "smtp_port: " . ini_get("smtp_port");
echo "<br>";
echo "sendmail_from: " . ini_get("sendmail_from");
echo "<br><br>";

// prints e.g. 'Current PHP version: 4.1.1'
echo 'Current PHP version: ' . phpversion();
echo "<br><br>";
// prints e.g. '2.0' or nothing if the extension isn't enabled
echo phpversion('mysqli');
echo "<br><br>";

$link = mysql_connect('localhost', 'xxxxxx', 'xxxxxx');
if (!$link) {
                                      die('Could not connect: ' .
printf("MySQL server version: %s\n", mysql_get_server_info());
echo "<br><br>";



Apache Version:

LinuxOSLinux clientx.xxxxxx.com #4 SMP Wed Aug 23 10:41:21 EDT
2006 i686

display_errors = 1 register_globals = 1

SMTP host: localhost
smtp_port: 25

Current PHP version: 4.4.4

MySQL server version: 5.0.67-community

Warning: phpinfo() has been disabled for security reasons in
/home/xxxxxxxxxxxxxxxxxxxxxxx/php/unameunix.php on line 57

Using Opera's revolutionary email client: http://www.opera.com/mail/

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to