Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get CURL to work with PHP on Windows? (WAMP)
    primarykey
    data
    text
    <p><strong>Update</strong>: The problem appears to have been corrupt DLLs somewhere in my PHP installation, or possibly a bug in PHP 5.2.9 on Win2k. I downloaded the windows (binaries-only) distribution of PHP 5.2.10 from php.net and extracted that to my c:\PHP directory. After doing that, everything worked fine.</p> <p><strong>Update2</strong>: I undid everything that I tried earlier (everything from the bulleted list below), <em>except</em> that I left "<code>extension=php_curl.dll</code>" uncommented in my php.ini file. It turns out that is all you should have to do in a proper installation.</p> <hr> <p>I'm trying to get CURL to work on a Windows installation of PHP (version 5.2.9-2), and I am at wit's end. I have found <a href="http://www.php.net/manual/en/curl.installation.php" rel="nofollow noreferrer">the PHP CURL installation page</a>, <a href="https://stackoverflow.com/questions/693385/curl-for-wamp">this SO question</a> which references <a href="http://www.tonyspencer.com/2003/10/22/curl-with-php-and-apache-on-windows/" rel="nofollow noreferrer">this page</a>, and <a href="https://stackoverflow.com/questions/176449/how-to-install-php-curl">this SO question</a>. I've tried most of the suggestions in all of those pages but I still get an error. Here is my very simple test page:</p> <pre><code>&lt;?php $ch = curl_init(); ?&gt; &lt;b&gt;Success!&lt;/b&gt; </code></pre> <p>This gives me:</p> <blockquote> <p><strong>Fatal error</strong>: Call to undefined function curl_init() in <strong>C:\ApacheRoot\curltest.php</strong> on line <strong>2</strong></p> </blockquote> <p>In my Apache error log I get this each time the server starts:</p> <blockquote> <p><code>PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\PHP\\ext\\php_curl.dll' - The specified procedure could not be found.\r\n in Unknown on line 0</code></p> </blockquote> <p>I have done the following:</p> <ul> <li>Uncommented the following line in php.ini: <code>extension=php_curl.dll</code></li> <li>Copied <code>ssleay32.dll</code> and <code>libeay32.dll</code> from C:\PHP to C:\WINNT\System32</li> <li>Downloaded cURL for Win32 from <a href="http://curl.haxx.se/download.html" rel="nofollow noreferrer">curl.haxx.se</a> and extracted the .zip file to C:\cURL</li> <li>Added <code>C:\cURL</code> to my system PATH environment variable.</li> <li>Verified that: <ul> <li>php.ini includes <code>extension_dir="C:\PHP\ext"</code></li> <li>The directory <code>C:\PHP\ext</code> contains <code>php_curl.dll</code></li> <li>The only <code>php.ini</code> file on my system is in <code>C:\PHP</code> (i.e. especially that there is no <code>C:\WINNT\php.ini</code>)</li> <li>The Apache <code>httpd.conf</code> file includes the line <code>PHPIniDir "C:/PHP/"</code></li> </ul></li> </ul> <p>I have also rebooted the machine (several times, in fact...).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    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