Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.php > #4166
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | de.comp.lang.php |
| Subject | Re: curl Shell-Parameter vs. CURLOPT-Konstanten |
| Date | 2017-07-17 20:33 +0200 |
| Organization | PointedEars Software (PES) |
| Message-ID | <5288918.lOV4Wx5bFT@PointedEars.de> (permalink) |
| References | (3 earlier) <2386485.mvXUDI8C0e@PointedEars.de> <ok2fkb$jao$1@dont-email.me> <2392003.mvXUDI8C0e@PointedEars.de> <10876584.O9o76ZdvQC@PointedEars.de> <ok86fl$1ge$1@solani.org> |
Christoph M. Becker wrote:
> Am 13.07.2017 um 16:37 schrieb Thomas 'PointedEars' Lahn:
>> Die Konstante CURL_HTTP_VERSION_2TLS gibt es in PHP-curl nicht;
>
> Doch:
Jein.
> <https://github.com/php/php-src/blob/04fb3f28ff677d036cfaf902f07b75f0346a5c33/ext/curl/interface.c#L1349>.
Das ist *C*-Code von PHP *7.x* oder neuer.
> Ist eventuell aber nicht dokumentiert?
Wie man im C-Code sieht, hängt die Verfügbarkeit der Konstante in PHP neben
der PHP-Version auch von der Version der libcurl ab, mit der PHP compiliert
wurde. Sofern die verwendete Version der libcurl 7.47.0 oder neuer war, so
ist die Konstante ab PHP 7.0 verfügbar.
<https://github.com/php/php-src/blob/PHP-5.6.31/ext/curl/interface.c#L853-L859>
| $ curl -L foo --libcurl - | sed '1,/curl_easy_init/d;
s/^\([[:space:]]*\)curl_easy_setopt(\([^,]\+\), CURLOPT_URL,
\("[^"]\+"\));/<?php\n\1$\2 = curl_init(\3);/; s/curl_easy/curl/g;
s/\(curl_setopt(\)\([^,]\+\)/\1$\2/; s/\(, [0-9]\+\)L/\1/; s/, ([^)]\+)/, /;
s/^\([[:space:]]*\)\([0-9a-zA-Z]\+\)[[:space:]]*=[[:space:]]*\(.\+\)/\1$\2 =
\3/; s/curl_perform(/curl_exec($/; s/curl_cleanup(/curl_close($/; /return/,
$d' | php
| % Total % Received % Xferd Average Speed Time Time Time
Current
| Dload Upload Total Spent Left
Speed
| 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0curl: (6) Could not resolve host: foo
| PHP Warning: Module 'PDO' already loaded in Unknown on line 0
| PHP Warning: Module 'vld' already loaded in Unknown on line 0
| PHP Notice: Use of undefined constant CURL_HTTP_VERSION_2TLS - assumed
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| 'CURL_HTTP_VERSION_2TLS' in - on line 6
| PHP Stack trace:
| PHP 1. {main}() -:0
|
| $ php --version
| PHP Warning: Module 'PDO' already loaded in Unknown on line 0
| PHP Warning: Module 'vld' already loaded in Unknown on line 0
| PHP 5.6.30-0+deb8u1 (cli) (built: Feb 8 2017 08:50:21)
| Copyright (c) 1997-2016 The PHP Group
| Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
| with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend
Technologies
| with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans
--
PointedEars
Zend Certified PHP Engineer <http://www.zend.com/en/yellow-pages/ZEND024953>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
Back to de.comp.lang.php | Previous | Next — Previous in thread | Find similar
curl Shell-Parameter vs. CURLOPT-Konstanten Ralph Stahl <post@rstahl.de> - 2017-07-05 13:15 +0200
Re: curl Shell-Parameter vs. CURLOPT-Konstanten Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-07-06 12:20 +0200
Re: curl Shell-Parameter vs. CURLOPT-Konstanten Ralph Stahl <post@rstahl.de> - 2017-07-08 22:50 +0200
Re: curl Shell-Parameter vs. CURLOPT-Konstanten Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-07-09 05:26 +0200
Re: curl Shell-Parameter vs. CURLOPT-Konstanten Ralph Stahl <post@rstahl.de> - 2017-07-11 14:21 +0200
Re: curl Shell-Parameter vs. CURLOPT-Konstanten Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-07-13 16:00 +0200
Re: curl Shell-Parameter vs. CURLOPT-Konstanten Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-07-13 16:37 +0200
Re: curl Shell-Parameter vs. CURLOPT-Konstanten "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-07-13 18:17 +0200
Re: curl Shell-Parameter vs. CURLOPT-Konstanten Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-07-17 20:33 +0200
csiph-web