How to solve the problem that php extension cannot be started in windows

Source: Internet
Author: User
Tags iis ini mcrypt

Php_curl.dll extension

When phpnow is used in windows to configure the server, some extensions may fail to be started. This is recorded in apache logs (error. log), for example, php_curl.dll extension:

PHP Warning: PHP Startup: Unable to load dynamic library '.../../php/ext/php_curl.dll'-running in Unknown on line 0
Solution:

1. First, find the dependencies of this extension. For example, php_curl.dll must depend on libeay32.dll and ssleay32.dll;

2. Two methods (the second method is better ):

1. Copy the extension and dependency extension to the windowssystem32 directory on the system disk.

The second is to add the two dependencies before the import module in httpd. conf:

LoadFile ../php/ssleay32.dll
LoadFile ../php/libeay32.dll

Curl, OpenSSL, xmlrpc, and other expansion solutions

1. Copy the files in the ext or root directory of the php installation directory to the % system %/system32 directory: php_openssl.dll, libeay32.dll, ssleay32.dll, php_xmlrpc.dll, and php_curl.dll;
2. Copy php. ini to the windows folder, open php. ini, and remove the semicolon before expanding some columns such as "; extension = php_openssl.dll;
3. Restart IIS or Apache!
 
How to restart Apache: Open the bindirectory under the apacheprogram folder and start the apachemonitor.exe program. The Apache controller appears in the lower right corner of the system, and you can operate on it.


Solution to failure to load mcrypt


Tip: The mcrypt (external link, English) extension cannot be loaded. Check your PHP configuration.
In the php. Ini file under the C:/WINDOWS directory,
The previous ";" in "; extension = php_mcrypt.dll" is not removed
Therefore, the corresponding function cannot be used. The solution is to open the php. Ini file and find it; extension = php_mcrypt.dll is changed
Extension = php_mcrypt.dll remove the previous one to make it take effect
After modifying PHP. INI, restart the computer ..

If not, the libmcrypt. dll file can be missing in the system's system32 (usually C:/WINDOWS/system32) directory. The solution is to find libmcrypt. dll in the php Directory, copy it to the C:/WINDOWS/system32 directory, and restart IIS.

Solution:

Win system:
Open c:/windows/php. ini
Set
; Extension = php_mbstring.dll
Change
Extension = php_mbstring.dll
Unix:
Open/etc/php. ini
Set
; Extension = php_mbstring.so
Change
Extension = php_mbstring.so

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.