all seems to be working ok - phpinfo() shows lots of info - and I can run php scripts localy.
problem is, I can’t use curl.
I’ve uncommented the
extension=php_curl.dll
line in php.ini but whenever I try to run the following script:
<?php
// create curl resource
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, "www.bbc.co.uk");
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output contains the output string
$output = curl_exec($ch);
// close curl resource to free up system resources
curl_close($ch);
?>
I get an error message:
Fatal error: Call to undefined function curl_init() in C:\\AServer\\Sites\\curltest.php on line 3
In phpinfo() results, it will show which php.ini file is being used by Apache. You have to uncomment in the right php.ini file which is being used by apache ( verify it through phpinfo ).
If the above are correct, place the libeay32.dll and ssleay32.dll in apache’s bin directory. Restart the apache.
Did you set the extension_dir value properly in php.ini? Try to set it like :
extension_dir=e:/phpdir/ext/ ( replace with your path )
restart apache and verify. If that is not working out, try to get a version of the apache that comes inbuilt with openssl.