PHP Cannot open Php_curl

Source: Internet
Author: User
Tags phpinfo
I've seen a lot of ways online.
Phpinfo inside loaded Configuration file is C:\Windows\php.ini so this is no problem.
Modify the php.ini.
Extension=php_curl.dll front, semicolon.
Extension=php_openssl.dll front, semicolon.
Extension_dir = "D:\AppServ\php5\ext"

Php_curl.dll,libeay32.dll,ssleay32.dll,php5ts.dll These 4 files I put in c:\windows\system32,c:\windows\syswow64 and even C:\Windows. I put it all on.

In Apache's httpd.conf file, I joined the
LoadFile D:/appserv/php5/libeay32.dll
LoadFile D:/appserv/php5/ssleay32.dll

All of the above have been tried or not.


Reply to discussion (solution)

Your Windows is 64-bit, please delete all the 32-bit DLLs copied to C:\Windows\System32
Because the directory is stored in 64-bit, if you put a 32-bit DLL in it, it's a drag.
C:\Windows\SysWOW64 is a 32-bit compatible directory
If you need LoadFile D:/appserv/php5/libeay32.dll
Then should write LoadFile C:/windows/syswow64/libeay32.dll

Your Windows is 64-bit, please delete all the 32-bit DLLs copied to C:\Windows\System32
Because the directory is stored in 64-bit, if you put a 32-bit DLL in it, it's a drag.
C:\Windows\SysWOW64 is a 32-bit compatible directory
If you need LoadFile D:/appserv/php5/libeay32.dll
Then should write LoadFile C:/windows/syswow64/libeay32.dll



I deleted the 4 DLLs that I put in C:\Windows\System32 and C:\Windows\.
In Apache's httpd.conf.
LoadFile D:/appserv/php5/libeay32.dll
LoadFile D:/appserv/php5/ssleay32.dll
Changed it.
LoadFile C:/windows/syswow64/libeay32.dll
LoadFile C:/windows/syswow64/ssleay32.dll

But it's still not working.

Your Windows is 64-bit, please delete all the 32-bit DLLs copied to C:\Windows\System32
Because the directory is stored in 64-bit, if you put a 32-bit DLL in it, it's a drag.
C:\Windows\SysWOW64 is a 32-bit compatible directory
If you need LoadFile D:/appserv/php5/libeay32.dll
Then should write LoadFile C:/windows/syswow64/libeay32.dll


Or with my PHP version, I'm under 32-bit.

I don't know how you installed PHP,
That's what I did.
Phpinidir "d:/wamp/php"
LoadModule php5_module "D:/wamp/php/php5apache2_2.dll"

Then set in php.ini:
Extension_dir= "D:/wamp/php/ext"

Turn on the curl extension and add the d:/wamp/php to the environment variable PATH.

I don't know how you installed PHP,
That's what I did.
Phpinidir "d:/wamp/php"
LoadModule php5_module "D:/wamp/php/php5apache2_2.dll"

Then set in php.ini:
Extension_dir= "D:/wamp/php/ext"

Turn on the curl extension and add the d:/wamp/php to the environment variable PATH.


My environment is installed with Appserv.
Then the PHP version was low, and I switched to 5.4.41.
--------------------
Phpini is the default C disk under Windows
LoadModule Php5_module and Extension_dir are right.
The Curl extension also opens the PHP path in the environment variable path

The same problem happened last week:

Windows XP 32

apache2.2

php5.4.36 vc9 Thread Safe



Prompt warning PHP startup during Apache startup


View Apache Error.log

PHP warning:php startup:in Unknown on line 0

Without any hint, turn off the extension one after the other, find the php_curl load times wrong, and phpinfo () in curl does not load on

Workaround:


Copy the Libeay32.dll,libssh2.dll,php5ts.dll,php_curl.dll,ssleay32.dll from the PHP installation directory to the System32 directory

Load the following dependent files in the httpd.conf

LoadFile C:/php5.4.36/php5ts.dll

LoadFile C:/php5.4.36/libeay32.dll

LoadFile C:/php5.4.36/ssleay32.dll

LoadFile C:/php5.4.36/libssh2.dll

Note that the main is Php_curl.dll, the online solution has not mentioned this file
Two methods can be solved, but I installed a number of versions of PHP, so it is not suitable to put on the System32, the change of httpd.conf

Try adding php.exe paths to System variables

Please do not use 32-bit PHP friend silence in 64-bit system!

When you configure PHP on a 32-bit system, any copying of files is wrong!

There's nothing in phpinfo about curl, not a disable or an enable to search directly.

Phpinfo, it means the installation has failed or is not open, check it.

Do not know the landlord this problem solved no, I noticed the 4 floor put Phpinidir on the top of the locadmodule, the accident is the Redis out, and before I was curl and redis have no, no matter how said, is solved a, then find, How to get curl out of it.

No curl is turned on
What does the page suggest? You can see if the curl extension is turned on by phpinfo

To the official download of the corresponding version of the Curl file

Re-assembly is a universal method

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.