guanpengchn / guanpengchn/guanpengchn.github.io

xampp install pthreads for php

Open
#5 2 comments 0 reactions 0 assignees View on GitHub
study
Dominant language
HTML
Stars
18
Forks
9
PR merge metrics
No merged PRs in 30d

Description

## 1. Check the runtime enviroment

* php version

```bash
D:\xampp\php>php -v
PHP 5.6.34 (cli) (built: Jul 18 2013 10:56:37)
```

The php of xampp is 32-bit by default.

* windows version

![1-version](https://user-images.githubusercontent.com/13995641/43958284-68acd9c0-9cdd-11e8-9930-de1f6bd8e171.png)

It determines the location of "pthreadVC2.dll".

## 2. Download the file

File url : [http://windows.php.net/downloads/pecl/releases/pthreads/](http://windows.php.net/downloads/pecl/releases/pthreads/)

Download [php\_pthreads-2.0.9-5.6-ts-vc11-x86.zip](https://windows.php.net/downloads/pecl/releases/pthreads/2.0.9/php_pthreads-2.0.9-5.6-ts-vc11-x86.zip) according to the above version.

## 3. Install

* Copy "pthreadVC2.dll" to "D:\xampp\php\"
* Copy "php\_pthreads.dll" to "D:\xampp\php\ext\"
* Add "extension=php\_pthread.dll" to "php.ini"
* Add "LoadFile D:/xampp/php/pthreadVC2.dll" to "httpd.conf"
* Restart Apache

## 4. Test

Official test code:

```php
arg = $arg;
}

public function run(){
if($this->arg){
printf("Hello %s\n", $this->arg);
}
}
}
$thread = new AsyncOperation("World");
if($thread->start())
$thread->join();
?>
```

If it has error, you can use the following command to check it out.

```
D:\xampp\php>php -m
```

You can make sure if the pthreads module have been loaded.

Contributor guide

No contributing guide indexed for this repository

Research direction

No repository file or test is mentioned. Start by reviewing the XAMPP, PHP, pthreads, php.ini, and httpd.conf instructions, then check the stated php -v and php -m verification steps. Done means the guide is internally consistent and provides a reproducible installation and validation path.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.