php CURL 一直返回false error空串 centos->nginx 5C

php CURL 一直返回false error空串
没有找到原因,然后我把php-fpm kill 重启后就好了


curl 模块 之前没启动?

curl 模块肯定是好的,也不是Https的证书验证问题, 环境是centOS nginx php-fpm ,
已经是生产环境,线上所有功能都正常,就是调用curl ,一直返回false,



Csdn user default icon
在PHP中使用cURL和x-www-form-urlencoded进行POST返回Access Denied

<div class="post-text" itemprop="text"> <p>I have been able to use the Advanced Rest Client Extension for chrome to send POST queries to an specific HTTPS server and I get Status Code: 200 - OK with the same body fields as the ones I used in this code, but when I run the following code I get this response: 403 - Access Denied.</p> <pre><code>&lt;?php $postData = array( 'type' =&gt; 'credentials', 'id' =&gt; 'exampleid', 'secret_key' =&gt; 'gsdDe32dKa' ); // Setup cURL $ch = curl_init(''); curl_setopt_array($ch, array( CURLOPT_POST =&gt; TRUE, CURLOPT_RETURNTRANSFER =&gt; TRUE, CURLOPT_HTTPHEADER =&gt; array('Content-Type: application/x-www-form-urlencoded' ), CURLOPT_POSTFIELDS =&gt; json_encode($postData) )); // Send the request $response = curl_exec($ch); var_dump($response); // Check for errors if($response === FALSE){ die(curl_error($ch)); } // Decode the response $responseData = json_decode($response, TRUE); // Print the date from the response echo $responseData['published']; ?&gt; </code></pre> <p>I've noticed as well that when I use Advanced Rest Client Extension for chrome and if I set the Content-Type to application/json I have to enter a login and a password that I don't know what are those because even if I enter the id and secret key that I have in the code it returns 401 Unauthorized. So I'm guessing this code that I wrote is not forcing it to the content-type: application/x-www-form-urlencoded, but I'm not sure. Thank you for any help on this issue!</p> </div>

webrtc下载遇见RPC failed:curl 56 GnuTLS recv error(-9)问题

