php-windows Digest 10 Sep 2002 03:44:02 -0000 Issue 1331
Topics (messages 15725 through 15737):
Re: GET / POST
15725 by: yasin inat
argc and argv doesn't work!
15726 by: Christian Pichler
15727 by: Scott Carr
Re: . becomes _ when submitting page
15728 by: Kjell Hansen
15729 by: Scott Carr
15730 by: David Hollister
15731 by: Kjell Hansen
15733 by: Kjell Hansen
15734 by: Scott Carr
Problem with PHP on IIS
15732 by: CK Yang
mail() --> "failed to recieve" error
15735 by: Court Shrock
15736 by: Court Shrock
Intermittent Parse Error
15737 by: Michael Baron
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 ---
try to modify your php.ini
where :
variables_order = "EGPCS"
change it to :
variables_order = "GPCS"
it will be useful when u were request a get/post var by
using simple variable name .... but disadvantage is :
if u use that script in www or real web server
uu should check up ur server's php configration from the
phpinfo file...( u know that file phpinfo() ..... u'll see
that order ....
if it was EGPCS u should use HTTP_POST_VARS or the
others...
--- End Message ---
--- Begin Message ---
Hey there,
We would like to use the variables argc and argv. The problem is that argc
always has the value 1, whether we pass no, one, two or more parameters. And
in the array argv there is only the name of the program.
We are working on a computer with Windows 2000 and a local installation of
PHP on it. The global variable register_argc_argv is set to Local Value: ON
and Master Value: ON. We've tried it with PHP 4.0.6 and PHP 4.2.3.
Here's the source and the output of the test program:
program source (test1.php):
===========================
<?php
echo "Commandline - Parameter\n\n";
$x = $argc;
print("Result (value of argc): $x\n");
?>
command line:
=============
case 1 (without parameters) - OK:
---------------------------------
C:\>test1.php
X-Powered-By: PHP/4.0.6
Content-type: text/html
Commandline - Parameter
Result (value of argc): 1
case 2 (with 2 parameters) - NOT OK:
------------------------------------
C:\>test1.php param1 param2
X-Powered-By: PHP/4.0.6
Content-type: text/html
Commandline - Parameter
Result (value of argc): 1
Does anyone know why this doesn't work? Or what the problem is?
Thanks in advance!
Michael and Christian
--- End Message ---
--- Begin Message ---
Use php-cli.exe.
If you can't, check your php.ini file. argv and argc are usually turned off in
the ini file.
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
Quoting Christian Pichler <[EMAIL PROTECTED]>:
> Hey there,
>
> We would like to use the variables argc and argv. The problem is that argc
> always has the value 1, whether we pass no, one, two or more parameters. And
> in the array argv there is only the name of the program.
>
> We are working on a computer with Windows 2000 and a local installation of
> PHP on it. The global variable register_argc_argv is set to Local Value: ON
> and Master Value: ON. We've tried it with PHP 4.0.6 and PHP 4.2.3.
>
> Here's the source and the output of the test program:
>
> program source (test1.php):
> ===========================
>
> <?php
>
> echo "Commandline - Parameter\n\n";
> $x = $argc;
> print("Result (value of argc): $x\n");
>
> ?>
>
>
> command line:
> =============
>
> case 1 (without parameters) - OK:
> ---------------------------------
>
> C:\>test1.php
> X-Powered-By: PHP/4.0.6
> Content-type: text/html
>
> Commandline - Parameter
>
> Result (value of argc): 1
>
>
>
> case 2 (with 2 parameters) - NOT OK:
> ------------------------------------
>
> C:\>test1.php param1 param2
> X-Powered-By: PHP/4.0.6
> Content-type: text/html
>
> Commandline - Parameter
>
> Result (value of argc): 1
>
>
> Does anyone know why this doesn't work? Or what the problem is?
> Thanks in advance!
>
> Michael and Christian
>
> --
> 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 ---
Hmmm, I guess you're right. But I have some vague memories from useing dots
in name attributes before. But that was with ASP & IIS...
I have some excuse for using dots, it's Windows filenames. They come with
dots and I can't change the attribute names because it's refering to the
file. I guess I will have to go around it with hidden fields and indexes...
Too bad, it was such a brilliant solution with the filename in the name
attribute
:(
Anyway, thanx for enlightning me!
Regards
Kjell
Ignatius Reilly wrote:
> Your naming conflicts with javascript. Remember what dots are used for in
> js.
>
> Avoid using other characters than alphanum and underscore. There is no
> reason you should need to use any other character.
>
> I am not quite even sure that it is valid HTML to use dots in attributes
> values.
>
> HTH
>
> Ignatius
>
> ____________________________________________
> ----- Original Message -----
> From: "Kjell Hansen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, September 08, 2002 7:12 PM
> Subject: [PHP-WIN] . becomes _ when submitting page
>
> > Hi,
> > In my HTML page I have a textarea called "filename.ext" when I submit
> > the page I get "filename_ext" in my $_POST array.
> >
> > Anyone know why?!??!?
> >
> > TIA
> > Kjell
> >
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
--- End Message ---
--- Begin Message ---
You can still do so.
Just reverse the string. Replace the first occurance of "_" with ".".
Re-reverse the string.
Now you have a Filename.
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
Quoting Kjell Hansen <[EMAIL PROTECTED]>:
> Hmmm, I guess you're right. But I have some vague memories from useing dots
> in name attributes before. But that was with ASP & IIS...
>
> I have some excuse for using dots, it's Windows filenames. They come with
> dots and I can't change the attribute names because it's refering to the
> file. I guess I will have to go around it with hidden fields and indexes...
> Too bad, it was such a brilliant solution with the filename in the name
> attribute
> :(
>
> Anyway, thanx for enlightning me!
>
> Regards
> Kjell
>
> Ignatius Reilly wrote:
>
> > Your naming conflicts with javascript. Remember what dots are used for in
> > js.
> >
> > Avoid using other characters than alphanum and underscore. There is no
> > reason you should need to use any other character.
> >
> > I am not quite even sure that it is valid HTML to use dots in attributes
> > values.
> >
> > HTH
> >
> > Ignatius
> >
> > ____________________________________________
> > ----- Original Message -----
> > From: "Kjell Hansen" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, September 08, 2002 7:12 PM
> > Subject: [PHP-WIN] . becomes _ when submitting page
> >
> > > Hi,
> > > In my HTML page I have a textarea called "filename.ext" when I submit
> > > the page I get "filename_ext" in my $_POST array.
> > >
> > > Anyone know why?!??!?
> > >
> > > TIA
> > > Kjell
> > >
> > >
> > >
> > >
> > > --
> > > 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
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
If we are talking about a simple post, I don't see the issue. In the
following code (as gobots.php), I can type in period characters all day long
and it always returns just fine. What the heck are you guys talking about?
<?php
if (isset($textguy))
{
echo $textguy;
}
echo ' <form method="POST" action="gobots.php">
<input type="text" name="textguy" size="20"><input type="submit"
value="Submit" name="B1">
<input type="reset" value="Reset" name="B2">
</form> ' ;
?>
-----Original Message-----
From: Scott Carr [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 09, 2002 1:39 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] . becomes _ when submitting page
You can still do so.
Just reverse the string. Replace the first occurance of "_" with ".".
Re-reverse the string.
Now you have a Filename.
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
Quoting Kjell Hansen <[EMAIL PROTECTED]>:
> Hmmm, I guess you're right. But I have some vague memories from useing
dots
> in name attributes before. But that was with ASP & IIS...
>
> I have some excuse for using dots, it's Windows filenames. They come with
> dots and I can't change the attribute names because it's refering to the
> file. I guess I will have to go around it with hidden fields and
indexes...
> Too bad, it was such a brilliant solution with the filename in the name
> attribute
> :(
>
> Anyway, thanx for enlightning me!
>
> Regards
> Kjell
>
> Ignatius Reilly wrote:
>
> > Your naming conflicts with javascript. Remember what dots are used for
in
> > js.
> >
> > Avoid using other characters than alphanum and underscore. There is no
> > reason you should need to use any other character.
> >
> > I am not quite even sure that it is valid HTML to use dots in attributes
> > values.
> >
> > HTH
> >
> > Ignatius
> >
> > ____________________________________________
> > ----- Original Message -----
> > From: "Kjell Hansen" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, September 08, 2002 7:12 PM
> > Subject: [PHP-WIN] . becomes _ when submitting page
> >
> > > Hi,
> > > In my HTML page I have a textarea called "filename.ext" when I submit
> > > the page I get "filename_ext" in my $_POST array.
> > >
> > > Anyone know why?!??!?
> > >
> > > TIA
> > > Kjell
> > >
> > >
> > >
> > >
> > > --
> > > 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
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Sure Scott,
so can I. The problem is when you have a filename like "My_Wife_and_I_at_sea.jpg"
or "Me.And.Jen.jpg" or "Jen_and_Pete.gif"
How can I be sure of what _ to change into . ?
/Kjell
Scott Carr wrote:
> You can still do so.
>
> Just reverse the string. Replace the first occurance of "_" with ".".
> Re-reverse the string.
>
> Now you have a Filename.
> --
> Scott Carr
> OpenOffice.org
> Documentation Maintainer
> http://documentation.openoffice.org/
>
> Quoting Kjell Hansen <[EMAIL PROTECTED]>:
>
> > Hmmm, I guess you're right. But I have some vague memories from useing dots
> > in name attributes before. But that was with ASP & IIS...
> >
> > I have some excuse for using dots, it's Windows filenames. They come with
> > dots and I can't change the attribute names because it's refering to the
> > file. I guess I will have to go around it with hidden fields and indexes...
> > Too bad, it was such a brilliant solution with the filename in the name
> > attribute
> > :(
> >
> > Anyway, thanx for enlightning me!
> >
> > Regards
> > Kjell
> >
> > Ignatius Reilly wrote:
> >
> > > Your naming conflicts with javascript. Remember what dots are used for in
> > > js.
> > >
> > > Avoid using other characters than alphanum and underscore. There is no
> > > reason you should need to use any other character.
> > >
> > > I am not quite even sure that it is valid HTML to use dots in attributes
> > > values.
> > >
> > > HTH
> > >
> > > Ignatius
> > >
> > > ____________________________________________
> > > ----- Original Message -----
> > > From: "Kjell Hansen" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Sunday, September 08, 2002 7:12 PM
> > > Subject: [PHP-WIN] . becomes _ when submitting page
> > >
> > > > Hi,
> > > > In my HTML page I have a textarea called "filename.ext" when I submit
> > > > the page I get "filename_ext" in my $_POST array.
> > > >
> > > > Anyone know why?!??!?
> > > >
> > > > TIA
> > > > Kjell
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > 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
> >
> >
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
Well David,
it's about having dots in the attribute names
<input type="text" name="textguy.gif" size="20">
That's when things get goofed up.
SeaU
/Kjell
----- Original Message -----
From: "David Hollister" <[EMAIL PROTECTED]>
To: "'Kjell Hansen'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, September 09, 2002 9:59 PM
Subject: RE: [PHP-WIN] . becomes _ when submitting page
> If we are talking about a simple post, I don't see the issue. In the
> following code (as gobots.php), I can type in period characters all day long
> and it always returns just fine. What the heck are you guys talking about?
>
>
> <?php
>
> if (isset($textguy))
> {
> echo $textguy;
> }
> echo ' <form method="POST" action="gobots.php">
> <input type="text" name="textguy" size="20"><input type="submit"
> value="Submit" name="B1">
> <input type="reset" value="Reset" name="B2">
> </form> ' ;
> ?>
>
>
>
> -----Original Message-----
> From: Scott Carr [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 09, 2002 1:39 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] . becomes _ when submitting page
>
> You can still do so.
>
> Just reverse the string. Replace the first occurance of "_" with ".".
> Re-reverse the string.
>
> Now you have a Filename.
> --
> Scott Carr
> OpenOffice.org
> Documentation Maintainer
> http://documentation.openoffice.org/
>
>
> Quoting Kjell Hansen <[EMAIL PROTECTED]>:
>
> > Hmmm, I guess you're right. But I have some vague memories from useing
> dots
> > in name attributes before. But that was with ASP & IIS...
> >
> > I have some excuse for using dots, it's Windows filenames. They come with
> > dots and I can't change the attribute names because it's refering to the
> > file. I guess I will have to go around it with hidden fields and
> indexes...
> > Too bad, it was such a brilliant solution with the filename in the name
> > attribute
> > :(
> >
> > Anyway, thanx for enlightning me!
> >
> > Regards
> > Kjell
> >
> > Ignatius Reilly wrote:
> >
> > > Your naming conflicts with javascript. Remember what dots are used for
> in
> > > js.
> > >
> > > Avoid using other characters than alphanum and underscore. There is no
> > > reason you should need to use any other character.
> > >
> > > I am not quite even sure that it is valid HTML to use dots in attributes
> > > values.
> > >
> > > HTH
> > >
> > > Ignatius
> > >
> > > ____________________________________________
> > > ----- Original Message -----
> > > From: "Kjell Hansen" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Sunday, September 08, 2002 7:12 PM
> > > Subject: [PHP-WIN] . becomes _ when submitting page
> > >
> > > > Hi,
> > > > In my HTML page I have a textarea called "filename.ext" when I submit
> > > > the page I get "filename_ext" in my $_POST array.
> > > >
> > > > Anyone know why?!??!?
> > > >
> > > > TIA
> > > > Kjell
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > 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
> >
> >
>
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
That's the reason I said reverse the string and replace the first occurance.
The only time it would be a problem is if they did not put an Extension.
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
Quoting Kjell Hansen <[EMAIL PROTECTED]>:
> Sure Scott,
> so can I. The problem is when you have a filename like
> "My_Wife_and_I_at_sea.jpg"
> or "Me.And.Jen.jpg" or "Jen_and_Pete.gif"
>
> How can I be sure of what _ to change into . ?
>
> /Kjell
>
>
> Scott Carr wrote:
>
> > You can still do so.
> >
> > Just reverse the string. Replace the first occurance of "_" with ".".
> > Re-reverse the string.
> >
> > Now you have a Filename.
> > --
> > Scott Carr
> > OpenOffice.org
> > Documentation Maintainer
> > http://documentation.openoffice.org/
> >
> > Quoting Kjell Hansen <[EMAIL PROTECTED]>:
> >
> > > Hmmm, I guess you're right. But I have some vague memories from useing
> dots
> > > in name attributes before. But that was with ASP & IIS...
> > >
> > > I have some excuse for using dots, it's Windows filenames. They come
> with
> > > dots and I can't change the attribute names because it's refering to the
> > > file. I guess I will have to go around it with hidden fields and
> indexes...
> > > Too bad, it was such a brilliant solution with the filename in the name
> > > attribute
> > > :(
> > >
> > > Anyway, thanx for enlightning me!
> > >
> > > Regards
> > > Kjell
> > >
> > > Ignatius Reilly wrote:
> > >
> > > > Your naming conflicts with javascript. Remember what dots are used for
> in
> > > > js.
> > > >
> > > > Avoid using other characters than alphanum and underscore. There is no
> > > > reason you should need to use any other character.
> > > >
> > > > I am not quite even sure that it is valid HTML to use dots in
> attributes
> > > > values.
> > > >
> > > > HTH
> > > >
> > > > Ignatius
> > > >
> > > > ____________________________________________
> > > > ----- Original Message -----
> > > > From: "Kjell Hansen" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Sunday, September 08, 2002 7:12 PM
> > > > Subject: [PHP-WIN] . becomes _ when submitting page
> > > >
> > > > > Hi,
> > > > > In my HTML page I have a textarea called "filename.ext" when I
> submit
> > > > > the page I get "filename_ext" in my $_POST array.
> > > > >
> > > > > Anyone know why?!??!?
> > > > >
> > > > > TIA
> > > > > Kjell
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > 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
> > >
> > >
> >
> > -------------------------------------------------
> > This mail sent through IMP: http://horde.org/imp/
>
>
> --
> 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 ---
I run winxp using IIS 5.1 server, i installed the php binary and got it to
work with the test script , however when i downloaded a script off the
internet to try it can't write any files.
I went on to try and give the write access to the specifying directories
still nothing, i also changed the NTFS file permissions, maybe i'm doing it
wrong or something like that.
can someone tell me what i must do to get php to work properly?
thx
p.s. i tried that script on one of the free servers that supported php and
it worked fine there.
--- End Message ---
--- Begin Message ---
When trying to (and nothing more):
<?php
mail('[EMAIL PROTECTED]', 'Subject', 'Body');
?>
getting the message "Failed to receive: in path_the_file_being_run".
Tried php v4.1.2 and 4.2.3 with the same results.
The box is Win2k server and IIS5. A SMTP relay is listening on
localhost. The php.ini settings are set to point to 'localhost' (a
valid email address is set in sendmail_from). Testing the MTA by itself
works properly.
http://bugs.php.net hint that is was fixed in CVS back in 2000. Any
ideas?
--- End Message ---
--- Begin Message ---
Sorry to bother everyone...found the cause....SMTP on IIS5 doesn't bind
to 127.0.0.1 by default. Changed php.ini to use the ip address of its
interface and the everything worked. Found this out by putting the same
script on a different server, but pointing smtp to the original server.
On Mon, 2002-09-09 at 12:43, Court Shrock wrote:
> When trying to (and nothing more):
>
> <?php
> mail('[EMAIL PROTECTED]', 'Subject', 'Body');
> ?>
>
> getting the message "Failed to receive: in path_the_file_being_run".
>
>
> Tried php v4.1.2 and 4.2.3 with the same results.
>
>
> The box is Win2k server and IIS5. A SMTP relay is listening on
> localhost. The php.ini settings are set to point to 'localhost' (a
> valid email address is set in sendmail_from). Testing the MTA by itself
> works properly.
>
> http://bugs.php.net hint that is was fixed in CVS back in 2000. Any
> ideas?
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I am running Apache 1.3.6 PHP 4.2.2 in Module mode on windows 2000. I
just migrated this particular site from Slackware (Same Apache and php).
I now get intermittent parse errors in random include files. It is as
if during some of my user's requests, either the machine is not fast
enough to parse the file or there is some lock on the file or something.
Has anyone seen this before?
Thanks.
--- End Message ---