Commit Graph

223 Commits

Author SHA1 Message Date
Jeremy Mikkola
79c2337705 THRIFT-4845: Stop ignoring small timeouts
Client: php

CURLOPT_TIMEOUT requires a long [0], so it seems that small values
like 0.2 are being rounded to 0, resulting in a lack of any timeout.

This change uses CURLOPT_TIMEOUT_MS, which the PHP documentation
says was "added in cURL 7.16.2. Available since PHP 5.2.3."

[0] https://curl.haxx.se/libcurl/c/CURLOPT_TIMEOUT.html
2019-05-14 06:15:48 -04:00
Josip Sokcevic
a4ee1f281b THRIFT-4807: Fix php segfault on reference pass
Client: php (extension)

When reference is passed to php extension, it's unreferenced (instead of
derefrenced). The next time one tries to use the same variable PHP
segaults. Even if not used again, php segfaults on
user_shutdown_function_call.
2019-02-22 06:21:28 -05:00
James E. King III
b96c43892a THRIFT-4717: fix up make clean with autoconf 2019-01-25 23:33:54 -05:00
Florian Lonqueu-Brochard
22749ac376 THRIFT-4751: Missing imports in TProtocol (phpdoc related only)
Client: php
2019-01-24 07:57:20 -05:00
cyy
0f43f95b89 revert noexcept changings 2019-01-07 08:11:37 -05:00
cyy
316723add4 remove stdcxx namespace and use std directly 2019-01-07 08:11:37 -05:00
James E. King III
9b75e4fe74 THRIFT-4680: fix up std::min, std::max, and numeric limits min/max on Windows; remove NOMINMAX from cmake build 2018-12-18 10:17:57 -05:00
Josip Sokcevic
30d3125cc2 THRIFT-4656: Fix infinite loop in PHP TCurlClient
Infinite loop happens when response body is empty and HTTP status is
200. This patch fixes it.
2018-12-05 16:07:09 -05:00
Efimov Evgenij
7f0fa6c21e THRIFT-4674 Added stream context support for PHP THttpClient 2018-11-27 22:19:24 -05:00
James E. King III
f7d43ce0aa fix build errors related to updated static code analysis tools for python and php 2018-11-06 12:20:52 -05:00
James Johnston
4a983069a6 THRIFT-4645: TCurlClient: include failure reason in exception
When curl_exec fails, more detailed failure information is available
by calling curl_error.  Include this error information in the message in
the thrown TTransportException.