下载wbertc时出现如图上错误,设置了git config --global http.postbuffer 1024288000 ,也会出现,请问这种情况应该怎么解,终端中可以下载deptool; ![图片说明](

为什么centos curl版本与php curl版本不同

<div class="post-text" itemprop="text"> <p>I updated centos7 curl and now the version is 7.65, then I rebuilt php7 and <code>set --with-curl=/usr/bin/curl</code>. When I finished <code>curl_version()</code> still shows 7.20. Why is that?</p> <p>I use guzzle to request a web which need http_version 2.0, so I have to upgrade php curl. Hope someone helps me, thanks a lot!</p> </div>


想要实现七牛云存储直接远程存储图片 在本地测试是可以的,但是一到线上的服务器(使用LuManager配置的环境) 就出错 错误信息 ``` HTTP/1.1 400 Bad Request Server: nginx Date: Thu, 08 Sep 2016 11:04:52 GMT Content-Type: text/html Content-Length: 166 Connection: close ``` PHP代码 ``` <?php function QiNiu_send($imgurl, $title='') { global $access_key,$secret_key; $fetch = urlsafe_base64_encode($imgurl); $key = $title.'.jpg'; $to = urlsafe_base64_encode('bucket:'.$key.''); $url = ''. $fetch .'/to/' . $to; $access_token = generate_access_token($access_key, $secret_key, $url); $header[] = 'Content-Type: application/json'; $header[] = 'Authorization: QBox '. $access_token; $curl = curl_init($url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_HEADER,1); curl_setopt($curl, CURLOPT_HTTPHEADER, $header); curl_setopt($curl, CURLOPT_POST, 1); curl_setopt( $curl , CURLOPT_TIMEOUT, 1 ); $con = curl_exec($curl); curl_close( $curl ); if ($con === false) { echo 'CURL ERROR: ' . curl_error($curl); } else { //$arr = json_decode($con,true); print_r($con); return ''.$key; } } ?> ```


<div class="post-text" itemprop="text"> <p>I'm using <strong>curl</strong> to communicate with <strong></strong> on my dedicated server on centOS 7.2.</p> <p>Until today, all worked fine. Now i'm facing an issue, the connection fail.</p> <p><strong>curl command</strong></p> <pre><code>[root@serveur etc]# curl -Lv * About to connect() to port 80 (#0) * Trying * Connection timed out * Failed connect to; Connection timed out * Closing connection 0 curl: (7) Failed connect to; Connection timed out </code></pre> <p><strong>ping command</strong></p> <pre><code>[root@serveur etc]# ping PING ( 56(84) bytes of data. 64 bytes from ( icmp_seq=1 ttl=55 time=98.7 ms 64 bytes from ( icmp_seq=2 ttl=55 time=98.7 ms 64 bytes from ( icmp_seq=3 ttl=55 time=98.7 ms 64 bytes from ( icmp_seq=4 ttl=55 time=98.8 ms 64 bytes from ( icmp_seq=5 ttl=55 time=98.7 ms 64 bytes from ( icmp_seq=6 ttl=55 time=108 ms 64 bytes from ( icmp_seq=7 ttl=55 time=127 ms ^C --- ping statistics --- 7 packets transmitted, 7 received, 0% packet loss, time 6009ms rtt min/avg/max/mdev = 98.713/104.132/127.041/9.886 ms </code></pre> <p>I disabled the firewall, added rule on /etc/hosts (, the issue still occur.</p> <p>Any idea on what can block the connection ?</p> </div>


![图片说明](![图片说明](![图片说明]( 访问fps的那个可以成功,fsp的那个就一直显示false,路径上面检查过无空格,也不是访问https的,后台拿不到文件求大神指点

如何使用multiCurl和Php Curl Class检查代理?

<div class="post-text" itemprop="text"> <p>I'm trying to check proxies using php-curl-class with MultiCurl. The problem is, that I can't set individual proxy for each instance in MultiCurl separately.</p> <p>The goal is to send a request to $check_url, using each Proxy that was parsed before (in Array). If I get positive answer, write it to the file then.</p> <p>But, it causing troubles to set an individual proxy for MultiCurl, while setting it with Curl is OK.</p> <p>Could you, please, tell me where I got a mistake?</p> <p>My code is below:</p> <pre><code>/* Multicurl */ $multi_curl = new MultiCurl(); /* Проверка прокси */ $check_url = ''; foreach($proxy_result as $key =&gt; $val) { $multi_curl-&gt;beforeSend(function ($instance) use ($proxy_result) { foreach ($proxy_result as $key =&gt; $val) { $instance-&gt;setProxy($val); $instance-&gt;setProxyType(CURLPROXY_SOCKS5); $instance-&gt;setProxyTunnel(); $instance-&gt;setConnectTimeout(5); $instance-&gt;setTimeout(10); $instance-&gt;setOpt(CURLOPT_FOLLOWLOCATION, true); $instance-&gt;setOpt(CURLOPT_SSL_VERIFYHOST, false); $instance-&gt;setOpt(CURLOPT_SSL_VERIFYPEER, false);}}); $multi_curl-&gt;addGet($check_url); } $multi_curl-&gt;success(function($instance) { $ip = ($instance-&gt;response-&gt;origin); echo $ip; }); $multi_curl-&gt;start(); </code></pre> </div>

Docker - Ubuntu - Nginx - MariaDB - 连接被拒绝

<div class="post-text" itemprop="text"> <p>Im trying to setup a docker container on OSX with Docker - Ubuntu - Nginx - MariaDB to run a Laravel App</p> <p>My docker settings are:</p> <pre><code>version: "2" services: nginx: build: context: ./nginx ports: - "8080:80" volumes: - ./app:/var/app fpm: build: context: ./fpm volumes: - ./app:/var/app expose: - "9000" environment: - "DB_HOST=db" - "DB_DATABASE=laravel_db" db: image: mariadb ports: - "33061:3306" environment: - MYSQL_ROOT_PASSWORD=root - MYSQL_DATABASE=laravel_db volumes: - ./database:/var/lib/mysql </code></pre> <p>And the 2 docker files:</p> <pre><code>FROM nginx ADD ./default.conf /etc/nginx/conf.d/ RUN echo "daemon off;" &gt;&gt; /etc/nginx/nginx.conf CMD service nginx start </code></pre> <hr> <pre><code>FROM ubuntu:latest RUN apt-get update &amp;&amp; apt-get install -y software-properties-common language-pack-en-base \ &amp;&amp; LC_ALL=en_US.UTF-8 add-apt-repository -y ppa:ondrej/php \ &amp;&amp; apt-get update \ &amp;&amp; apt-get install -y php7.0 php7.0-fpm php7.0-mysql mcrypt php7.0-gd curl \ php7.0-curl php-redis php7.0-mbstring sendmail supervisor \ &amp;&amp; mkdir /run/php \ &amp;&amp; apt-get clean &amp;&amp; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf RUN sed -i -e 's/listen = \/run\/php\/php7.0-fpm.sock/listen =' /etc/php/7.0/fpm/pool.d/www.conf \ &amp;&amp; sed -i -e 's/;daemonize = yes/daemonize = no/g' /etc/php/7.0/fpm/php-fpm.conf WORKDIR /var/app EXPOSE 9000 CMD ["/usr/bin/supervisord"] </code></pre> <p>So far so good. I can access the Laravel App homepage as <strong>localhost:8080</strong> and use Sequel Pro to access the MySQL DB.</p> <p>But when access to the Laravel route that requires DB query, it returns "Connection refused"</p> <p>Then I create a raw PHP file to make a DB connection test:</p> <pre><code>$link = mysqli_connect('', 'root', 'root', 'laravel_db', 33061); if(!$link) { die('failed to connect to the server: ' . mysqli_connect_error()); } </code></pre> <p>And I get connection refused error as well.</p> <p>I tried using and localhost but no hope.</p> <p>Tried to google it but most answers are about ports are not published...</p> <p>Thanks</p> </div>

cURL从有效URL返回空输出 - 未报告错误

<div class="post-text" itemprop="text"> <p>If you just enter the urls into the browser you can see that both work, cdon works even without javascript, have they blocked cURL somehow?</p> <p>I'm trying to build a scraper to benifit legal movies online which would benifit them a whole lot, seems stupid blocking scrapers in general imho. Although I'm far from sure that's whats going on here! Might be just an error somewhere..</p> <pre><code>// Works get_file1(';q=The+Matrix', '/', 'sfanytime.html'); // Saves a blank 0 KB file get_file1(';search_terms=The+Matrix', '/', 'cdon.html'); function get_file1($file, $local_path, $newfilename) { $out = fopen($newfilename, 'wb'); if ($out === FALSE) { return false; } $ch = curl_init(); curl_setopt($ch, CURLOPT_FILE, $out); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_URL, $file); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_exec($ch); $error = curl_error($ch); if (strlen($error) &gt; 0) { echo "&lt;br&gt;Error is : ". $error; return false; } curl_close($ch); return true; } </code></pre> </div>


<div class="post-text" itemprop="text"> <p>我使用 curl 访问 web 服务时,有时会得到响应,但有时会因为内部服务器错误而失败,即使我实际上收到了预期的 xml 文件。问题出在哪?</p> <pre><code>$header = array( "Content-type: text/xml;charset=\"utf-8\"", "Accept: text/xml", "Cache-Control: no-cache", "Pragma: no-cache", "Content-length: ".strlen($send), ); $URL = 'https:ip:port/xxxxx'; $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60); curl_setopt($ch, CURLOPT_TIMEOUT, 120); curl_setopt($ch, CURLOPT_URL, $URL ); curl_setopt($ch, CURLOPT_POST, true ); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); //array('Content-Type: text/xml')); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt($ch, CURLOPT_POSTFIELDS, $send ); //curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20080311 Firefox/'); try { $result = curl_exec($ch); curl_close($ch); $f = fopen("./Response.xml", "w"); fwrite($f, $result); fclose($f); } catch (Exception $e) { $payments = "&lt;DIV class = 'alert alert-danger'&gt;Failed Transaction. Please try again&lt;/DIV&gt;"; $error = Date("Y-m-d h:i:s")." Error Number:".curl_errno($soap_do)." "; $error .= "Error String:".curl_error($ch)." Matrucule: ".$matricule." ------------------------ "; $f = fopen("./Payment_Error_Log.txt", "w"); fwrite($f, $error); fclose($f); } </code></pre> </div>

Centos 6.6 CURL在连接到某个SSL站点时返回错误

<div class="post-text" itemprop="text"> <p>I already tried to search most of things here but seems not worked. tried to curl -I -v <a href="" rel="nofollow"></a> returns error usually im using ubuntu server and do not have any issue with this, but when i tried to use centos 6.6 suddenly all my curls to https returns that error both in PHP or even with linux command line appreciate if you can help me </p> <p>Response when tried to curl :</p> <pre><code>* About to connect() to port 443 (#0) * Trying connected * Connected to ( port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * NSS error -12190 * Error in TLS handshake, trying SSLv3... &gt; HEAD /lionairibe/OnlineBooking.aspx HTTP/1.1 &gt; User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/ Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2 &gt; Host: &gt; Accept: */* &gt; * Connection died, retrying a fresh connect * Closing connection #0 * Issue another request to this URL: '' * About to connect() to port 443 (#0) * Trying connected * Connected to ( port 443 (#0) * TLS disabled due to previous handshake failure * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * NSS error -12190 * Closing connection #0 * SSL connect error curl: (35) SSL connect error </code></pre> <p>Thanks :)</p> </div>


<div class="post-text" itemprop="text"> <p>When I send the Curl request from local PHP script to the local server via SSL (running nginx 1.9.4 on Windows via WPN-XM) then the browser is "waiting" until it gets the 504 error. The PHP-fpm is probably dead, because the web server does not proccess any other request.</p> <p>When I send the same request to the production server it works correctly.</p> <p>When I send the Curl request from command line, then it works.</p> <p>When I open the final resource in web browser then it works.</p> <p>I have spent 4 hours googling and reading Stac Owerflow, but did not find any other situation like I have.</p> <p>Thanks!</p> <hr> <pre><code>&lt;?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://webserver.local/resource"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); // just on local curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // just on local curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $content); $response = curl_exec($ch); </code></pre> </div>


![图片说明]( 这条命令来自《Docker技术入门与实战(第3版)》第2章在Ubuntu环境中安装Docker,我通过查阅 curl 的帮助手册,知道 -f (--fail) 表示在服务器错误时,阻止一个返回的表示错误原因的 html 页面,而由 curl 命令返回一个错误码 22 来提示错误,但是其中的 "sSL" 是什么意思呢?

如何从php curl响应中的application / octet-stream数据中检索文档?

<div class="post-text" itemprop="text"> <p>I am using php CURL function to retrieve document from my server . In my curl operation i am getting the response as application/octet-stream data .How can i retrieve the document from bellow response? .</p> <pre><code>--uuid:9685d4ea-5f71-47d2-938b-04aa830bfc80 Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"; Content-Transfer-Encoding: binary Content-ID: &lt;; &lt;soap:Envelope xmlns:soap=""&gt;&lt;soap:Header/&gt;&lt;soap:Body&gt;&lt;ns17:RetrieveDocumentSetResponse xmlns:ns10="" xmlns:ns11="" xmlns:ns12="urn:gov:hhs:fha:nhinc:common:subscriptionb2overridefordocuments" xmlns:ns13="" xmlns:ns14="urn:gov:hhs:fha:nhinc:common:subscriptionb2overrideforcdc" xmlns:ns15="" xmlns:ns16="urn:oasis:names:tc:emergency:EDXL:DE:1.0" xmlns:ns17="urn:ihe:iti:xds-b:2007" xmlns:ns18="" xmlns:ns2="urn:gov:hhs:fha:nhinc:common:nhinccommon" xmlns:ns3="urn:gov:hhs:fha:nhinc:common:nhinccommonentity" xmlns:ns4="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:ns5="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns6="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:ns7="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:ns8="" xmlns:ns9=""&gt;&lt;ns5:RegistryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success"/&gt;&lt;ns17:DocumentResponse&gt;&lt;ns17:HomeCommunityId&gt;urn:oid:2.16.840.1.113883.3.1259.10.1003&lt;/ns17:HomeCommunityId&gt;&lt;ns17:RepositoryUniqueId&gt;1&lt;/ns17:RepositoryUniqueId&gt;&lt;ns17:DocumentUniqueId&gt;1.RI0004.000000002.D-1&lt;/ns17:DocumentUniqueId&gt;&lt;ns17:mimeType&gt;text/xml&lt;/ns17:mimeType&gt;&lt;ns17:Document&gt;&lt;xop:Include xmlns:xop="" href="cid:ac0edf1f-3243-43b7-bb59-1beaf4392ebc-24@urn%3Aihe%3Aiti%3Axds-b%3A2007"/&gt;&lt;/ns17:Document&gt;&lt;/ns17:DocumentResponse&gt;&lt;/ns17:RetrieveDocumentSetResponse&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt; --uuid:9685d4ea-5f71-47d2-938b-04aa830bfc80 Content-Type: application/octet-stream Content-Transfer-Encoding: binary Content-ID: &lt;ac0edf1f-3243-43b7-bb59-1beaf4392ebc-24@urn:ihe:iti:xds-b:2007&gt; P-000000002 D-000000002.1 --uuid:9685d4ea-5f71-47d2-938b-04aa830bfc80-- </code></pre> <p>My code for curl operation is </p> <pre><code>$body = file_get_contents(dirname(__FILE__).'/doc_retrieve.xml'); $headers = array( 'Content-Type: text/xml; charset="utf-8"', 'Content-Length: '.strlen($body), 'Accept: text/xml', 'Cache-Control: no-cache', 'Pragma: no-cache', 'SOAPAction: "RespondingGateway_CrossGatewayRetrieve"' ); $ch = curl_init("http://testserver:8080/Gateway/DocumentRetrieve/3_0/EntityService/EntityDocRetrieve?wsdl"); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_USERAGENT, $defined_vars['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); // Stuff I have added curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $body); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); $response = curl_exec($ch); $filename=time(); header('Content-Transfer-Encoding: binary'); header('Accept-Ranges: bytes'); header('Content-Encoding: none'); header('Content-Type: application/.dat'); header('Content-Disposition: attachment; filename='.$filename.'.dat'); $destination = dirname(__FILE__) . '/'.$filename.'.dat'; $file = fopen($destination, "w+"); fputs($file, $response); fclose($file); readfile($destination); die(); </code></pre> <p>Is there any mistake with my code?. Please help .</p> </div>

PHP curl返回(35):SSL连接错误

<div class="post-text" itemprop="text"> <p>Im trying to visit the following page using php curl 7.35.0 using the following code: </p> <pre><code> $this-&gt;ch = curl_init(); curl_setopt($this-&gt;ch, CURLOPT_CONNECTTIMEOUT, 3000); curl_setopt($this-&gt;ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"); curl_setopt($this-&gt;ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($this-&gt;ch, CURLOPT_FOLLOWLOCATION, TRUE); curl_setopt($this-&gt;ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded')); curl_setopt($this-&gt;ch, CURLOPT_TIMEOUT, 3600); curl_setopt($this-&gt;ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($this-&gt;ch, CURLOPT_URL, ''); curl_setopt($this-&gt;ch, CURLOPT_RETURNTRANSFER, 1); $content = curl_exec($this-&gt;ch); $httpCode = curl_getinfo($this-&gt;ch, CURLINFO_HTTP_CODE); if ($errno = curl_errno($this-&gt;ch)) { $error_message = curl_strerror($errno); echo "cURL error ({$errno}): {$error_message}"; } echo "&lt;br&gt;"; echo "http code: " . $httpCode . "&lt;br&gt;"; echo "content: " . $content; </code></pre> <p>Which returns the following:</p> <p>cURL error (35): SSL connect error</p> <p>http code: 0 content:</p> <p>Did anyone run into this problem before?</p> </div>

在nginx上获取HTTP 500错误访问php for phpMyAdmin

<div class="post-text" itemprop="text"> <p>Getting the below error access <a href="" rel="nofollow noreferrer"></a></p> <pre><code>[error] 6016#0: *30 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function __() in /usr/share/phpMyAdmin/libraries/core.lib.php:245 Stack trace: #0 /usr/share/phpMyAdmin/libraries/ PMA_fatalError('Error during se...') #1 /usr/share/phpMyAdmin/libraries/ require('/usr/share/phpM...') #2 /usr/share/phpMyAdmin/index.php(12): require_once('/usr/share/phpM...') #3 {main} thrown in /usr/share/phpMyAdmin/libraries/core.lib.php on line 245" while reading response header from upstream, client:, server: _, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://", host: "" </code></pre> <p>Below is what i tried but still it does not work.</p> <p>1.</p> <pre><code>chmod 644 /usr/share/phpMyAdmin/setup/frames/ chmod 644 /usr/share/phpMyAdmin/test/test_data/ chmod -R 775 /var/opt/remi/php72/lib/php/session </code></pre> <p>2.</p> <pre><code>sudo yum remove phpmyadmin sudo yum autoremove phpmyadmin sudo yum install phpmyadmin </code></pre> <p>Below is the php details:</p> <pre><code>php72 -v PHP 7.2.15 (cli) (built: Feb 5 2019 18:05:51) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.15, Copyright (c) 1999-2018, by Zend Technologies # php72 -m [PHP Modules] bz2 calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar readline Reflection session SimpleXML sockets SPL sqlite3 standard tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl Zend OPcache zlib [Zend Modules] Zend OPcache uname -a Linux myhost 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux </code></pre> <p>I am running everything with root user so permissions should not be an issue i guess.</p> </div>

错误:8 - CURL错误:GnuTLS recv错误(-9):收到意外长度的TLS数据包

<div class="post-text" itemprop="text"> <p>I have infusionsoft api lib running on my server. In the code, I have to find contacts in infusionsoft using their method <code>dsFind</code>. If I use 5 as the limit to fetch no of contacts, it is working fine but when I make it more than 10, it is throwing below error:</p> <p><code>ERROR: 8 - CURL error: GnuTLS recv error (-9): A TLS packet with unexpected length was received</code>.</p> <p>The same code is working fine on some other server.</p> </div>

如何使用-d选项执行PHP curl post

<div class="post-text" itemprop="text"> <p>I need to post to an application with one of the data is <code>xml</code> string. To pass the <code>&amp;</code> and <code>special characters</code>, the application suggests to <code>curl post</code> with <code>-d option</code>. </p> <p>How do pass <code>-d option</code> with <code>PHP curl</code>?</p> </div>


<div class="post-text" itemprop="text"> <p>I am building a website crawler and using a <a href="" rel="nofollow">cURL class</a> with these options for getting headers, so that I can extract their <code>mime/type</code> and <code>content-length</code> before downloading full site to very it as <code>text/html</code> and below specified size limits.</p> <p>these are my curl options</p> <pre><code>$c-&gt;setopt(CURLOPT_URL, $theURL); $c-&gt;setopt(CURLOPT_HEADER, false); $c-&gt;setopt(CURLOPT_RETURNTRANSFER, true); $c-&gt;setopt(CURLOPT_TIMEOUT, 10); $c-&gt;setopt(CURLOPT_CONNECTTIMEOUT, 10); $c-&gt;setopt(CURLOPT_NOBODY, TRUE); $c-&gt;setopt(CURLOPT_FOLLOWLOCATION, TRUE); $c-&gt;setopt(CURLOPT_MAXREDIRS, 2); // Within Class $theReturnValue = curl_exec($this-&gt;m_handle); $this-&gt;m_status = curl_getinfo($this-&gt;m_handle) ; </code></pre> <p>but it always return <code>[download_content_length] =&gt; -1</code> even without <code>CURLOPT_NOBODY</code> however the data (whole file) retrived is correct.</p> </div>


今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...



和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...


“亚马逊丛林里的蝴蝶扇动几下翅膀就可能引起两周后美国德州的一次飓风……” 这句人人皆知的话最初用来描述非线性系统中微小参数的变化所引起的系统极大变化。 而在更长的时间尺度内,我们所生活的这个世界就是这样一个异常复杂的非线性系统…… 水泥、穹顶、透视——关于时间与技艺的蝴蝶效应 公元前3000年,古埃及人将尼罗河中挖出的泥浆与纳特龙盐湖中的矿物盐混合,再掺入煅烧石灰石制成的石灰,由此得来了人...






提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...




私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...


今天给你们讲述一个外包程序员的幸福生活。男主是Z哥,不是在外包公司上班的那种,是一名自由职业者,接外包项目自己干。接下来讲的都是真人真事。 先给大家介绍一下男主,Z哥,老程序员,是我十多年前的老同事,技术大牛,当过CTO,也创过业。因为我俩都爱好喝酒、踢球,再加上住的距离不算远,所以一直也断断续续的联系着,我对Z哥的状况也有大概了解。 Z哥几年前创业失败,后来他开始干起了外包,利用自己的技术能...


本文介绍一些C++的两个新特性,它们虽然微小,但对你的编程十分重要 一、Template表达式内的空格 C++11标准之前建议在“在两个template表达式的闭符之间放一个空格”的要求已经过时了 例如: vector&lt;list&lt;int&gt; &gt;; //C++11之前 vector&lt;list&lt;int&gt;&gt;; //C++11 二、nullptr ...


场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...



离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...


不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...




当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...


HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...



面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?







已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...



《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)





作者 | 伍杏玲出品 | CSDN(ID:CSDNnews)格子衬衫、常掉发、双肩包、修电脑、加班多……这些似乎成了大众给程序员的固定标签。近几年流行的“跨界风”开始刷新人们对程序员的...






不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...