Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Conversation

@tristanlins
Copy link
Contributor

PHP 5.6 seems to introduce a (maybe buggy) cookie support for SOAP clients.
We now unset cookies from the SOAP client before each request.

PHP 5.6 seems to introduce a (maybe buggy) cookie support for SOAP clients.
We now unset cookies from the SOAP client before each request.
@leofeyer
Copy link
Member

OMG! Thanks a bunch for debugging this PHP sadness (not yet there).

@leofeyer leofeyer added this to the 3.2.15 milestone Sep 19, 2014
@Tastaturberuf
Copy link
Contributor

Danke @tristanlins! Ich patch gleich manuell.

@tristanlins
Copy link
Contributor Author

@leofeyer alternative couldn't you stop using sessions in the SOAP server?

@leofeyer
Copy link
Member

I am? You still have access to the rep_server repository. Did you already check?

@tristanlins
Copy link
Contributor Author

Öhm, where was the rep_server repository gone? O.o

@leofeyer
Copy link
Member

It is now also called repository. Sorry, should have mentioned.

@tristanlins
Copy link
Contributor Author

Argh, youre absolutely right, I searched at the wrong place on github >.<

@tristanlins
Copy link
Contributor Author

Meehh this could be difficult, the service include the initialize.php which always starts a session... I don't think that this would work without greater refactoring...

@leofeyer
Copy link
Member

I have already added a session_destroy() call after the initialize.php call, but it does not solve the problem. It seems the error is thrown by Nginx, so I tend to think that the IDS on the server might be blocking the request, probably because it does not know that SOAP requests can have cookies now :)

@leofeyer
Copy link
Member

Nope, it is not the IDS.

@discordier
Copy link
Contributor

I wonder why this suddenly appeared as Cookie support has been in SOAP for a pretty long time.

It was introduced to PHP in 5.0.4 (see http://php.net/manual/de/soapclient.setcookie.php).

The must be something strange on the rep server PHP&nginx combination.

Non the less, we do not need the cookie as we do not use the session in any way in the rep server, therefore we should find a way to unset it.

@leofeyer
Copy link
Member

Although cookie support was introduces in PHP 5.0.4, the SoapClient::__getCookies() method has only been added in PHP 5.6.0. And it seems they have changed something so now it automatically send the PHP session cookie.

@leofeyer
Copy link
Member

I have also tried it on Apache level:

RequestHeader unset Cookie
Header unset Set-Cookie

Did not work either.

@leofeyer
Copy link
Member

This might shed some light on the issue: php/php-src#472 (comment) You can also see the related change set.

@leofeyer
Copy link
Member

Here is the log entry from the server:

2014/09/19 19:59:45 [info] 8598#0: *1126 client sent invalid header line: "Cookie: PHPSESSID^@=50qksj9lfjgq8bbmk1uju80mr2;^M
^M
^_<8b>^H^@^@^@^@^@^D^C<95><92>]KÃ0^T<86>ï÷óM×<83>ñË<83><8c>ÇãôÕäê^K)TÖ<94>Ô^B^@^^A^@<94>­WI(ÄÚ^YØlH¯r<8e><85>Ì?W<97>ä<8a>¦ah5iæw°Ä|?fãbé/<97>ò<82>¿<85>»jîÑ$<85>9!^HåÛú²^GY)^Kä)ÐÒ]^F^CU^]^N^D^V^D^T¬Æñ<95>:<8e>+U¹û     ^F^[0<80>¡^B<88>ï¢0^_^F^CU^]#^D^X0^V^\0^Z<82>^L*.contao.org<82>
contao.org0<82>^AV^F^CU^] ^D<82>^AM0<82>^AI0^H^F^Fg<

@leofeyer
Copy link
Member

So obviously, PHP 5.6.0 is appending stuff to the header line?

@discordier
Copy link
Contributor

Yes it is, see my comment at: #7280 (comment)

I wrote down my findings.
Additionally I comitted a new patch to repository server which hopefully fixes this bug.

@tristanlins
Copy link
Contributor Author

@leofeyer omg, I would recommend to close this PR, because this is a PHP 5.6.0 specific bug?!

@leofeyer leofeyer closed this Sep 20, 2014
@leofeyer leofeyer removed this from the 3.2.15 milestone Sep 20, 2014
@leofeyer leofeyer removed the defect label Sep 20, 2014
@tristanlins tristanlins deleted the hotfix/#7280 branch September 21, 2014 07:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants