Lo all,

I get a timeout on line 523 of my code (posted and marked below).  However,
I fail to see where the timeout is occurring, and even debugging
(mysql_error()) doesn't report anything wrong!

I'm baffled as to what exactly is causing this timeout....  The code is
currently on Apache (Win32) with PHP 4.2.3.  When I move the code over to a
*nix system, it works perfectly via sendmail_path in php.ini, but when it
calls the SMTP server via a remote address, it fails.

The mail server's exim-3.36, receiver and sender verification has been
turned off.  The mail does go through the mail server.  I also tried
bouncing the messages through a local Exchange server, and the result of
this, is that the email get's additional headers that becomes part of the
body!

Line 523 is indicated with a **

<SNIP>
    // Insert the Technical Administrator's details into the Database as the
Company
    // Administrator.
    $MakePassword = new GeneratePassword(16,5);
    $Password = $MakePassword->makePassword();

    $SQL  = "INSERT INTO CompanyContacts (ContactActive, CompanyID, ";
    $SQL .= "ContactName, IDNumber, EMailAddress, CellNumber, Password)
VALUES ('1', '";
    $SQL .= mysql_escape_string($CompanyID) . "', '" .
mysql_escape_string($_POST['TechName']) . "', '";
    $SQL .= mysql_escape_string($_POST['TechID']) . "', '" .
mysql_escape_string($_POST['TechEMail']) . "', '";
    $SQL .= mysql_escape_string($_POST['TechCell']) . "', PASSWORD('" .
mysql_escape_string($Password) . "'));";
    $TechRegisterSQL = mysql_query($SQL) or die(mysql_error());

    // Mail the login details for the Company Administrator, Redirect him to
the login
    // page, and we're done!.
    $msg = "";
    $msg .= "Dear " . $_POST['TechName'] . ",\n";
    $msg .= "\n";
    $msg .= "Below follows your login details for MegaMonitor.  As the
registrar of\n";
    $msg .= "        " . $_POST['CompanyName'] . ",\n";
    $msg .= " you have been given the rights of Company Administrator.\n";
    $msg .= "\n";
    $msg .= "This allows you to log in at the MegaMonitor web site, and add
further\n";
    $msg .= "configurations for your company.  These may include account
contacts, \n";
    $msg .= "technical contacts, time periods, service checks, and
everything else \n";
    $msg .= "needed to setup monitoring for your company.\n";
    $msg .= "\n";
    $msg .= "You also may request for any number of additional services from
MegaLAN\n";
    $msg .= "Corporate Networking Services, including access to a wider
spectrum of\n";
    $msg .= "monitoring by purchasing more licenses for IP addresses.\n";
    $msg .= "\n";
    $msg .= "MegaLAN Corporate Networking Services also will be offering
other\n";
    $msg .= "excellent value added services over the not to distant future.
We are\n";
    $msg .= "hard at work to get these up and running, and as a client, we
will notify\n";
    $msg .= "you when they become available.  Some of these services
include:\n";
    $msg .= "\n";
    $msg .= "  - MegaMAIL, a e-mail virus scanning service for corporates.
We scan all\n";
    $msg .= "              in and outgoing e-mails on your behalf to ensure
your company\n";
    $msg .= "              does not get infected with viruses via
e-mail.\n";
    $msg .= "  - MegaDNS,  a DNS hosting and administrating service for
corporates,\n";
    $msg .= "              where we will provide access to DNS
administrative tools, as\n";
    $msg .= "              well as secondary domain hosting - free of
charge.\n";
    $msg .= "\n";
    $msg .= "To log in to MegaMonitor and configure your company's profile,
please visit\n";
    $msg .= "http://www.imadethis.co.za/login.php\n";;
    $msg .= "\n";
    $msg .= "Your Username: " . $_POST['TechEMail'] . "\n";
    $msg .= "Your Password: " . $Password . "\n";
    $msg .= "\n";
    $msg .= "You may change your password at anytime via our administrative
interface on\n";
    $msg .= "our web site.\n";
    $msg .= "\n";
    $msg .= "Thank you for your interest in MegaMonitor, and we hope we will
benefit\n";
    $msg .= "your company tremendously.\n";
    $msg .= "\n";
    $msg .= "MegaLAN Customer Support.\n";
    $msg .= "\n";
    mail($_POST['TechEMail'], "MegaMonitor Registration Details", $msg,
         "From: MegaLAN Customer Support <[EMAIL PROTECTED]>\r\n");

    // Mail everything to MegaLAN support for confirmation.
    // Look up the bank name in the Database.
**    $BankQuery = mysql_query("SELECT BankName FROM GlobalBankNames WHERE
BankID='" . mysql_escape_string($_POST['BankInstitution']) . "';") or die
(mysql_error());
    while ($BankList = mysql_fetch_array($BankQuery)) {
      $BankLongName = $BankList['BankName'];
    }
    if ($_POST['BankAccountType'] == "3") {
      $BankAccountTypeLong = "Cheque Account";
    } elseif ($_POST['BankAccountType'] == "2") {
      $BankAccountTypeLong = "Transmission Account";
    } elseif ($_POST['BankAccountType'] == "1") {
      $BankAccountTypeLong = "Savings Account";
    } else {
      // We should never get this!!!
      $BankAccountTypeLong = "Error - Confirm with Client";
    }

    $msg  = "";
    $msg .= "New company registration for MegaMonitor service:\n";
    $msg .= "-------------------------------------------------\n";
    $msg .= "Company Name: " . $_POST['CompanyName'] . " (ID:
$CompanyID)\n";
    $msg .= "Telephone Number: " . $_POST['TelNumber'] . "    Fax Number: "
. $_POST['FaxNumber'] . "\n";
    $msg .= "\n";
    $msg .= "Physical Address:\n";
    $msg .= "  " . $_POST['PhysAddress1'] . "\n";
    $msg .= "  " . $_POST['PhysAddress2'] . "\n";
    $msg .= "  " . $_POST['PhysTown'] . "\n";
    $msg .= "  " . $_POST['PhysCode'] . "\n";
    $msg .= "\n";
    $msg .= "Postal Address:\n";
    $msg .= "  " . $_POST['PostAddress1'] . "\n";
    $msg .= "  " . $_POST['PostAddress2'] . "\n";
    $msg .= "  " . $_POST['PostTown'] . "\n";
    $msg .= "  " . $_POST['PostCode'] . "\n";
    $msg .= "\n";
    $msg .= "Banking Details:\n";
    $msg .= "  Bank Name       " . $BankLongName . "\n";
    $msg .= "  Account Type    " . $BankAccountTypeLong . "\n";
    $msg .= "  Branch          " . $_POST['BankBranch'] . "\n";
    $msg .= "  Account Number  " . $_POST['BankAccount'] . "\n";
    $msg .= "\n";
    $msg .= "Technical Administrator Details:\n";
    $msg .= "  " . $_POST['TechName'] . " (" . $_POST['TechEMail'] . ")\n";
    $msg .= " Contact Number " . $_POST['TechCell'] . "\n";
    $msg .= " ID Number      " . $_POST['TechID'] . "\n";
    $msg .= "\n";
    $msg .= "\n";
    mail("[EMAIL PROTECTED]", "MegaMonitor Company Registration
Details", $msg,
         "From: MegaLAN Customer Support <[EMAIL PROTECTED]>\r\n");
?>
        <table border="0" cellpadding="5" cellspacing="0" height="100%"
width="100%">
        <tbody>
</SNIP>

I really don't see anything wrong here at all!!!

HELP! ;)

--
me


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

Reply via email to