Re: Fwd: php-windows Digest 25 Jun 2008 00:22:47 -0000 Issue 3494

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Sandeep,

Yes I am using exit.

The strange thing is if webserver is apache and the web browser is IE it still works.

Problem is only IE / PHP/ IIS combination.

Sukhwinder Singh

----- Original Message ----- From: "sandeep khokher" <sandeepkhokher@xxxxxxxxx>
To: <php-windows@xxxxxxxxxxxxx>
Sent: Wednesday, June 25, 2008 6:33 AM
Subject: Fwd: php-windows Digest 25 Jun 2008 00:22:47 -0000 Issue 3494


hi sukhwinder

r u using "exit" after  header. use exit after redirecting.
there might be chance that will solve a problem bcz i have already heard abt
this kind of problem with IE.

---------- Forwarded message ----------
From: <php-windows-digest-help@xxxxxxxxxxxxx>
Date: Wed, Jun 25, 2008 at 12:22 PM
Subject: php-windows Digest 25 Jun 2008 00:22:47 -0000 Issue 3494
To: php-windows@xxxxxxxxxxxxx



php-windows Digest 25 Jun 2008 00:22:47 -0000 Issue 3494

Topics (messages 28960 through 28963):

Re: PHP Mail 501 error
      28960 by: Dan Mashal
      28961 by: Niel Archer
      28963 by: Dan Mashal

IE/ IIS / PHP - Form posted twice in case of redirection
      28962 by: Sukhwinder Singh

Administrivia:

To subscribe to the digest, e-mail:
      php-windows-digest-subscribe@xxxxxxxxxxxxx

To unsubscribe from the digest, e-mail:
      php-windows-digest-unsubscribe@xxxxxxxxxxxxx

To post to the list, e-mail:
      php-windows@xxxxxxxxxxxxx


----------------------------------------------------------------------


---------- Forwarded message ----------
From: "Dan Mashal" <dmashal@xxxxxxxxxxxxxx>
To: "Brereton, Stephen" <Stephen.Brereton@xxxxxxxxxxx>, <
php-windows@xxxxxxxxxxxxx>
Date: Tue, 24 Jun 2008 10:05:07 -0700
Subject: RE:  PHP Mail 501 error
OK but why is PHP mail doing this and how do I get IIS to accept the
message? Is there anything in the PHP.ini I can add/change to fix this?
It works fine with Unix mail servers.

Dan

-----Original Message-----
From: Brereton, Stephen [mailto:Stephen.Brereton@xxxxxxxxxxx]
Sent: Tuesday, June 24, 2008 3:54 AM
To: Dan Mashal; php-windows@xxxxxxxxxxxxx
Subject: RE:  PHP Mail 501 error


