php-windows Digest 14 Jan 2003 08:12:07 -0000 Issue 1534
Topics (messages 17831 through 17853):
secure ldap connections
17831 by: Daniel Fisher
17851 by: Leon
Re: form question
17832 by: Joseph W. Goff
17836 by: Anthony Ritter
17852 by: Uttam
Re: Subject: Download Script Name - Download fails (PHP4.0.5/Apache)
17833 by: Neil Smith
17834 by: Aaron Smith
PHP Locks Up - Help!
17835 by: Bil Click
Re: Installation problems =(
17837 by: Dash McElroy
graphics not displaying
17838 by: Steph Jobes
permission denied
17839 by: Anthony Ritter
17842 by: Sean Malloy
17843 by: Anthony Ritter
initialize variables
17840 by: Wade
17841 by: Sean Malloy
17844 by: Wade
17845 by: Sean Malloy
17846 by: Wade
17847 by: Howard, Robert P
17848 by: Wade
17849 by: Howard, Robert P
17853 by: Per Lundberg
Re: PHP + Win98 Question
17850 by: Uttam
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 ---
Hello,
I'm using the 4.3.0 version of php on Windows 2000 SP3.
I'm trying to get php to make a secure connection to our ldap server.
I am able to make insecure connections and queries just fine.
In the php.ini file I have enabled php_ldap.dll and php_openssl.dll.
If I attempt to use ldap_start_tls I get an error: 'Call to undefined function'.
So I'm assuming the ldap libs were not compiled with TLS.
Unfortunately I cannot get ldaps to work either.
Using a statement like:
ldap_connect("ldaps://ldap.host.com") or ldap_connect("ldap.host.com", 636)
produces the error: 'Unable to bind to server', when a bind is attempted.
Our ldap logs show a connection being opened and then immediately closed.
I also tried downloading and installing libsasl.dll, but this had no effect on my
problem.
Does this version php for windows suppport secure connections?
--Daniel Fisher
--- End Message ---
--- Begin Message ---
Hi Daniel
Very important: TLS is NOT SSL.... The start TLS is almost guaranteed not to
work for secure layer communication to your LDAP server. (You do need two
dll files in your win\sys32 directory though)
What I suggest is the following: Install STUNNEL accept connections on a
port... send all this communication to the LDAP server on its secure port.
STUNNEL will act as a wrapper for all LDAP queries.
Your script will then connect to your localhost on the port you chose above
and will not even know that the LDAP query is being sent away via a stunnel.
Cheers
> Hello,
> I'm using the 4.3.0 version of php on Windows 2000 SP3.
> I'm trying to get php to make a secure connection to our ldap server.
> I am able to make insecure connections and queries just fine.
> In the php.ini file I have enabled php_ldap.dll and php_openssl.dll.
> If I attempt to use ldap_start_tls I get an error: 'Call to undefined
function'.
> So I'm assuming the ldap libs were not compiled with TLS.
> Unfortunately I cannot get ldaps to work either.
> Using a statement like:
> ldap_connect("ldaps://ldap.host.com") or ldap_connect("ldap.host.com",
636)
> produces the error: 'Unable to bind to server', when a bind is attempted.
> Our ldap logs show a connection being opened and then immediately closed.
>
> I also tried downloading and installing libsasl.dll, but this had no
effect on my problem.
> Does this version php for windows suppport secure connections?
>
> --Daniel Fisher
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
The php.ini settings for error reporting on your IIS machine is set to E_ALL
whereas your local machine has the setting of E_ALL & ~E_NOTICE.
You can either change the php.ini file, use the error_reporting() function
in your program (http://www.php.net/error_reporting) or use isset() on the
variable before the first time you access them.
----- Original Message -----
From: "Anthony Ritter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 13, 2003 2:15 PM
Subject: [PHP-WIN] form question
> Hi,
> I'm testing the following form on:
>
> MS Win98 / IE 5.5 / PHP 4.0 / Apache and it works fine.
>
> However...when I publish the
>
> .php file
>
> and the
>
> data.txt file
>
> on the ISP's MS IIS server, I get undeclared variables and indexes when
the
> form page loads.
>
> The script follows.
>
> Any help would be greatly appreciated.
> Thank you.
> Tony Ritter
> .....................................................................
>
> // form.php
>
> <html>
> <head>
> <style>
> body {background-color:beige;
> body
> {
> scrollbar-base-color: #FCF6DC;
> scrollbar-face-color: #E3DBB5;
> scrollbar-track-color: #FCF6DC;
> scrollbar-arrow-color: #000;
> scrollbar-highlight-color: #fff;
> scrollbar-3dlight-color: #7B6D29;
> scrollbar-shadow-color: #7B6D29;
> scrollbar-darkshadow-color: #E3DBB5;
> }
> border:5px solid black;
> }
> textarea {border:1pt solid red;
> background-color:white;
> color:black;
>
> }
>
> textarea p{font-size:12px;
>
> }
>
> table {border:1pt solid black;
> width:700px;
> font-size:10px;
> background-color:#E3DBB5;
> color:#7B6D29;
> }
>
>
> input {border:1pt solid solid red;
> background-color:white;
> color:black;}
>
> .submit {
> background-color:#800000;
> color:white;}
>
> p {font-family:arial;
> font-size:12px;
> }
>
> hr { color:#800000;
>
> }
>
> A:link:{text-decoration:none; color:#7B6D29;}
> A:visited:{text-decoration:none; color:#7B6D29;}
> A:hover:{text-decoration:underline; color:green}
> </style>
> </head>
>
> <body>
> <?
> function WriteToFile ($thecomments,$thename,$theemail)
> {
> $TheFile = "data.txt";
> $Open = fopen ($TheFile, "a+");
> if ($Open)
> {
> fwrite ($Open, "$thecomments\t$thename\t$theemail\n");
> fclose ($Open);
> $Worked = TRUE;
> }
> else
> {
> $Worked = FALSE;
> }
> return $Worked;
> }
> function ReadTheFile()
> {
> $TheFile="data.txt";
> $Open=fopen($TheFile,"r");
> if ($Open)
> {
>
> print("<hr>");
>
> print("<P><i>Some of the messages have been:</i>\n");
>
> $Data=file($TheFile);
> for($n=0; $n<count($Data); $n++)
> {
> $getline=explode("\t",$Data[$n]);
> print("<table>");
>
> print("<tr>");
> print("<td><P>$getline[0]</P></TD>\n");
> print("</tr>");
> print("<tr>");
> print("<TD><P>$getline[1]</P></TD>\n");
> print("</tr>");
> print("<tr>");
> print("<TD><a href=mailto:$getline[2]><P>$getline[2]</P></a>\n");
> print("</tr>");
> print("</P>");
> print("</table>");
>
> } //end for loop
> fclose($Open);
>
> } //end if
> else
> {
> print("Unable to read data.txt");
> }
> } //end function
>
> function createform()
> {
>
> print("<form action=\"form.php\" method=post>\n");
> print("<P>So...How did <b><u>you</u></b> like EagleFest 2003?:<BR>
<textarea
> name=\"comments\" rows=3 cols=85></textarea> <br><br>\n");
> print("Your name: <input type=text name=\"yourname\" size=30>\n");
> print("Your e-mail: <input type=text name=\"youremail\" size=30>\n");
> print("<input type=hidden name=\"beensubmitted\" value=\"TRUE\">\n");
> print("<input type=submit name=\"submit\" <span class=\"submit\"
> value=\"click to submit\">\n");
> print("</form>\n");
>
> }
>
> function handleform()
> {
> global $comments;
> global $yourname;
> global $youremail;
> $comments=stripslashes($comments);
> $yourname=stripslashes($yourname);
> $youremail=stripslashes($youremail);
> $callfunction=WriteToFile($comments,$yourname,$youremail);
> if($callfunction)
> {
>
> print("<p align=\"center\"> </p>");
> print("<p align=\"center\"> </p>");
> print("<p align=\"center\"> </p>");
> print("<p align=\"center\"> </p>");
> print("<p align=\"center\"> </p>");
> print("<P align=\"center\"><font size=3 color=\"#800000\"><B>Thank you
> for your comments about EagleFest 2003.</text></B></font></P>");
>
> }//end if
> else
> {
> print("Your submission was not processed.");
> } //end else
> }
>
> if($beensubmitted)
> {
> handleform();
> }
> else
> {
> createform();
> ReadTheFile();
> }
> ?>
> </body>
> </html>
> .......................................................
>
>
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Joseph,
Thanks for the reply.
My ISP has a MS IIS server.
I am testing the following script on Apache Server / MS Win 98 / IE 5.5 and
it works fine.
When I publish the script to their server and try the formpage, I get:
"inetpub...Undefined index 1...
"inetpub...Undefinded index 2...
"inetpub...Undefined index 3...
Please advise the best way to access this script on their server.
I'm a newbie.
Thank you for your time.
TR
.......................................
<html>
<head>
<style>
body {background-color:beige;
body
{
scrollbar-base-color: #FCF6DC;
scrollbar-face-color: #E3DBB5;
scrollbar-track-color: #FCF6DC;
scrollbar-arrow-color: #000;
scrollbar-highlight-color: #fff;
scrollbar-3dlight-color: #7B6D29;
scrollbar-shadow-color: #7B6D29;
scrollbar-darkshadow-color: #E3DBB5;
}
border:5px solid black;
}
textarea {border:1pt solid red;
background-color:white;
color:black;
}
textarea p{font-size:12px;
}
table {border:1pt solid black;
width:700px;
font-size:10px;
background-color:#E3DBB5;
color:#7B6D29;
}
input {border:1pt solid solid red;
background-color:white;
color:black;}
.submit {
background-color:#800000;
color:white;}
p {font-family:arial;
font-size:12px;
}
hr { color:#800000;
}
A:link:{text-decoration:none; color:#7B6D29;}
A:visited:{text-decoration:none; color:#7B6D29;}
A:hover:{text-decoration:underline; color:green}
</style>
</head>
<body>
<?
function WriteToFile ($thecomments,$thename,$theemail)
{
$TheFile = "data.txt";
$Open = fopen ($TheFile, "a+");
if ($Open)
{
fwrite ($Open, "$thecomments\t$thename\t$theemail\n");
fclose ($Open);
$Worked = TRUE;
}
else
{
$Worked = FALSE;
}
return $Worked;
}
function ReadTheFile()
{
$TheFile="data.txt";
$Open=fopen($TheFile,"r");
if ($Open)
{
print("<hr>");
print("<P><i>Some of the messages have been:</i>\n");
$Data=file($TheFile);
for($n=0; $n<count($Data); $n++)
{
$getline=explode("\t",$Data[$n]);
print("<table>");
print("<tr>");
print("<TD><P>$getline[0]</TD>\n");
print("</tr>");
print("<tr>");
print("<TD><P>$getline[1]</TD>\n");
print("</tr>");
print("<tr>");
print("<TD><P><a
href=\"mailto:$getline[2]\">$getline[2]</a></TD>\n");
print("</tr>");
print("</table>");
} //end for loop
fclose($Open);
} //end if
else
{
print("Unable to read data.txt");
}
} //end function
function createform()
{
print("<form action=\"$PHP_SELF\" method=post>\n");
print("<P>So...How did <b><u>you</u></b> like EagleFest 2003?:<BR> <textarea
name=\"comments\" rows=3 cols=85></textarea> <br><br>\n");
print("Your name: <input type=text name=\"yourname\" size=30>\n");
print("Your e-mail: <input type=text name=\"youremail\" size=30>\n");
print("<input type=hidden name=\"beensubmitted\" value=\"TRUE\">\n");
print("<input type=submit name=\"submit\" <span class=\"submit\"
value=\"click to submit\"></span>\n");
print("</form>\n");
}
function handleform()
{
global $comments;
global $yourname;
global $youremail;
$comments=stripslashes($comments);
$yourname=stripslashes($yourname);
$youremail=stripslashes($youremail);
$callfunction=WriteToFile($comments,$yourname,$youremail);
if($callfunction)
{
print("<p align=\"center\"> </p>");
print("<p align=\"center\"> </p>");
print("<p align=\"center\"> </p>");
print("<p align=\"center\"> </p>");
print("<p align=\"center\"> </p>");
print("<P align=\"center\"><font size=3 color=\"#800000\"><B>Thank you
for your comments about EagleFest 2003.</text></B></font></P>");
}//end if
else
{
print("Your submission was not processed.");
} //end else
}
if($beensubmitted)
{
handleform();
}
else
{
createform();
ReadTheFile();
}
?>
</body>
</html>
--- End Message ---
--- Begin Message ---
is it because your ISP has register_globals turned off?
if so this may correct the problem:
function handleform()
{
global $_POST['comments'];
global $_POST['yourname'];
global $_POST['youremail'];
$comments=stripslashes($_POST['comments']);
$yourname=stripslashes($_POST['yourname']);
$youremail=stripslashes($_POST['youremail']);
.
.
.
.
.
}
regds,
-----Original Message-----
From: Anthony Ritter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 01:45
To: [EMAIL PROTECTED]
Subject: form question
Hi,
I'm testing the following form on:
MS Win98 / IE 5.5 / PHP 4.0 / Apache and it works fine.
However...when I publish the
.php file
and the
data.txt file
on the ISP's MS IIS server, I get undeclared variables and indexes when
the
form page loads.
The script follows.
Any help would be greatly appreciated.
Thank you.
Tony Ritter
.....................................................................
// form.php
<html>
<head>
<style>
body {background-color:beige;
body
{
scrollbar-base-color: #FCF6DC;
scrollbar-face-color: #E3DBB5;
scrollbar-track-color: #FCF6DC;
scrollbar-arrow-color: #000;
scrollbar-highlight-color: #fff;
scrollbar-3dlight-color: #7B6D29;
scrollbar-shadow-color: #7B6D29;
scrollbar-darkshadow-color: #E3DBB5;
}
border:5px solid black;
}
textarea {border:1pt solid red;
background-color:white;
color:black;
}
textarea p{font-size:12px;
}
table {border:1pt solid black;
width:700px;
font-size:10px;
background-color:#E3DBB5;
color:#7B6D29;
}
input {border:1pt solid solid red;
background-color:white;
color:black;}
.submit {
background-color:#800000;
color:white;}
p {font-family:arial;
font-size:12px;
}
hr { color:#800000;
}
A:link:{text-decoration:none; color:#7B6D29;}
A:visited:{text-decoration:none; color:#7B6D29;}
A:hover:{text-decoration:underline; color:green}
</style>
</head>
<body>
<?
function WriteToFile ($thecomments,$thename,$theemail)
{
$TheFile = "data.txt";
$Open = fopen ($TheFile, "a+");
if ($Open)
{
fwrite ($Open, "$thecomments\t$thename\t$theemail\n");
fclose ($Open);
$Worked = TRUE;
}
else
{
$Worked = FALSE;
}
return $Worked;
}
function ReadTheFile()
{
$TheFile="data.txt";
$Open=fopen($TheFile,"r");
if ($Open)
{
print("<hr>");
print("<P><i>Some of the messages have been:</i>\n");
$Data=file($TheFile);
for($n=0; $n<count($Data); $n++)
{
$getline=explode("\t",$Data[$n]);
print("<table>");
print("<tr>");
print("<td><P>$getline[0]</P></TD>\n");
print("</tr>");
print("<tr>");
print("<TD><P>$getline[1]</P></TD>\n");
print("</tr>");
print("<tr>");
print("<TD><a
href=mailto:$getline[2]><P>$getline[2]</P></a>\n");
print("</tr>");
print("</P>");
print("</table>");
} //end for loop
fclose($Open);
} //end if
else
{
print("Unable to read data.txt");
}
} //end function
function createform()
{
print("<form action=\"form.php\" method=post>\n");
print("<P>So...How did <b><u>you</u></b> like EagleFest 2003?:<BR>
<textarea
name=\"comments\" rows=3 cols=85></textarea> <br><br>\n");
print("Your name: <input type=text name=\"yourname\" size=30>\n");
print("Your e-mail: <input type=text name=\"youremail\"
size=30>\n");
print("<input type=hidden name=\"beensubmitted\" value=\"TRUE\">\n");
print("<input type=submit name=\"submit\" <span class=\"submit\"
value=\"click to submit\">\n");
print("</form>\n");
}
function handleform()
{
global $comments;
global $yourname;
global $youremail;
$comments=stripslashes($comments);
$yourname=stripslashes($yourname);
$youremail=stripslashes($youremail);
$callfunction=WriteToFile($comments,$yourname,$youremail);
if($callfunction)
{
print("<p align=\"center\"> </p>");
print("<p align=\"center\"> </p>");
print("<p align=\"center\"> </p>");
print("<p align=\"center\"> </p>");
print("<p align=\"center\"> </p>");
print("<P align=\"center\"><font size=3 color=\"#800000\"><B>Thank
you
for your comments about EagleFest 2003.</text></B></font></P>");
}//end if
else
{
print("Your submission was not processed.");
} //end else
}
if($beensubmitted)
{
handleform();
}
else
{
createform();
ReadTheFile();
}
?>
</body>
</html>
.......................................................
--- End Message ---
--- Begin Message ---
HI Aaron, List -
Do you get the same result by sending instead the following header :
header("Content-Disposition:inline; filename=test.zip");
I have got round this filename thing to some extent using .htaccess /
mod_rewrite to wildcard the requested name for a directory, passing the
parameters in the URL to the PHP script as a query string (the PHP script
then loads the requested file and passes it to the browser with the correct
headers).
Now for my problem :
I have a similar scenario, but I can't get IE6 to download the file
verbatim (in this case its a dynamically generated ZIP file). Netscape 4
behaves just as expected. The file is being dished up okay (I am getting a
200 response from the server)
With IE6, the download popup appears with the correct filename, but then I
get 'IE cannot download (filename) from (hostname)'. I am sending headers
as follows :
header("Expires:Tue, 20 Oct 2003 21:14:41 GMT",true);
header("Content-type:application/octet-stream");
header("Content-disposition: attachment; filename=test.txt");
header("Content-length:".strlen($zipout->file()));
Now, two things are happening :
1/ I get the error as mentioned above
2/ Checking the raw headers with telnet, I get the following output : Note
the 2 'expires' headers which are being sent.
HTTP/1.1 200 OK
Date: Mon, 13 Jan 2003 22:00:52 GMT
Server: Apache/1.3.14 (Win32)
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 19 Nov 1981 08:52:00 GMT, Tue, 20 Oct 2003 21:14:41 GMT
Pragma: no-cache
X-Powered-By: PHP/4.0.5
Set-Cookie: PHPSESSID=209662eebd6b5b150815f0edbbb96da4; path=/
Content-length: 2152
Connection: close
Content-Type: application/octet-stream
The PHP manual states optional parameter 'true' after a header will replace
the existing header. This doesn't seem to be working in this case on the
Expires header - which I suspect of causing my 'Cannot download' problem
Is this a limitation or known bug in PHP4.0.5 ? Else, I have missed
something obvious, perhaps somebody can give me a pointer :-)
Cheers,
Neil Smith.
At 20:08 13/01/2003 +0000, you wrote:
Message-Id: <[EMAIL PROTECTED]>
Date: Mon, 13 Jan 2003 11:47:14 -0500
To: [EMAIL PROTECTED]
From: Aaron Smith <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: Download Script Name
Hello all,
I have a script that successfully provides a user with an open/save
confirmation dialog box when downloading a file, and the correct filename
displays in the file name edit box (thanks to Content-Disposition). But
when the file actually starts to download, the title bar of the IE
download box says something to the effect of, "10% of blah.php Completed"
and so on, instead of saying, "10% of ActualFileName.exe Completed." (By
the way, this is IE6.0 under XP Pro). I understand that's technically
correct, especially since blah.php is the file that opened and is actually
printing the contents of ActualFileName.exe, but this is confusing for
users who think they are downloading the blah.php file instead (even
though the file name edit box displayed the correct file name).
My current work-around is to have ActualFileName.exe be a PHP script that
opens ActualFileName.exe (the REAL ActualFileName.exe) and prints it out.
And I only have Apache using PHP to process .EXE files in that one
directory. But I'm curious as to whether there's a better way to do this,
or whether I'm stuck on a technicality?
Thanks.
--
To insure that you receive proper support, please include all
past correspondence (where applicable), and any relevant
information pertinent to your situation when submitting a
problem report to the GW Micro Technical Support Team.
Aaron Smith
GW Micro
Phone: 260/489-3671
Fax: 260/489-2608
WWW: http://www.gwmicro.com
FTP: ftp://ftp.gwmicro.com
Technical Support & Web Development
--- End Message ---
--- Begin Message ---
Neil,
My actual download portion looks a little something like this:
$filename = "c:\\somewhere\\foo.exe";
$length = filesize($filename);
header("Accept-Ranges: bytes\n");
header("Content-Length: $length\n");
header("Content-Type: application/octet-stream\n");
header("Content-Disposition: attachment;filename=foo.exe\n\n");
readfile($filename);
Aaron
At 05:03 PM 1/13/2003, Neil Smith wrote:
HI Aaron, List -
Do you get the same result by sending instead the following header :
header("Content-Disposition:inline; filename=test.zip");
I have got round this filename thing to some extent using .htaccess /
mod_rewrite to wildcard the requested name for a directory, passing the
parameters in the URL to the PHP script as a query string (the PHP script
then loads the requested file and passes it to the browser with the
correct headers).
Now for my problem :
I have a similar scenario, but I can't get IE6 to download the file
verbatim (in this case its a dynamically generated ZIP file). Netscape 4
behaves just as expected. The file is being dished up okay (I am getting a
200 response from the server)
With IE6, the download popup appears with the correct filename, but then I
get 'IE cannot download (filename) from (hostname)'. I am sending headers
as follows :
header("Expires:Tue, 20 Oct 2003 21:14:41 GMT",true);
header("Content-type:application/octet-stream");
header("Content-disposition: attachment; filename=test.txt");
header("Content-length:".strlen($zipout->file()));
Now, two things are happening :
1/ I get the error as mentioned above
2/ Checking the raw headers with telnet, I get the following output : Note
the 2 'expires' headers which are being sent.
HTTP/1.1 200 OK
Date: Mon, 13 Jan 2003 22:00:52 GMT
Server: Apache/1.3.14 (Win32)
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 19 Nov 1981 08:52:00 GMT, Tue, 20 Oct 2003 21:14:41 GMT
Pragma: no-cache
X-Powered-By: PHP/4.0.5
Set-Cookie: PHPSESSID=209662eebd6b5b150815f0edbbb96da4; path=/
Content-length: 2152
Connection: close
Content-Type: application/octet-stream
The PHP manual states optional parameter 'true' after a header will
replace the existing header. This doesn't seem to be working in this case
on the Expires header - which I suspect of causing my 'Cannot download' problem
Is this a limitation or known bug in PHP4.0.5 ? Else, I have missed
something obvious, perhaps somebody can give me a pointer :-)
Cheers,
Neil Smith.
At 20:08 13/01/2003 +0000, you wrote:
Message-Id: <[EMAIL PROTECTED]>
Date: Mon, 13 Jan 2003 11:47:14 -0500
To: [EMAIL PROTECTED]
From: Aaron Smith <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: Download Script Name
Hello all,
I have a script that successfully provides a user with an open/save
confirmation dialog box when downloading a file, and the correct filename
displays in the file name edit box (thanks to Content-Disposition). But
when the file actually starts to download, the title bar of the IE
download box says something to the effect of, "10% of blah.php Completed"
and so on, instead of saying, "10% of ActualFileName.exe Completed." (By
the way, this is IE6.0 under XP Pro). I understand that's technically
correct, especially since blah.php is the file that opened and is
actually printing the contents of ActualFileName.exe, but this is
confusing for users who think they are downloading the blah.php file
instead (even though the file name edit box displayed the correct file name).
My current work-around is to have ActualFileName.exe be a PHP script that
opens ActualFileName.exe (the REAL ActualFileName.exe) and prints it out.
And I only have Apache using PHP to process .EXE files in that one
directory. But I'm curious as to whether there's a better way to do this,
or whether I'm stuck on a technicality?
Thanks.
--
To insure that you receive proper support, please include all
past correspondence (where applicable), and any relevant
information pertinent to your situation when submitting a
problem report to the GW Micro Technical Support Team.
Aaron Smith
GW Micro
Phone: 260/489-3671
Fax: 260/489-2608
WWW: http://www.gwmicro.com
FTP: ftp://ftp.gwmicro.com
Technical Support & Web Development
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
To insure that you receive proper support, please include all
past correspondence (where applicable), and any relevant
information pertinent to your situation when submitting a
problem report to the GW Micro Technical Support Team.
Aaron Smith
GW Micro
Phone: 260/489-3671
Fax: 260/489-2608
WWW: http://www.gwmicro.com
FTP: ftp://ftp.gwmicro.com
Technical Support & Web Development
--- End Message ---
--- Begin Message ---
Hello -
I am trying to use a simple email script. When the php file is called, the
browser just hangs. If I look in Task Manager, the php.exe has stopped -
shows no activity. I am a PHP novice, so have tried several email scripts
from the 'Net. Currently trying the PHP Email Responder from
http://www.abspoel.com/roel-karin/download.php
I have just installed 4.3.0 on Windows 2000 Server in CGI mode. Executables
are in c:\php, php.ini in c:\winnt. I gave all Read/Execute permissions by
IUSR_machine per documentation. Set register_globals = true, no change.
If I run c:\php\php -i from a DOS prompt I get a screen full of output.
Anyone can check out the config at: http://www.jernlaw.com/phpinfo.php
Any suggestions greatly appreciated!
Bil Click
--- End Message ---
--- Begin Message ---
Bobo,
Perhaps your zlib issue could be due to an old php_zlib.php dll file.
I would definitely upgrade your MySQL to at least 4.0.8, if you're set on
4.0. There were a few nasty bugs in the older versions (4.0.4 in
particular bugger'd me up big time).
-Dash
The only possible interpretation of any research whatever in the
`social sciences' is: some do, some don't.
-- Ernest Rutherford
On Mon, 13 Jan 2003, Bobo Wieland wrote:
> Hi all...
>
> Thought that I should upgrade from PHP4.0 to 4.3 and so I did... But I ran
> into trouble, as always. when ever I try to load an PHP page I get an alert
> message saying:
>
> "Unknown(): Unable to load dynamic library 'G:\PHP\extensions\php_zlib.dll'"
>
> I really do hate php.ini... Why should allways open source and linux/unix
> things be so complicated?
>
> I have php_zlib.dll in the given directory and I've added the line:
> 'extension=php_zlib.dll' to php.ini since it wasn't there from the start...
>
> What do I do?
> ------------
>
> Now, to prevent from further damage to my setup; I have MySQL 4.0.3-beta and
> was suggested to upgrade that one too... Can I do this without to much
> problems? Something I should think about?
>
> thanks!!!
>
>
> .bobo
>
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hi,
I'm learning PHP, and I'm sure there is a simple answer to this question.
I've created a simple test web site with each of the pages using PHP to call
included files for the header, footer, and navigational bar. The files for
the header, footer, and navigational bar are simple HTML files with a few
graphics. The main PHP pages also contain graphics. The PHP is working
great - I even have a breadcrumb trail using PHP that is working great. The
header, footer, and navigational bar all come in to the calling pages.
However, NONE of the graphics display for any of the included files or main
pages (whether they are php or html). I thought it might be my source
references (which are relative), but even when I put in absolute references,
the graphics will not display.
Part of the problem, I think, is that Apache running on our web server is
the version that was supplied by Oracle. When I installed a downloaded
version of Apache on the web server, my test site worked perfectly - BUT -
the Oracle database functions were totally lost. I'm stuck using the version
of Apache that came with Oracle.
The test site works perfectly on my test computer, where I'm running the
standalone version of the Apache web server with Windows 98 and PHP version
4.2.2 (running as a module).
What is it about the Oracle's Apache that is keeping my graphics from
displaying? Is there a setting that I am missing in the conf file?
Server information:
Windows NT 4.0 SP6a
Oracle HTTP Server Powered by Apache/1.3.12 (Win32)
PHP version 4.2.2 (running as a module)
I will gladly supply more details if needed.
Thanks so much for any help you can give me!
Steph Jobes
--- End Message ---
--- Begin Message ---
Using MS Win98 / php 4:
Any ideas on how I can change my permssion settings on a file called
data.txt so it can be read to and written to or do I have to take that up
with my ISP.
I get the following after I submit a form:
....................
Warning: fopen("data.txt", "a+") - Permission denied in
d:\inetpub\www.blahblah.org\formtest.php on line 80
Your submission was not processed.
........................
Thank you for your time and help.
TR
--- End Message ---
--- Begin Message ---
Is the file on Your local machine, or on your ISP's web server? (Because I
doubt they are running web servers on windows 98)
If it is running on your ISPs server. Create a 'data' folder, and have them
give the IUSR account modify access to the directory. That way the web
server can read and write files to that directory. Then you can just place
files within that data/ dir, and read/write them
-----Original Message-----
From: Anthony Ritter [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 14 January 2003 11:03 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] permission denied
Using MS Win98 / php 4:
Any ideas on how I can change my permssion settings on a file called
data.txt so it can be read to and written to or do I have to take that up
with my ISP.
I get the following after I submit a form:
....................
Warning: fopen("data.txt", "a+") - Permission denied in
d:\inetpub\www.blahblah.org\formtest.php on line 80
Your submission was not processed.
........................
Thank you for your time and help.
TR
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
The file has been uploaded and resides on my ISP's IIS server.
TR
...................................................
----- Original Message -----
From: "Sean Malloy" <[EMAIL PROTECTED]>
To: "Anthony Ritter" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Monday, January 13, 2003 9:35 PM
Subject: RE: [PHP-WIN] permission denied
> Is the file on Your local machine, or on your ISP's web server? (Because I
> doubt they are running web servers on windows 98)
>
> If it is running on your ISPs server. Create a 'data' folder, and have
them
> give the IUSR account modify access to the directory. That way the web
> server can read and write files to that directory. Then you can just place
> files within that data/ dir, and read/write them
>
> -----Original Message-----
> From: Anthony Ritter [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 14 January 2003 11:03 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] permission denied
>
>
> Using MS Win98 / php 4:
>
> Any ideas on how I can change my permssion settings on a file called
> data.txt so it can be read to and written to or do I have to take that up
> with my ISP.
>
> I get the following after I submit a form:
> ....................
> Warning: fopen("data.txt", "a+") - Permission denied in
> d:\inetpub\www.blahblah.org\formtest.php on line 80
> Your submission was not processed.
> ........................
> Thank you for your time and help.
> TR
>
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> ---
> [This E-mail scanned for viruses by gonefishingguideservice.com]
>
>
---
[This E-mail scanned for viruses by gonefishingguideservice.com]
--- End Message ---
--- Begin Message ---
01132003 2014 CST
Ok. Im so happy that you guys explained the $_POST thing to me. Just
implementing that in every tutorial after that worked.
Now, I have another problem.
This, again, is right out of the book. Everything in this book is in
<?php tags. This code brings up a blank page. When you look at the
source code through the browser all you see is
<html><head></head></html>. What is it that I cannot see and my book
will not tell me?
Wade
***************
<html>
<head>
<title>Charlies Menu</title>
</head>
<body>
<?php
$Entrees=array("Steak ($9)", "Pizza ($7)", "Pasta ($6)");
echo "<form method="POST" action="menu2.php">"
echo "Which of the following would you like as an entree?";
echo "<select name='ListBox1'>";
echo "<option selected value=' '>Select...</option>";
echo "<option>$Entrees[0]</option>";
echo "<option>$Entrees[1]</option>";
echo "<option>$Entrees[2]</option>";
echo "</select><br><br>";
echo "<input type="submit">";
echo "</form>";
?>
</body>
</html>
--- End Message ---
--- Begin Message ---
Using double quotes ("), to create strings, PHP will handle any $ sign in
the string as a variable.. There are two ways around this.
$Entrees= array('Steak ($9)', 'Pizza ($7)', 'Pasta ($6)');
Or
$Entrees=array("Steak (\$9)", "Pizza (\$7)", "Pasta (\$6)");
also, when using echo in this context:
echo "<form method="POST" action="menu2.php">";
You need to escape out the "'s within the string. IE:
echo "<form method=\"POST\" action=\"menu2.php\">"
I use single quotes instead.
Here is the fixerupped version of the code.
<html>
<head>
<title>Charlies Menu</title>
</head>
<body>
<?php
$Entrees = array('Steak ($9)', 'Pizza ($7)', 'Pasta ($6)');
echo '<form method="POST" action="menu2.php">'; // this ; was missing
echo 'Which of the following would you like as an entree?';
echo '<select name="ListBox1">';
echo '<option selected value="">Select...</option>';
echo '<option value="' . $Entrees[0] . '">' . $Entrees[0] . '</option>';
echo '<option value="' . $Entrees[1] . '">' . $Entrees[0] . '</option>';
echo '<option value="' . $Entrees[2] . '">' . $Entrees[0] . '</option>';
echo '</select><br><br>';
echo '<input type="submit">';
echo '</form>';
?>
</body>
</html>
or even better, instead of typing out each Array item individually:
<html>
<head>
<title>Charlies Menu</title>
</head>
<body>
<?php
$Entrees = array('Steak ($9)', 'Pizza ($7)', 'Pasta ($6)');
echo '<form method="POST" action="menu2.php">'; // this ; was missing
echo 'Which of the following would you like as an entree?';
echo '<select name="ListBox1">';
echo '<option selected value="">Select...</option>';
$records = count($Entrees); // count the number of elements within the
array
// loop through the array showing each record within the array
for ($i = 0; $i < $records; $i++)
{
echo '<option value="' . $Entrees[$i] . '">' . $Entrees[$i] .
'</option>';
}
echo '</select><br><br>';
echo '<input type="submit">';
echo '</form>';
?>
</body>
</html>
Thsi way, you can add new elements to the $Entrees array, without having to
add extra code to your output.
-----Original Message-----
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 14 January 2003 3:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] initialize variables
01132003 2014 CST
Ok. Im so happy that you guys explained the $_POST thing to me. Just
implementing that in every tutorial after that worked.
Now, I have another problem.
This, again, is right out of the book. Everything in this book is in
<?php tags. This code brings up a blank page. When you look at the
source code through the browser all you see is
<html><head></head></html>. What is it that I cannot see and my book
will not tell me?
Wade
***************
<html>
<head>
<title>Charlies Menu</title>
</head>
<body>
<?php
$Entrees=array("Steak ($9)", "Pizza ($7)", "Pasta ($6)");
echo "<form method="POST" action="menu2.php">"
echo "Which of the following would you like as an entree?";
echo "<select name='ListBox1'>";
echo "<option selected value=' '>Select...</option>";
echo "<option>$Entrees[0]</option>";
echo "<option>$Entrees[1]</option>";
echo "<option>$Entrees[2]</option>";
echo "</select><br><br>";
echo "<input type="submit">";
echo "</form>";
?>
</body>
</html>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
01132003 2059 CST
Sean,
Thats a new one for me. In the line below, what does the " ' .
$Entrees[0] . ' "> do?
The " . ", do they have some value or do they negate something?
echo '<option value="' . $Entrees[0] . '">' . $Entrees[0] . '</option>';
Wade
--- End Message ---
--- Begin Message ---
String concatenation?
Its a way ogf combining strings into one.
$string = 'Hello';
$string = $string . ' World';
echo $string;
would output 'Hello World'
-----Original Message-----
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 14 January 2003 4:02 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] initialize variables
01132003 2059 CST
Sean,
Thats a new one for me. In the line below, what does the " ' .
$Entrees[0] . ' "> do?
The " . ", do they have some value or do they negate something?
echo '<option value="' . $Entrees[0] . '">' . $Entrees[0] . '</option>';
Wade
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
01132003 2203 CST
I thought I was starting to get it until I got to the last section.
Original code from the book:
<?php
$total = 0;
echo "Your order was for the following:<br><br>";
echo "Entree: $Course1<br>";
echo "Dessert: $ListBox2<br><br>";
foreach (array($Course1, $ListBox2) as $val)
{
if (ereg("[0-9]+", $val, $reg)) $total += $reg[0];
}
echo "TOTAL BILL = $" . $total . "<br>";
?>
I was brave and tried to make many changes but none worked. This is
where I ended up:
<?php
$total= 0;
echo 'Your order was for the following:<br><br>';
echo 'Entree: "' . $_POST . $Course1 . '"<br>';
echo 'Dessert: "' . $_POST . $ListBox2 . '"<br><br>';
foreach (array($Course1, $ListBox2) as $val)
{
if (ereg('[0-9]+', $val, $regs)) $total += $regs[0];
}
echo 'TOTAL BILL = $"' . $total . '"<br>';
?>
The output for this last code is:
Your order was for the following:
Entree: Array
Dessert: Array
TOTAL BILL = $"0"
Enlighten me. Im trying hard to understand where to put things together.
Thanks
Wade
Sean Malloy wrote:
String concatenation?
Its a way ogf combining strings into one.
$string = 'Hello';
$string = $string . ' World';
echo $string;
would output 'Hello World'
-----Original Message-----
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 14 January 2003 4:02 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] initialize variables
01132003 2059 CST
Sean,
Thats a new one for me. In the line below, what does the " ' .
$Entrees[0] . ' "> do?
The " . ", do they have some value or do they negate something?
echo '<option value="' . $Entrees[0] . '">' . $Entrees[0] . '</option>';
Wade
--- End Message ---
--- Begin Message ---
Hi Wade,
This is what you should have put in the Echo Lines
echo 'Entree: "' . $_POST['Course1'] . '"<br>';
echo 'Dessert: "' . $_POST['ListBox2'] . '"<br><br>';
the $_POST variable is set as an array with the names of each of the POST
variables as Keys to the array. As such $_POST['Course1'] is the
replacement of $Course1.
Keep on trying.
Rob Howard
-----Original Message-----
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 14 January 2003 5:13 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] initialize variables
01132003 2203 CST
I thought I was starting to get it until I got to the last section.
Original code from the book:
<?php
$total = 0;
echo "Your order was for the following:<br><br>";
echo "Entree: $Course1<br>";
echo "Dessert: $ListBox2<br><br>";
foreach (array($Course1, $ListBox2) as $val)
{
if (ereg("[0-9]+", $val, $reg)) $total += $reg[0];
}
echo "TOTAL BILL = $" . $total . "<br>";
?>
I was brave and tried to make many changes but none worked. This is
where I ended up:
<?php
$total= 0;
echo 'Your order was for the following:<br><br>';
echo 'Entree: "' . $_POST . $Course1 . '"<br>';
echo 'Dessert: "' . $_POST . $ListBox2 . '"<br><br>';
foreach (array($Course1, $ListBox2) as $val)
{
if (ereg('[0-9]+', $val, $regs)) $total += $regs[0];
}
echo 'TOTAL BILL = $"' . $total . '"<br>';
?>
The output for this last code is:
Your order was for the following:
Entree: Array
Dessert: Array
TOTAL BILL = $"0"
Enlighten me. Im trying hard to understand where to put things together.
Thanks
Wade
Sean Malloy wrote:
> String concatenation?
>
> Its a way ogf combining strings into one.
>
> $string = 'Hello';
>
> $string = $string . ' World';
>
> echo $string;
>
> would output 'Hello World'
>
> -----Original Message-----
> From: Wade [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 14 January 2003 4:02 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] initialize variables
>
>
> 01132003 2059 CST
>
> Sean,
>
> Thats a new one for me. In the line below, what does the " ' .
> $Entrees[0] . ' "> do?
>
> The " . ", do they have some value or do they negate something?
>
> echo '<option value="' . $Entrees[0] . '">' . $Entrees[0] . '</option>';
>
>
> Wade
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal
#####################################################################################
--- End Message ---
--- Begin Message ---
01132003 2251 CST
Thanks Robert. I was close before. I had tried something similar but
just didnt get it straight. Have another question. I made the change to
the code and the result is:
Your order was for the following:
Entree: ""
Dessert: "Ice Cream ($2)"
TOTAL BILL = $"0"
Now, for all variables do I put $_ before the variable? The rest of the
code does not have this? But, That does not explain why the Course1 data
was not displayed. Is it instead of Course1 it should be ListBox1?
Wade
Robert P Howard wrote:
Hi Wade,
This is what you should have put in the Echo Lines
echo 'Entree: "' . $_POST['Course1'] . '"<br>';
echo 'Dessert: "' . $_POST['ListBox2'] . '"<br><br>';
the $_POST variable is set as an array with the names of each of the POST
variables as Keys to the array. As such $_POST['Course1'] is the
replacement of $Course1.
Keep on trying.
Rob Howard
-----Original Message-----
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 14 January 2003 5:13 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] initialize variables
01132003 2203 CST
I thought I was starting to get it until I got to the last section.
Original code from the book:
<?php
$total = 0;
echo "Your order was for the following:<br><br>";
echo "Entree: $Course1<br>";
echo "Dessert: $ListBox2<br><br>";
foreach (array($Course1, $ListBox2) as $val)
{
if (ereg("[0-9]+", $val, $reg)) $total += $reg[0];
}
echo "TOTAL BILL = $" . $total . "<br>";
?>
I was brave and tried to make many changes but none worked. This is
where I ended up:
<?php
$total= 0;
echo 'Your order was for the following:<br><br>';
echo 'Entree: "' . $_POST . $Course1 . '"<br>';
echo 'Dessert: "' . $_POST . $ListBox2 . '"<br><br>';
foreach (array($Course1, $ListBox2) as $val)
{
if (ereg('[0-9]+', $val, $regs)) $total += $regs[0];
}
echo 'TOTAL BILL = $"' . $total . '"<br>';
?>
The output for this last code is:
Your order was for the following:
Entree: Array
Dessert: Array
TOTAL BILL = $"0"
Enlighten me. Im trying hard to understand where to put things together.
Thanks
Wade
Sean Malloy wrote:
String concatenation?
Its a way ogf combining strings into one.
$string = 'Hello';
$string = $string . ' World';
echo $string;
would output 'Hello World'
-----Original Message-----
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 14 January 2003 4:02 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] initialize variables
01132003 2059 CST
Sean,
Thats a new one for me. In the line below, what does the " ' .
$Entrees[0] . ' "> do?
The " . ", do they have some value or do they negate something?
echo '<option value="' . $Entrees[0] . '">' . $Entrees[0] . '</option>';
Wade
--- End Message ---
--- Begin Message ---
Looking at your earlier posts I would suggest that yes it should be ListBox1
and not Course1.
Also change the foreach line to read
foreach (array($_POST['ListBox1'], $_POST['ListBox2']) as $val)
The $_ is only used for the Automatic Global Variables.
Regards
Rob Howard
-----Original Message-----
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 14 January 2003 5:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] initialize variables
01132003 2251 CST
Thanks Robert. I was close before. I had tried something similar but
just didnt get it straight. Have another question. I made the change to
the code and the result is:
Your order was for the following:
Entree: ""
Dessert: "Ice Cream ($2)"
TOTAL BILL = $"0"
Now, for all variables do I put $_ before the variable? The rest of the
code does not have this? But, That does not explain why the Course1 data
was not displayed. Is it instead of Course1 it should be ListBox1?
Wade
Robert P Howard wrote:
> Hi Wade,
>
> This is what you should have put in the Echo Lines
>
> echo 'Entree: "' . $_POST['Course1'] . '"<br>';
> echo 'Dessert: "' . $_POST['ListBox2'] . '"<br><br>';
>
> the $_POST variable is set as an array with the names of each of the POST
> variables as Keys to the array. As such $_POST['Course1'] is the
> replacement of $Course1.
>
> Keep on trying.
>
> Rob Howard
> -----Original Message-----
> From: Wade [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 14 January 2003 5:13 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] initialize variables
>
>
> 01132003 2203 CST
>
> I thought I was starting to get it until I got to the last section.
>
> Original code from the book:
>
> <?php
> $total = 0;
>
> echo "Your order was for the following:<br><br>";
> echo "Entree: $Course1<br>";
> echo "Dessert: $ListBox2<br><br>";
>
> foreach (array($Course1, $ListBox2) as $val)
> {
> if (ereg("[0-9]+", $val, $reg)) $total += $reg[0];
> }
> echo "TOTAL BILL = $" . $total . "<br>";
> ?>
>
> I was brave and tried to make many changes but none worked. This is
> where I ended up:
>
> <?php
> $total= 0;
>
> echo 'Your order was for the following:<br><br>';
> echo 'Entree: "' . $_POST . $Course1 . '"<br>';
> echo 'Dessert: "' . $_POST . $ListBox2 . '"<br><br>';
>
> foreach (array($Course1, $ListBox2) as $val)
> {
> if (ereg('[0-9]+', $val, $regs)) $total += $regs[0];
> }
>
> echo 'TOTAL BILL = $"' . $total . '"<br>';
> ?>
>
> The output for this last code is:
>
> Your order was for the following:
>
> Entree: Array
> Dessert: Array
>
> TOTAL BILL = $"0"
>
> Enlighten me. Im trying hard to understand where to put things together.
>
> Thanks
>
> Wade
>
>
>
>
> Sean Malloy wrote:
>
>>String concatenation?
>>
>>Its a way ogf combining strings into one.
>>
>>$string = 'Hello';
>>
>>$string = $string . ' World';
>>
>>echo $string;
>>
>>would output 'Hello World'
>>
>>-----Original Message-----
>>From: Wade [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, 14 January 2003 4:02 PM
>>To: [EMAIL PROTECTED]
>>Subject: Re: [PHP-WIN] initialize variables
>>
>>
>>01132003 2059 CST
>>
>>Sean,
>>
>>Thats a new one for me. In the line below, what does the " ' .
>>$Entrees[0] . ' "> do?
>>
>>The " . ", do they have some value or do they negate something?
>>
>> echo '<option value="' . $Entrees[0] . '">' . $Entrees[0] . '</option>';
>>
>>
>>Wade
>>
>>
>
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal
#####################################################################################
--- End Message ---
--- Begin Message ---
Wade wrote:
<?php
$total= 0;
echo 'Your order was for the following:<br><br>';
echo 'Entree: "' . $_POST . $Course1 . '"<br>';
echo 'Dessert: "' . $_POST . $ListBox2 . '"<br><br>';
foreach (array($Course1, $ListBox2) as $val)
{
if (ereg('[0-9]+', $val, $regs)) $total += $regs[0];
}
echo 'TOTAL BILL = $"' . $total . '"<br>';
?>
Your questions are well-covered by the manual, especially here:
http://www.php.net/manual/en/language.variables.external.php
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.post
http://www.php.net/manual/en/language.types.array.php
The PHP manual is very well-written and helpful for people who are used to other
programming languages. If you have no previous programming experience, I'd
suggest to go to the local library (if you have one) or a book shop and
borrow/buy a book about the basic concepts of computer programming. It will be
wortwhile and save you a lot of time in the long run.
--
Best regards,
Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.capio.com
--- End Message ---
--- Begin Message ---
i hv been using sessions on Win98 / Xitami / PHP 4.2.3 without any problem.
regds,
-----Original Message-----
From: Dash McElroy [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 13:53
To: Dean Hayes
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] PHP + Win98 Question
Dean,
What kind of problems are you encountering? I have done reasonable
testing
on Win9x and a huge amount of testing on Win2k with the only problems
relating to pathnames or special extensions (i.e. PDFLib). So far...
I have not tested session code on Win9x, but it works flawless on Win2k.
Have you by any chance verified php.ini settings? If your other site is
hosted, you may be better off checking the phpinfo() screens.
-Dash
If little else, the brain is an educational toy.
-- Tom Robbins
On Mon, 13 Jan 2003, Dean Hayes wrote:
> Can anyone please tell me why i can not use php fully under win98SE
with
> apache 1.3.24 and PHP 4.3.0 I have most of the features of PHP but i
can not
> seem to test scripts that i design that need forms or sessions. This
gets
> rather anoying as with each new script i need to test it on a remote
> computer.
>
> Thanks.
>
> Dean Hayes
> Mystical Web Designs
>
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---