Error Call to undefined function curl_init() in PHP: causes and solution
Hello everyone! I'm a beginner in PHP and trying to make a simple HTTP request to an external API via cURL. I wrote this code:\n\n```php\n\n```\n\nBut when running the script I get a fatal error: **Call to undefined function curl_init()**. I checked that PHP is installed, version 8.1. Please advise what to do? Do I need to enable something in php.ini? Or maybe this function was removed in newer PHP versions? Thanks in advance for your help!\n\nAdditionally: I'm working on Windows, using OpenServer. In phpinfo() I don't see the cURL section. I tried googling, but the advice varies — some say about installing libcurl, others about enabling extension.
No answers yet.
Log in to leave an answer
Blogs
CI/CD for PHP Projects: GitHub Actions Advanced Level
JavaScript 2025: 7 Trends That Will Change Web Development
Working with the File System in PHP: A Complete Guide for Beginners
Iterating over map in Go: 5 fatal mistakes and how to avoid them