Php cannot enable php_curl

Source: Internet
Author: User
Php cannot enable php_curl.
In phpinfo, the Loaded Configuration File is C: \ Windows \ php. ini, so this is correct.
Modify php. ini
Remove Semicolon before extension = php_curl.dll
Remove Semicolon before extension = php_openssl.dll
Extension_dir = "D: \ AppServ \ php5 \ ext"

Php_curl.dll, libeay32.dll, ssleay32.dll, and php5ts. dll are stored in C: \ Windows \ System32, C: \ Windows \ SysWOW64, or even C: \ Windows \.

In the httpd. conf file of Apache, I added
LoadFile D:/AppServ/php5/libeay32.dll
LoadFile D:/AppServ/php5/ssleay32.dll

The above operations have been tried, but it still does not work.


Reply to discussion (solution)

Your Windows OS is 64-bit. delete all the 32-bit dll files copied to C: \ Windows \ System32.
This directory stores 64-bit data. if you put a 32-bit dll in it, it will lead to a mistake.
C: \ Windows \ SysWOW64 is a 32-bit compatible Directory
If you need LoadFile D:/AppServ/php5/libeay32.dll
Write LoadFile C:/Windows/SysWOW64/libeay32.dll

Your Windows OS is 64-bit. delete all the 32-bit dll files copied to C: \ Windows \ System32.
This directory stores 64-bit data. if you put a 32-bit dll in it, it will lead to a mistake.
C: \ Windows \ SysWOW64 is a 32-bit compatible Directory
If you need LoadFile D:/AppServ/php5/libeay32.dll
Write LoadFile C:/Windows/SysWOW64/libeay32.dll



I deleted all the four dll files in C: \ Windows \ System32 and C: \ Windows \.
In httpd. conf of Apache
LoadFile D:/AppServ/php5/libeay32.dll
LoadFile D:/AppServ/php5/ssleay32.dll
Changed
LoadFile C:/Windows/SysWOW64/libeay32.dll
LoadFile C:/Windows/SysWOW64/ssleay32.dll

But still not.

Your Windows OS is 64-bit. delete all the 32-bit dll files copied to C: \ Windows \ System32.
This directory stores 64-bit data. if you put a 32-bit dll in it, it will lead to a mistake.
C: \ Windows \ SysWOW64 is a 32-bit compatible Directory
If you need LoadFile D:/AppServ/php5/libeay32.dll
Write LoadFile C:/Windows/SysWOW64/libeay32.dll


Or it is related to my php version, and my php version is 32-bit.

I don't know how you installed php,
I did this,
PhpIniDir "d:/wamp/php"
LoadModule php5_module "d:/wamp/php/php5apache2_2.dll"

In php. ini, set:
Extension_dir = "d:/wamp/php/ext"

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

I don't know how you installed php,
I did this,
PhpIniDir "d:/wamp/php"
LoadModule php5_module "d:/wamp/php/php5apache2_2.dll"

In php. ini, set:
Extension_dir = "d:/wamp/php/ext"

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


My environment is installed with appserv
Later, the php version was earlier than 5.4.41.
--------------------
Phpini is the default C drive for windows.
LoadModule php5_module and extension_dir are correct.
The curl extension also enables 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 when apache is started


View apache error. log

PHP Warning: PHP Startup: in Unknown on line 0

Without any prompts, close the extension one by one. an error is reported when php_curl is loaded, and the curl in phpinfo () is not loaded.

Solution:


Copy libeay32.dll, libssh2.dll, php5ts. dll, php_curl.dll, and ssleay32.dll under the php installation directory to the system32 directory.

Load the following dependent files in 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 file is mainly php_curl.dll, which is not mentioned in the online solution.
Both methods can be solved, but I have installed multiple php versions on the local machine, so it is not suitable for putting them in system32, so I changed httpd. conf.

Try adding the php.exe path to the system variable

If you are not using 32-bit php in a 64-bit system, you are not free of privilege!

When php is configured in a 32-bit system, any file copy operation is wrong!

Even phpinfo does not have anything about curl, nor can it be directly searched by disable or enable.

If phpinfo does not exist, the installation fails or is not enabled. check it.

I don't know if the problem has been solved by the landlord. I noticed that PhpiniDir was placed on the LocadModule on the 4th floor, but redis was unexpectedly released. I didn't have curl or redis before, in any case, it solves the problem. try again and find out how to get the curl.

Curl not enabled
What is prompted on the page? You can use phpinfo to check whether curl extension is enabled.

Download the corresponding curl file from the official website

Reinstallation is a versatile method

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.