Just a thought, and may be wrong, but as RCPT TO in rfc 2821
(http://www.rfc-editor.org/rfc/rfc2821.txt)
Only one layer of backets is used?

-----Original Message-----
From: Dan Mashal [mailto:dmashal@xxxxxxxxxxxxxx]

Sent: 23 June 2008 19:42
To: php-windows@xxxxxxxxxxxxx
Subject:  PHP Mail 501 error


Hello,




We are running MediaWiki on PHP 5.2.6 with Apache for Windows.




Every time we try to use an IIS mail server as an MTA we receive a 501
error. When we use a Unix postfix based MTA it works fine.





Could anyone please tell me what I need to do to modify my PHP.ini to
get this to work?




We have tried the workaround for Exchange 2003 as described in this
article by Microsoft:




http://support.microsoft.com/?id=291828




But this fixes a 501 in the HELO.  The problem here is the rcpt to. It
comes up as the following:




2008-06-23 17:39:58 10.1.100.80 xxx SMTPSVC1 xxxx xxxxxxxx 0 RCPT -
+TO:<DanMashal+<dmashal@xxxxxxxxxxxxxx>> 501 0 27 44 0 SMTP - - - -




Could anyone please provide me with some much needed insight on this
problem? I have been searching the web and have found a few workarounds
but none that actually work.




Thanks,

Dan


* * * * * * * * * * * *

Help protect the environment - please don't print this email unless you
really need to.
* * * * * * * * * * * *

This communication is from City of York Council.

The information contained within, and in any attachment(s), is
confidential and legally privileged. It is for the exclusive use of the
intended recipient(s). If you are not the intended recipient(s), please
note that any form of distribution, copying or use of this
communication, or the information within, is strictly prohibited and may
be unlawful. Equally, you must not disclose all, or part, of its
contents to any other person.

If you have received this communication in error, please return it
immediately to the sender, then delete and destroy any copies of it.

City of York Council disclaims any liability for action taken in
reliance on the content of this communication.



---------- Forwarded message ----------
From: Niel Archer <not@xxxxxxxxxx>
To: php-windows@xxxxxxxxxxxxx
Date: Tue, 24 Jun 2008 21:01:21 +0100
Subject: Re:  PHP Mail 501 error
Hello,



We are running MediaWiki on PHP 5.2.6 with Apache for Windows.



Every time we try to use an IIS mail server as an MTA we receive a 501
error. When we use a Unix postfix based MTA it works fine.



Could anyone please tell me what I need to do to modify my PHP.ini to
get this to work?



We have tried the workaround for Exchange 2003 as described in this
article by Microsoft:

Hi

http://support.microsoft.com/?id=291828



But this fixes a 501 in the HELO.  The problem here is the rcpt to. It
comes up as the following:



 2008-06-23 17:39:58 10.1.100.80 xxx SMTPSVC1 xxxx xxxxxxxx 0 RCPT -
+TO:<DanMashal+<dmashal@xxxxxxxxxxxxxx>> 501 0 27 44 0 SMTP - - - -

Could anyone please provide me with some much needed insight on this
problem? I have been searching the web and have found a few workarounds
but none that actually work.


From the mail() documentation:
Note: The Windows implementation of mail() differs in many ways from the
Unix implementation. First, it doesn't use a local binary for composing
messages but only operates on direct sockets which means a MTA is needed
listening on a network socket (which can either on the localhost or a
remote machine).  Second, the custom headers like From:, Cc:, Bcc: and
Date: are not interpreted by the MTA in the first place, but are parsed
by PHP.  As such, the to parameter should not be an address in the form
of "Something <someone@xxxxxxxxxxx>". The mail command may not parse
this properly while talking with the MTA.

From the example you show, it seems your problem is the last two
sentences.  i.e. "DanMashal <dmashal@xxxxxxxxxxxxxx>" is not valid on
windows.

HTH

--
Niel Archer




---------- Forwarded message ----------
From: "Dan Mashal" <dmashal@xxxxxxxxxxxxxx>
To: <php-windows@xxxxxxxxxxxxx>
Date: Tue, 24 Jun 2008 17:22:41 -0700
Subject: RE:  PHP Mail 501 error
That is correct Neil. The second you try to add a display name to the
RCPT command it fails. I think windows only accepts a display name in
the DATA field. I'm thinking this is a Mediawiki problem at this point..
not a PHP problem.

Dan

-----Original Message-----
From: Niel Archer [mailto:not@xxxxxxxxxx]
Sent: Tuesday, June 24, 2008 1:01 PM
To: php-windows@xxxxxxxxxxxxx
Subject: Re:  PHP Mail 501 error

Hello,



We are running MediaWiki on PHP 5.2.6 with Apache for Windows.



Every time we try to use an IIS mail server as an MTA we receive a 501
error. When we use a Unix postfix based MTA it works fine.



Could anyone please tell me what I need to do to modify my PHP.ini to
get this to work?



We have tried the workaround for Exchange 2003 as described in this
article by Microsoft:

Hi

http://support.microsoft.com/?id=291828



But this fixes a 501 in the HELO.  The problem here is the rcpt to. It
comes up as the following:



 2008-06-23 17:39:58 10.1.100.80 xxx SMTPSVC1 xxxx xxxxxxxx 0 RCPT -
+TO:<DanMashal+<dmashal@xxxxxxxxxxxxxx>> 501 0 27 44 0 SMTP - - - -

Could anyone please provide me with some much needed insight on this
problem? I have been searching the web and have found a few
workarounds
but none that actually work.


From the mail() documentation:
Note: The Windows implementation of mail() differs in many ways from the
Unix implementation. First, it doesn't use a local binary for composing
messages but only operates on direct sockets which means a MTA is needed
listening on a network socket (which can either on the localhost or a
remote machine).  Second, the custom headers like From:, Cc:, Bcc: and
Date: are not interpreted by the MTA in the first place, but are parsed
by PHP.  As such, the to parameter should not be an address in the form
of "Something <someone@xxxxxxxxxxx>". The mail command may not parse
this properly while talking with the MTA.

From the example you show, it seems your problem is the last two
sentences.  i.e. "DanMashal <dmashal@xxxxxxxxxxxxxx>" is not valid on
windows.

HTH

--
Niel Archer



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




---------- Forwarded message ----------
From: "Sukhwinder Singh" <ssruprai@xxxxxxxxxxx>
To: <php-windows@xxxxxxxxxxxxx>
Date: Wed, 25 Jun 2008 04:09:50 +0530
Subject: IE/ IIS / PHP - Form posted twice in case of redirection
I am facing a strange problem of IE double posting in case of self post. PHP
5.2.6 / IIS 5.1 on windows XP.

Before starting I must tell you that:

It works with firefox, Apache / PHP combination.

It works with IE / Apache / PHP combination

But it DOES NOT work with  IE/PHP/ IIS


This is the case with all IE versions and it happens on even the windows
2003 server.

I have a form with just one field which uploads a single file and posts back
to same PHP file. The file is a csv file and it is properly read and
inserted into database. After it is successfully inserted I issue a redirect
to some other page using header("Location:users.php").
And when I see the records in database, they inserted twice. If I don't do
the redirect to some other page And display the message on the same page
that everything is all right then records are inserted only once.

It doesn't matter to what page I redirect to or if I attach any query string
or not. It is just that header("Location:any_url") causes IE to submit the
form TWICE. Not more than twice. I have checked the IIS logs and confirmed
that form is actually getting submitted twice.

21:16:31 127.0.0.1 POST /xxx/import.php 303
21:16:31 127.0.0.1 POST /xxx/import.php 303
21:16:31 127.0.0.1 GET /xxx/users.php 200
21:16:31 127.0.0.1 GET /xxx/users.php 200

Actual path it takes to import the users is this:

users.php has a link to import.php. import php first displays a form for
uploading and then posts to itself. After the files is properly uploaded and
inserted into database I return the user to users.php again using that
Location header. So there is no way that there is any kind of looping or
something.



Just to check if it is IE which has any problem with PHP header I upgraded
IE to version 7. Now when I post the form rather than posting it twice IE
just displays a message "Internet Explorer cannot display the webpage" and
records are into database only once.

I am not sure if it is IIS, PHP or IE Problem.

This is not the first time I have experienced this. I had earlier faced the
same problem but I thought I should just switch to Apache rather than use
IIS for development. But now the problem is that production server is
Windows 2003 server with IIS. (The version of PHP IIS or windows shouldn't
not matter though)


Thanks,

Sukhwinder Singh




--
Regards
Sandeep Khokher



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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux