1

i tried all i.e : - Move php_pthreads.dll to the 'bin\php\ext\' directory. - Move pthreadVC2.dll to the 'bin\php\' directory. - Move pthreadVC2.dll to the 'bin\apache\bin' directory. - Move pthreadVC2.dll to the 'C:\windows\system32' directory. - 'extension=php_pthreads.dll' placed the line in php.ini

and after all i also restarted xampp but still error Class 'Thread' not found

1 Answer 1

2

pthreads to NOT work with webservers like Apache. They only work with CLI.

See http://php.net/manual/en/intro.pthreads.php:

Warning: The pthreads extension cannot be used in a web server environment. Threading in PHP is therefore restricted to CLI-based applications only.

Sign up to request clarification or add additional context in comments.

4 Comments

I'm using it in local server in xampp
@SahilDhiman it won't work, see the first warning on php.net/manual/en/intro.pthreads.php
Did you add extension=php_pthreads.dll to the correct php.ini for your CLI install?
i added it in the xampp/php/php.ini file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.