|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-07-06 10:04 UTC] sas at cvs dot php dot net
[1999-07-10 13:07 UTC] sas at cvs dot php dot net
[1999-07-10 16:58 UTC] sas at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 12:00:01 2026 UTC |
The fsockopen function still doesn't seem to work for us in version 3.0.11, although code we downloaded from the CVS tree just after version 3.0.8 did the job OK. This is a piece of code we use for sending mail. When we try to execute it, it just stalls forever. $FM_fp = fsockopen($FM_mailserver, 25); if ($FM_fp) { $FM_s = 0; $FM_c = 0; $FM_out = ""; set_socket_blocking($FM_fp, false); do { $out = fgets($FM_fp, 2500); if (ereg( "^220", $out)) { $FM_s = 0; $FM_out = ""; $FM_c++; } else if (( $FM_c > 0 ) && ( $FM_out == "" )){ break; } else { $FM_s++; } if ($FM_s == 9999) break; } while ($FM_out == ""); set_socket_blocking($FM_fp, true); fputs ($FM_fp, "HELO ddnh.nl\n"); $FM_output = fgets($FM_fp, 2000); fputs ($FM_fp, "MAIL FROM: <sender>\n"); $FM_output = fgets($FM_fp, 2000); fputs ($FM_fp, "RCPT TO: <$to_email>\n"); $FM_output = fgets($FM_fp, 2000); if (!ereg("^250", $FM_output)) { fputs ($FM_fp, "QUIT\n"); fclose($FM_fp); Error(5, $mailto); } fputs ($FM_fp, "DATA\n"); $FM_output = fgets($FM_fp, 2000); /** Mail headers **/ fputs ($FM_fp, "Subject: $titel\n"); fputs ($FM_fp, "From: $from_name <$from_email>\n"); fputs ($FM_fp, "Reply-To: $to_email\n"); fputs ($FM_fp, "To: $to_email\n"); fputs ($FM_fp, "\n"); /** Message **/ fputs ($FM_fp, "...message...\n"); fputs ($FM_fp, ".\n"); $FM_output = fgets($FM_fp, 2000); fputs ($FM_fp, "QUIT\n"); fclose($FM_fp); } This is our configure line: ./configure --with-apache=/usr/src/apache --with-gd=/usr/src/gd --with-oracle=/u01/app/oracle/product/8.0.5 --with-pgsql --with-config-file-path=/usr/local/apache/conf --enable-debug=no --enable-track-vars=yes --enable-magic-quotes=yes I hope this is of any use for you and that the problem will be solved quickly. Joop Vriend.