Also change the comparison of the return value of curl_exec to
explicitly check for boolean false, so as to distinguish from an empty
response body (per the PHP documentation on this subject).
2018-10-03 15:12:26 -04:00
Josip Sokcevic
ce70ba20c9 THRIFT-4641: Check HTTP Status Code in TCurlClient 2018-09-21 13:27:15 -04:00
Josip Sokcevic
cc935b5554 THRIFT-4373: Derefer PHP zval _TSPEC (#1401)
Client: php
2018-04-09 08:47:47 -04:00
Robert Lu
68707d9219
THRIFT-4474: Use PSR-4 autoloader by default
Client: php

This closes #1479
2018-03-15 11:05:30 +01:00
James E. King III
14991f9041 THRIFT-4354: fix php socket blocking behavior
Patch: Robert Lu <robberphex@gmail.com>
Client: php

This closes #1384
2018-03-06 09:53:21 -05:00
Robert Lu
2471efab00 THRIFT-4477: php TBufferedTransport must have underlying transport
Client: php

This closes #1484
2018-01-30 07:49:20 -05:00
Robert Lu
12f124c19a THRIFT-4475: PSR-2 support for lib/php/test
Client: php

This closes #1482
2018-01-29 15:44:43 -05:00
Robert Lu
b03ca01cc9 THRIFT-4460: Use PSR-2 as php library coding standard
Client: php

This closes #1472
2018-01-24 00:07:54 -05:00
Robert Lu
bfba370bf1 THRIFT-4459: reduce php library directory depth
Client: php

This closes #1471
2018-01-16 09:22:42 -05:00
Robert Lu
a15060acd8 THRIFT-4423: migrate to psr-4
Client: php

This closes #1445
2018-01-11 09:37:37 -05:00
Robert Lu
e54945551f add stdc++ back for php extension build
Client: php

This closes #1400
2017-10-26 12:02:20 -04:00
Robert Lu
9dff0efc1e THRIFT-4356: fix segment fault for thrift_protocol
NOTE: drops php5 support for PHP extension (thrift_protocol)
however library still can support PHP5 as evidenced by CI build
Client: php

This closes #1385
This closes #1391
2017-10-25 08:57:04 -04:00
董菲
1df2d9b801 THRIFT-4353: support php ext read data after message begin
Client: php

This closes #1383
2017-10-25 08:56:40 -04:00
Thomas Petazzoni
1744cdcb67 configure.ac, Makefile.am: introduce THRIFT variable to support cross-compilation
The thrift build system currently assumes that the thrift compiler is
always available in $(top_builddir)/compiler/cpp/thrift. However, in a
cross-compilation context, this location contains the thrift compiler
built for the target... which obviously will not run on the build
machine.

In order to support such cross-compilation situation, we introduce the
THRIFT variable as a an argument for the configure script (using
AC_ARG_VAR). If not specified, it defaults to the existing value of
using compiler/cpp/thrift from the build directory, but it can be
overridden when calling ./configure.

Note that $(top_builddir) cannot be used within the configure script,
so we simply use `pwd`, which is the same as the top_builddir.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This closes #1336
This closes #1350
2017-09-09 07:50:54 -07:00
James E. King, III
d7142b7e4f THRIFT-4295: rework the docker build images, updating them and tuning the travis builds
This closes #1340
2017-09-04 18:09:34 -07:00
Roy Sindre Norangshol
ec64f23d23 THRIFT-4263: Fix use after free bug for thrown exceptions
Client: php

Exceptions thrown through PHPExceptionWrapper are prematurely freed at the end
of the catch block, even though zend_throw_exception_object expects to take
ownership of the value.

Ensure we free return_value in case of exceptions

Patch: Håkon Hitland <hakon.hitland@zedge.net>
Patch: Roy Sindre Norangshol <norangshol@zedge.net>

This closes #1314
2017-08-12 20:11:26 -07:00
Klaus Trainer
48ea3cde08 THRIFT-4218: Set TCP_NODELAY for PHP client socket
Client: PHP
Patch: Klaus Trainer

This closes #1283
2017-06-06 13:59:53 +02:00
James E. King, III
c6ded922c5 THRIFT-4154: properly close socket whether it is persistent or not on close()
Client: php

This closes #1011
This closes #1233
2017-04-01 23:26:54 -04:00
kufd
1360270eb8 THRIFT-4126: implement required fields validation in php extension when validate compiler option is enabled
Client: php

This closes #1215
2017-03-30 16:42:11 -04:00
Håkon Hitland
e66b8fcde3 THRIFT-3984 PHP7 extension causes segfault
The PHP 7 extension can sometimes free strings it does not own,
when serializing string map keys, or the name of called methods.
The latter case was somewhat migitated since the double-free has no
effect on interned strings.
Using ZVAL_STR_COPY instead of ZVAL_STR will increment the reference
count, making the following destructor call correct.

Fix memory leak in PHP 7

Fix memory leak when deserializing maps or sets.
zend_hash_update will add its own reference to the key, so we need to
destruct the key zval to not leak.
We don't need to destruct the value, the hash table will take ownership
of it.

This closes #1152
2017-02-23 11:43:45 -05:00
Swati Kumar
3590f1e7ca THRIFT-4072 php: TCurlClient - Add the possibility to send custom headers
Client: php

This closes #1178
2017-02-09 15:12:47 -05:00
James E. King, III
3a8bbbd4a6 THRIFT-3896 fix map type with string key can not access deserialized by php extension
Client: php
Patch: feidong@anjuke.com

This closes #1062
2017-02-06 12:57:21 -05:00
Håkon H. Hitland
2a89bd94ac THRIFT-3977 PHP extension creates undefined values when deserializing sets
Client: PHP
Patch: Håkon H. Hitland <haakon@likedan.net>

This closes #1133
2016-11-17 21:36:06 +01:00
Håkon Hitland
b7a213c818 THRIFT-3348 PHP TCompactProtocol bool&int64 readvalue bug
Client: PHP
Patch: Håkon Hitland <hakon.hitland@zedge.net>

This closes #1132
2016-11-17 21:21:08 +01:00
visoeclipse
22ec64f88a THRIFT-3844 thrift_protocol cannot compile in 7.0.7
This closes #1021 and closes #971
2016-09-26 01:42:02 +09:00
myroslav.kosinskyi
dd9885e322 THRIFT-3839 Performance issue with big message deserialization using php extension
This closes #1014
2016-09-26 01:42:02 +09:00
jfarrell
311c98455a THRIFT-948: SSL socket support for PHP
Client: php
Patch: Mansi Nahar

Adds TSSLServerSocket and TSSLSocket to PHP
2016-09-20 13:30:16 -04:00
Nobuaki Sukegawa
527637ac3c THRIFT-3827 Fix CompactProtocol readI64 function
cleanup (#1054)
2016-08-20 18:40:41 +09:00
lnn1123
77e5f3a3a3 THRIFT-3827 Fix CompactProtocol readI64 function
This closes #1008 and closes #1052
2016-08-20 18:37:53 +09:00
Mark Goldfinch
4ab9a88496 THRIFT-3764: Ensure PHP TSimpleJSONProtocol and TMultiplexedProtocol files included during "make install"
This closes #969
2016-03-29 12:03:34 +09:00
Nobuaki Sukegawa
73d16378c5 More make dist entries 2016-03-19 23:53:05 +09:00
Nobuaki Sukegawa
37a122271f THRIFT-3647 Fix php extension build warnings
Client: PHP
Patch: Nobuaki Sukegawa

This closes #878
2016-02-20 00:45:35 +09:00
David Soria Parra
496454a4b0 THRIFT-3514: Add PHP 7 version of php_thrift_protocol
This is an initial port of php_thrift_protocol to PHP7. However as
we deal with zval's all over the place, we opt for separating
the C files completely leading to some overhead. However this
is a good start to see the differences in the implementation. From
there we should follow up with a more unified approach by refactoring
parts of the zval handling to be more generic so we can plug it
into PHP 7 and PHP 5 extensions.

Tested this by running with TestClient.php against a CPP server
and using TBinaryProtocolAccelerated.
2016-01-07 20:40:07 +01:00
Atsushi Takayama
aede97523d THRIFT-3318 PHP: SimpleJSONProtocol Implementation
Client: PHP
Patch: Atsushi Takayama

This closes #602
2015-12-02 02:03:53 +09:00
Roger Meier
a43063caac THRIFT-3451 thrift_protocol PHP extension missing config.m4 file
This closes #718
2015-11-28 13:41:30 +01:00
Maxime Mouial
622ef03f1b THRIFT-3309: Missing TConstant.php in /lib/php/Makefile.am
The file lib/php/lib/Thrift/Type/TConstant.php is missing from the php
Makefile. Therefore "make install" don't copy the TConstant.php file.

This closes #689
2015-11-14 11:04:01 +01:00
Phongphan Phuttha
90ea4f64c1 THRIFT-2779: Always write unescaped JSON unicode string.
Client: PHP
Patch: Phongphan Phuttha

This closes #666
2015-11-11 00:32:55 +09:00
Stig Bakken
d6ca81b2cc PHP Compiler: always cast scalar types in jsonSerialize() 2015-10-29 23:01:37 +02:00
jfarrell
f13e431bab THRIFT-3305: Missing dist files for 0.9.3 release candidate
Client: build
Patch: jfarrell

Adds missing files to dist
2015-08-25 00:39:29 -04:00
Nobuaki Sukegawa
113b638790 THRIFT-3148 Markdown links to coding_standards are dead
This closes #491
2015-05-13 21:40:26 +02:00