PHP compiles and installs dll files under windows

WBOY
Release: 2016-07-28 08:29:12
Original
1922 people have browsed it

This article will record the following content:

1. What does Visual C++ 2008 do to php?

Solution to the problem that php5apache2_2.dll cannot be loaded when Apache starts up
This component package is a software package that is released together with the application software to end users. Users only need Install this and your app to run the app you made.
After you compile and link the application program with VC++2008 to generate an executable file, if you want to allow it on a computer that does not have VC++2008 installed, you need this software package.
At present, the PHP binary source code of php.net is the x86 version, which can be seen from the naming of the compressed package and installation file, so generally download the x86 version of the c++2008 runtime environment.

2. What does vcredist_x86 do

Installing apache requires VC10 SP1 vcredist_x86.exe. If you encounter a situation where you cannot install apache, download and install it.

vcredist_x86.exe is an optimization patch execution program for different CPUs. It is a library file required by C++-based software. Some programs can only run when the corresponding vcredist file environment is installed.

Currently vcredist_x86.exe is mostly used for system patches based on x86 platforms such as winxp. Therefore, installation under VISTA system is not supported.

Usually you will encounter this situation when playing games. It will be fine. You can rest assured that you can install it next time.

3. The main conditions and installation methods for installing pthread.dll file in php under window and use it.

Conditions:

php5.3 or above, and it is a thread-safe version. The compilers used by apache and php must be consistent.
If Thread Safety is enabled through phpinfo(), it is a thread-safe version.
You can know the compiler used by viewing the Compiler item through phpinfo(). Mine is: MSVC9 (Visual C++ 2008).

Download and install the pthreads.dll file http://windows.php.net/downloads/pecl/releases/pthreads

Find the version you want to install: such as

php_pthreads-2.0.9-5.4-ts-vc9 -x86.zip

5.4 represents your php version, ts indicates thread safety, vc9-x86 represents the compiler version

Copy the php_pthreads.dll to the ext folder of php, and enable the php.ini extension . extension=php_pthreads.dll

Put the directory of pthreadVC2.dll into the environment variable or load the file in Apache.

Test pthreads

class AsyncOperation extends Thread {
public function __construct($arg) use using using ’’s ’ out out out out out through ’ ’s ‐ ‐ off's' ‐ ‐‐ ‐ ‐ to to test pthreads

if($this->arg } ())
$thread->join();
?>

Output helloWorld as success. Test using a multi-threaded for loop and a single for loop. The larger the cycle number, the time difference between the two is still very obvious


The above has introduced how to compile and install dll files in PHP under Windows, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.


Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!