Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fatal error: Call to undefined function

Status
Not open for further replies.

KellyHero

Programmer
Jun 10, 2002
14
US
Hi all:

I am getting the following error:

Fatal error: Call to undefined function: curl_init() in c:\users\xxxxxxxxxxxxxx\weather\current_weather.php on line 20

(xxxxxxxxx is my domain name)

Here is the code from current_weather.php that it refers to:
Code:
$ch = curl_init();

curl_setopt ($ch, CURLOPT_URL, "[URL unfurl="true"]http://www.ejse.com/WeatherService/Service.asmx/GetWeatherInfo?zipCode=$zipCode");[/URL]
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$weather_input=curl_exec ($ch);
curl_close ($ch);
$weather_data = array();
$xml_current_tag_state = '';
$type_count = 0;
global $weather_data, $xml_current_tag_state;
My sysadmin has PHP4 installed on our server. I am a PHP newbie, so I have no idea how to correct this error. Any ideas?
 
CURL is not installed by default with PHP.

One way to verify that CURL is installed. Create a script which consists of:

<?php
phpinfo();
?>

and point your web browser to the script. If CURL is installed, you will be able to find an information section on CURL. If it is not there, the CURL family of functions will be unavailable to you -- in that case, get your admin to configure CURL support into PHP. Want the best answers? Ask the best questions: TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top