search
HomeBackend DevelopmentPHP ProblemWhat should I do if curl in php cannot be opened?

Solution to the problem that php's curl cannot be opened: 1. Remove "libeay32.dll", "ssleay32.dll", "libssh2.dll" in the php directory and "php_curl.dll" in the ext directory. Copy all files to the "C:\Windows\System32" directory; 2. Restart Apache; 3. Use the "phpinfo()" function to check whether curl is successfully enabled.

What should I do if curl in php cannot be opened?

The operating environment of this tutorial: Windows 7 system, PHP version 8.1, Dell G3 computer.

What should I do if curl in php cannot be opened?

Solve the problem that the curl extension cannot be opened (Call to undefined function curl_init)

1. Problem

Recently built a local PHP environment (64-bit Win7 system, Apache24, PHP5.6) debugging program. Since the page needs to use curl, the relevant configurations in php.ini are modified.

extension=php_curl.dll
 
extension_dir = "G:/php/ext"

But after restarting Apache, there is still no curl_init function error (Fatal error: Call to undefined function curl_init() in xxxxxx). Use phpinfo() to check and find that the curl function is not turned on.

What should I do if curl in php cannot be opened?

2. Problem solving

(1) Replace libeay32.dll, ssleay32.dll, libssh2.dll in the php directory and php_curl in the ext directory Copy the four .dll files into the C:\Windows\System32 directory.

(2) Restart Apache, and then use the phpinfo() function to check that curl has been successfully enabled.

What should I do if curl in php cannot be opened?

Recommended study: "PHP Video Tutorial"

The above is the detailed content of What should I do if curl in php cannot be opened?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor