note 42044 added to function.pclose
| From: | matthew at bytemark dot co dot uk | Date: | Fri, 30 Apr 2004 15:13:22 +0000 |
| Subject: | note 42044 added to function.pclose | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-69042@lists.php.net to get a copy of this message | ||
I'll second the note below-- our billing system written early 2003 relied on this code working:
<?php
$billingprogram = popen("../bill-credit-card", "w");
fwrite($billingprogram, "..."); // credit card details etc.
$status = (pclose($bill)>>8) & 255;
if ($status == 0) {
/* transaction successful, mark payment as taken, hooray */
}
else {
/* email customer asking them to phone in some new card details */
}
?>
Can you see what happened when someone decided to change pclose and we upgraded our PHP in February?
Yup, every transaction came back as successful. Lots of unbilled customers, a couple of thousand
pounds missing, and some seriously confused accounting.
Beware.
----
Manual Page -- http://www.php.net/manual/en/function.pclose.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42044
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42044&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42044&report=yes
Search -- http://master.php.net/manage/user-notes.php