Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to find the wrapper "https" - did you forget to enable it when you configured PHP?
    primarykey
    data
    text
    <p>The problem is in the question. I've done a thorough investigation for solutions in regards to this and I know there are topics to this and I've followed them too and nothing has worked. That being said I'll list out exactly everything I've done so far. I am running PHP 5.2.14 with Zend Debugging on the latest Eclipse version on my Windows XP computer. I have a 1 GB of RAM. I have XAMPP running with Apache, MySQL, and FileZilla installed. </p> <p>On XAMPP I've done the following (Apache was off during these changes): Clicked on <em>Admin</em> from the XAMPP Control Panel and went to <code>https:// localhost/xampp/</code>. From there I accepted the certs from this line on the welcome page:</p> <blockquote> <p>For OpenSSL support please use the test certificate with https:// 127.0.0.1 or https:// localhost.</p> </blockquote> <p>On that same section I checked <code>phpinfo()</code>. Under 'Environment', <code>SERVER["HTTPS"]</code> is <code>on</code>. Under 'Apache Environment', <code>HTTPS</code> is <code>On</code>. Under 'PHP Variables, <code>_SERVER["HTTPS"]</code> is <code>On</code>. Under 'Phar', <code>OpenSSL support</code> is <code>disabled</code> (install ext/openssl). I don't know how to enable the Phar one.</p> <p>Now regarding the files themselves in C:\xampp, I went to the PHP folder. Under both production and development php.ini files (better safe than sorry), I have <code>allow_url_fopen=On</code>, <code>allow_url_include=On</code>, and I removed the semicolon, so that <code>extension=php_openssl.dll</code> is no longer commented out. I even confirmed that the .dll is in the ext folder of the PHP folder. Both libeay32.dll and ssleay32.dll are in the PHP and Apache folders. The Apache folder doesn't contain either productive or development php.ini files.</p> <p>I've went to <a href="http://www.slproweb.com/products/Win32OpenSSL.html">http://www.slproweb.com/products/Win32OpenSSL.html</a> and installed Win32 OpenSSL v1.0.0d for safe measure.</p> <p>Now the line of code in question in my retrieve_website.php looks like this:</p> <pre><code>$urlquery = "https://www.googleapis.com/customsearch/v1?key=".$appid."&amp;cx=".$google_searchid."&amp;q=".$query."&amp;alt=atom&amp;num=".$results; $xmlresults = file_get_contents($urlquery); </code></pre> <p>I have two other websites that I query but they are served via HTTP and they work fine. I also have this line of code entered near the end of the script:</p> <pre><code>echo 'openssl: ', extension_loaded ('openssl') ? 'yes':'no', "\n"; echo 'http wrapper: ', in_array('http', $w) ? 'yes':'no', "\n"; echo 'https wrapper: ', in_array('https', $w) ? 'yes':'no', "\n"; echo 'wrappers: ', var_dump($w); </code></pre> <p>When I run it as a PHP Script on Eclipse, everything outputs perfectly fine the way I want along with these results:</p> <pre><code>openssl: yes http wrapper: yes https wrapper: yes wrappers: array(10) { [0]=&gt; string(5) "https" [1]=&gt; string(4) "ftps" [2]=&gt; string(3) "php" [3]=&gt; string(4) "file" [4]=&gt; string(4) "data" [5]=&gt; string(4) "http" [6]=&gt; string(3) "ftp" [7]=&gt; string(13) "compress.zlib" [8]=&gt; string(14) "compress.bzip2" [9]=&gt; string(3) "zip" } </code></pre> <p>Despite all these changes I've made (after I started up Apache), I still get the same errors the first time I access my PHP script in Eclipse and Firefox via <a href="http://localhost/tutorial/retrieve_website.php">http://localhost/tutorial/retrieve_website.php</a>:</p> <blockquote> <p>Warning: file_get_contents() [function.file-get-contents]: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\xampp\htdocs\tutorial\retrieve_website.php on line 29<br/><br/> Warning: file_get_contents(https:// www.googleapis.com/customsearch/v1?key=<em>removed API ID</em>&amp;cx=<em>removed search ID</em>&amp;q=The+Devil+went+down+to+Georgia&amp;alt=atom&amp;num=5) [function.file-get-contents]: failed to open stream: No such file or directory in C:\xampp\htdocs\tutorial\retrieve_website.php on line 29<br/><br/> Warning: DOMDocument::loadXML() [domdocument.loadxml]: Empty string supplied as input in C:\xampp\htdocs\tutorial\retrieve_website.php on line 33<br/><br/> openssl: no http wrapper: yes https wrapper: no wrappers: array(10) { [0]=> string(3) "php" [1]=> string(4) "file" [2]=> string(4) "glob" [3]=> string(4) "data" [4]=> string(4) "http" [5]=> string(3) "ftp" [6]=> string(3) "zip" [7]=> string(13) "compress.zlib" [8]=> string(14) "compress.bzip2" [9]=> string(4) "phar" } </p> </blockquote> <p>What is it that I have overlooked or failed to do? To my own knowledge, I've done everything that I've researched about concerning HTTPS and OpenSSL</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload