php-windows Digest 12 Sep 2002 20:21:41 -0000 Issue 1336
Topics (messages 15773 through 15787):
Dynamic extension problem (php 4.1.2)
15773 by: Bård Tommy Nilsen
15776 by: Kit Kerbel
Re: Error after a while???
15774 by: Rich Gray
15775 by: Constantin Baciu
mysql_query() & mail() - something weird is going on !
15777 by: Chris Knipe
15778 by: dash php
15779 by: R.S. Herhuth
Re: Weird Error
15780 by: Alexandru Martin
Basic Question about closing a file
15781 by: Arthur
15782 by: Scott Carr
15783 by: Scott Carr
Variable error
15784 by: Silbermann, Peter
Newbie to the news!
15785 by: Constantin Baciu
15786 by: David Hollister
15787 by: Constantin Baciu
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
I want to use php_openssl.dll on an windows os with IIS.
The system "halt" when uncommenting the
;extension=php_openssl.dll
In my php.ini it says:
extension_dir = c:\php
And the exension is there : c:\php\php_openssl.dll
Have anyone any idea what could be wrong ??
Regards
Bård Tommy Nilsen
--- End Message ---
--- Begin Message ---
I know I had problems with loading php_curl.dll and the solution was to copy
certain dlls into my system32 folder. Hope that helps.
----Original Message Follows----
From: Bård Tommy Nilsen <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: [PHP-WIN] Dynamic extension problem (php 4.1.2)
Date: Thu, 12 Sep 2002 10:39:23 +0200
I want to use php_openssl.dll on an windows os with IIS.
The system "halt" when uncommenting the
;extension=php_openssl.dll
In my php.ini it says:
extension_dir = c:\php
And the exension is there : c:\php\php_openssl.dll
Have anyone any idea what could be wrong ??
Regards
Bård Tommy Nilsen
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
--- End Message ---
--- Begin Message ---
Can you post some code to look at?
-----Original Message-----
From: M.B. [mailto:[EMAIL PROTECTED]]
Sent: 11 September 2002 20:32
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Error after a while???
Hi, I have a database and a site which has members and so on......
but now I have service (also for a long time) http://www.wjp.cjb.net
a guestbook service.
But yesterday somebody mailt me to say that this error was on his
guestbooksite:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in /home/k/l/klaassen/public_html/WJP/include/gastenboek.php on
line 9
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result
resource in /home/k/l/klaassen/public_html/WJP/include/gastenboek.php on
line 28
I checked his table and found out that the table is empty.
What could there be wrong with this line of code if a table is empty?
And what can I do about it.
It never accurred before and we tested this service a lot before we started
using it, and then there wasn''t any problem at all when a table was empty.
(PS all the fields in the table have the option that they are allowed to be
empty.)
M.B.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
If you do a select on that table, before retrieving the results (
while($result_data=mysql_fetch_array($query)) ) verify that the result has
rows
ie
if(mysql_num_rows($query)>0)
while($result_data=mysql_fetch_array($query))
{
do something with the results
}
else
NO RESULTS.....
"Rich Gray" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Can you post some code to look at?
>
> -----Original Message-----
> From: M.B. [mailto:[EMAIL PROTECTED]]
> Sent: 11 September 2002 20:32
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Error after a while???
>
>
> Hi, I have a database and a site which has members and so on......
> but now I have service (also for a long time) http://www.wjp.cjb.net
> a guestbook service.
> But yesterday somebody mailt me to say that this error was on his
> guestbooksite:
>
> Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
> resource in /home/k/l/klaassen/public_html/WJP/include/gastenboek.php on
> line 9
>
> Warning: mysql_fetch_object(): supplied argument is not a valid MySQL
result
> resource in /home/k/l/klaassen/public_html/WJP/include/gastenboek.php on
> line 28
>
>
> I checked his table and found out that the table is empty.
> What could there be wrong with this line of code if a table is empty?
>
>
>
> And what can I do about it.
> It never accurred before and we tested this service a lot before we
started
> using it, and then there wasn''t any problem at all when a table was
empty.
> (PS all the fields in the table have the option that they are allowed to
be
> empty.)
>
> M.B.
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
Just a thought:
How long does that SQL query take? Have you tried setting the timeout period
to be longer than 30 seconds? Take a look at this:
http://www.php.net/manual/en/function.set-time-limit.php
Another thought: From my experience, sending mail from a Windows host takes
longer than from a *nix host. That could be an issue right there.
-Dash
-----Original Message-----
From: Chris Knipe [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 8:25 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-WIN] mysql_query() & mail() - something weird is going on !
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 Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I had a problem similar to this and it required that we update the
mssql.textsize and mssql.textlimit in the php.ini file.
Hope that helps,
ROn
dash php wrote:
>
> Just a thought:
>
> How long does that SQL query take? Have you tried setting the timeout period
> to be longer than 30 seconds? Take a look at this:
> http://www.php.net/manual/en/function.set-time-limit.php
>
> Another thought: From my experience, sending mail from a Windows host takes
> longer than from a *nix host. That could be an issue right there.
>
> -Dash
>
> -----Original Message-----
> From: Chris Knipe [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 12, 2002 8:25 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP-WIN] mysql_query() & mail() - something weird is going on !
>
> 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 Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Sorry for the dumb question , i'm a newbie. I fixed the the problem listed
with the subject as "Weird Error" .
----- Original Message -----
From: "Alexandru Martin" <[EMAIL PROTECTED]>
To: "php-windows" <[EMAIL PROTECTED]>
Sent: Tuesday, September 10, 2002 10:51 PM
Subject: [PHP-WIN] Weird Error
> Hello, i have a IRC bot made in php that worked and now it only
outputs
> "(0)" on the whole page !
> Please help me i am very confused. You can see my code at
> http://nopaste.snit.ch:8000/756 .
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
The file in the code below is not closing successfully. Variable $FC = 1.
Can someone tell me what is going on?
Thanks
Arthur
$OpenCSV = fopen ($FileCSV, "w");
if ($OpenCSV = fopen ($FileCSV, "w")) {
print ("The Sales CSV file was opened successfully<BR>\n");
} else {
print ("The query could not be executed!<BR>\n");
}
while { // stuff is happening w/ database and calculations here
fwrite ($OpenCSV, "$Orders_id,$Products_id, etc ...\n");}
$FC = fclose ($OpenCSV);
if (fclose ($OpenCSV)) {
print ("The Sales CSV file was Created successfully$FC<BR>\n");
} else {
print ("The Sales CSV could not be executed!$FC<BR>\n");
}
--
-----------------------------------------------------
Click here for Free Video!!
http://www.gohip.com/free_video/
--- End Message ---
--- Begin Message ---
Why are you opening it twice?
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
Quoting Arthur <[EMAIL PROTECTED]>:
> The file in the code below is not closing successfully. Variable $FC = 1.
> Can someone tell me what is going on?
> Thanks
> Arthur
>
>
> $OpenCSV = fopen ($FileCSV, "w");
> if ($OpenCSV = fopen ($FileCSV, "w")) {
> print ("The Sales CSV file was opened successfully<BR>\n");
> } else {
> print ("The query could not be executed!<BR>\n");
> }
> while { // stuff is happening w/ database and calculations here
> fwrite ($OpenCSV, "$Orders_id,$Products_id, etc ...\n");}
>
> $FC = fclose ($OpenCSV);
> if (fclose ($OpenCSV)) {
> print ("The Sales CSV file was Created successfully$FC<BR>\n");
> } else {
> print ("The Sales CSV could not be executed!$FC<BR>\n");
> }
>
> --
> -----------------------------------------------------
> Click here for Free Video!!
> http://www.gohip.com/free_video/
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
Modifications inline to try.
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
$OpenCSV = fopen ($FileCSV, "w");
if ($OpenCSV === FALSE) {
print ("The query could not be executed!<BR>\n");
} else {
print ("The Sales CSV file was opened successfully<BR>\n");
}
while { // stuff is happening w/ database and calculations here
fwrite ($OpenCSV, "$Orders_id,$Products_id, etc ...\n");}
$FC = fclose ($OpenCSV);
if ($FC == FALSE) {
print ("The Sales CSV could not be executed!$FC<BR>\n");
} else {
print ("The Sales CSV file was Created successfully$FC<BR>\n");
}
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
I have an file application that works for some data but not other?? The
error I'm getting causes an error on line 64
for (reset($t1); $ti=current($tl)
any thoughts??
<?php
include "npdata.php";
include "mapfuncs.php";
global $connID, $opid, $nextpage;
$li = get_complete_lot_info($lot);
$ops = implode($li['ops'], ",");
// To by pass a lot of unnecessary questioning of the operator
// (which run? which operation? fixtures? pallets? yada yada
// yada... I am going to pull the first operation that is identified
// as being run on newport equipment in templateops. Then check
// sys_loads for load information, then scam the stuff from the
// newport database
if (empty($opid)) {
$sql = "SELECT op.Operation_ID FROM operations AS op ";
$sql .= "INNER JOIN runs AS r ON (op.Run_ID = r.Run_ID) ";
$sql .= "INNER JOIN templateops AS top ON (r.Type =
top.Test_Code) ";
$sql .= "AND (top.Operation = op.Operation) ";
$sql .= "WHERE op.Operation_ID IN ($ops) AND top.Equip =
'NP' ORDER BY op.Operation_ID;";
$res = mysql_query($sql);
$op = (mysql_num_rows($res)? mysql_result($res, 0, 0): 0);
} else {
$opid = intval($opid);
$opid = ((empty($opid) || ($opid<0))? 0: $opid);
$op = ($opid? $li['ops'][$opid-1]: 0);
}
if ($op) {
$sql = "SELECT System, Fixture, Positions, Pallet, Dev_ndx,
0 AS Test_list FROM sys_loads WHERE Operation_ID=$op;";
$res = mysql_query($sql);
if (mysql_num_rows($res)) {
while ($obj = mysql_fetch_object($res)) {
$loads[] = $obj;
}
// All devices should be loaded in the same
system...
$sysid = $loads[0]->System;
$connID = connect_to_np_system($sysid);
// get list of steps for the ENTIRE lot (used to be
just one run)
$sql = "SELECT s.Step_ID, s.Step, s.Params ";
$sql .= "FROM runs AS r INNER JOIN operations AS op
ON (r.Run_ID = op.Run_ID) ";
$sql .= "INNER JOIN steps AS s ON (op.Operation_ID =
s.Operation_ID) ";
$sql .= "WHERE r.Lot_ID = '$lot' ORDER BY
s.Step_ID;";
$res = mysql_query($sql);
if (mysql_num_rows($res)) {
while ($obj = mysql_fetch_object($res)) {
$steps[] = $obj;
}
for (reset($steps); $step=current($steps);
next($steps)) {
$p = explode(",", $step->Params);
$name = $p[count($p)-1];
// echo "ID: $step->Step_ID, Name:
$name<br>\n";
$list1[] = "<option
value='$step->Step_ID'>$step->Step_ID. $name</option>";
}
for ($i=0; $i<count($loads); $i++) {
// Get tests for each load in
'Newport' operation...
$list2 = array();
$load = $loads[$i];
$tl =
get_tests_by_fixture($load->Fixture, $lot);
for (reset($tl); $ti=current($tl); next($tl)) {
$ttype = ($ti[2]==0?
"(LIV)": "(Burn-in)");
$list2[] = "<option
value='$ti[0]-$ti[1]'>$ti[0]-$ti[1] $ti[3] $ttype</option>";
}
$loads[$i]->Test_list = $list2;
}
echo "<table><tr><td
width='120'> </td><td>";
echo "<form name='frmTests'
action='main.php' method='post'>\n";
echo "<input type='hidden' name='page'
value='$nextpage'>\n";
echo "<input type='hidden' name='lot'
value='$lot'>\n";
echo "<input type='hidden' name='sysid'
value='$sysid'>\n";
echo "<input type='hidden' name='op'
value='$op'>\n";
echo "<table cellspacing='3' cellpadding='3'
border='0'>\n";
echo "<tr><td>Import Step:</td><td
colspan='3'><select name='step'>\n";
echo implode($list1, "\n");
echo "</td></tr>\n";
echo "<tr><td class='thdr'>Slot</td><td
class='thdr'>Pallet</td>";
echo "<td class='thdr'>Test(s)</td></tr>\n";
$ptr=1;
for (reset($loads); $load=current($loads);
next($loads)) {
echo
"<tr><td>$load->Fixture</td>\n";
echo "<td>$load->Pallet</td>\n";
$nm = "tl" . $ptr++ . "[]";
echo "<td><select name='$nm'
multiple>\n";
echo implode($load->Test_list,
"\n");
echo "</td></tr>\n";
}
echo "<tr><td> </td><td
colspan='2'><input type='submit' value='Ok'></td></tr>\n";
echo "</table>\n</form>\n";
echo "</td></tr></table>\n";
trav_set_focus('frmTests', 'step');
} else {
// No steps associated with lot. HUH?
// Major error...
}
} else {
// no newport operation loaded in sys_load
}
} else {
// No newport operation available, shouldn't be trying to
import
// from newport anyway...
}
Peter Silbermann
Tyco Electronics Inc.
Fiber Optic Buisness Unit
Active Products Group
Device Validation
908-704-3303 (Work)
610-570-2185 (Mobile)
[EMAIL PROTECTED]
?>
--- End Message ---
--- Begin Message ---
Hello...
Do I really have to get ALL the messages in the mailbox? Isn't it enough to
subscribe to the NNTP server?..
THX!
--- End Message ---
--- Begin Message ---
unsubscribe from the mailing list @ php.net
-----Original Message-----
From: Constantin Baciu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 12, 2002 3:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Newbie to the news!
Hello...
Do I really have to get ALL the messages in the mailbox? Isn't it enough to
subscribe to the NNTP server?..
THX!
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
But if I am not subscribed, I cannot post....
"David Hollister" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> unsubscribe from the mailing list @ php.net
>
> -----Original Message-----
> From: Constantin Baciu [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 12, 2002 3:00 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Newbie to the news!
>
> Hello...
>
> Do I really have to get ALL the messages in the mailbox? Isn't it enough
to
> subscribe to the NNTP server?..
>
>
> THX!
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---