Today, I deployed an older program on Alibaba Cloud, using Alibaba Cloud's esc. The environment is as follows:
PHP Version 5.2.17
Apache/2.2.29 (Unix)
Mysql 5.1.73
The index.php file contains the following code
<code>$ch = curl_init(); curl_setopt($ch,CURLOPT_URL,'http://www.baidu.com/'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); //curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $info = curl_exec($ch); curl_close($ch); echo $info;</code>
When I visit domain name/index.php, the Baidu page appears normally.
But after I made some modifications, the connection was reset and the connection was reset. I searched online and found no effective solution.
<code>$ch = curl_init(); curl_setopt($ch,CURLOPT_URL,'https://www.baidu.com/'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $info = curl_exec($ch); curl_close($ch); echo $info;</code>
What causes this problem? Is it a php version problem or some other reason? Thank you for your help!
Today, I deployed an older program on Alibaba Cloud, using Alibaba Cloud's esc. The environment is as follows:
PHP Version 5.2.17
Apache/2.2.29 (Unix)
Mysql 5.1.73
The index.php file contains the following code
<code>$ch = curl_init(); curl_setopt($ch,CURLOPT_URL,'http://www.baidu.com/'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); //curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $info = curl_exec($ch); curl_close($ch); echo $info;</code>
When I visit domain name/index.php, the Baidu page appears normally.
But after I made some modifications, the connection was reset. I searched online and found no effective solution.
<code>$ch = curl_init(); curl_setopt($ch,CURLOPT_URL,'https://www.baidu.com/'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $info = curl_exec($ch); curl_close($ch); echo $info;</code>
What causes this problem? Is it a php version problem or some other reason? Thank you for your help!
What era is it, still using 5.2. . . . . . . .