Not able to install pThread on Windows Xampp - php

Update: Looks like I am not doing anything wrong here. When I execute a thread example, it works fine. I am not sure, then why am I getting those errors when I start Apache.
Any ideas?
I am trying to install pThread on Xampp (Windows 7) as follows:
My PHP version information: 5.4.7 VC9 x86
I have downloaded php_pthreads-0.0.45-5.4-ts-vc9-x86.zip
Then I added pthreadVC2.dll to C:\xampp\php and php_pthreads.dll to C:\xampp\php\ext
In php.ini, I have added extension=php_pthreads.dll
Restarted Apache server and received following error:
Any suggestions on why this is not working?

I do not use Windows, but according to the people commenting in the manual, you must also add:
LoadFile "C:/xampp/php/pthreadVC2.dll"
to your httpd.conf (httpd-xampp.conf the manual mentions)

Here is what I did and works for me:
Check your PHP's compiler version using phpinfo() as you have already done. Mine and your both is VC9
Download and install proper Pthread package that matches your compiler version. I downloaded "php_pthreads-0.0.45-5.4-ts-vc9-x86.zip" file. Make sure your OS version also mathes (32-bit or 64-bit).
Extract Zip file in a temp folder
Copy php_pthreads.dll to the 'bin\php\ext\' folder
Copy pthreadVC2.dll to the 'bin\php\' folder
Copy pthreadVC2.dll to the 'bin\apache\bin' folder
Copy pthreadVC2.dll to the 'C:\windows\system32' folder
Open php\php.ini and add "extension=php_pthreads.dll" without quotes at the end of file
Restart server and you won't get any error message.
Good luck

copy "pthreadVC2.dll" file to "windows/system32" directory.then restart apache. It worked for me.

Related

Unable to load dynamic library php_ffmpeg.dll [duplicate]

I have installed xampp 1.7.4 with php version 5.3.5 on windows xp.
How to install ffmpeg in xampp with php 5.3.5 on windows xp?
Sodobni-mediji.si's method worked, but some things need to be clarified.
Download: https://rapidshare.com/#!download|934l34|422916798|php_ffmpeg_v0.6.0_for_PHP_5.3.1.rar
unzip
copy ffmpeg.exe somewhere and remember the path for later use
move php_ffmpeg.dll to php extension dir (usually c:\xampp\php\ext)
move all other files to Windows\System32 (except COPYING.GPLv3.txt, readme.txt)
add extension=php_ffmpeg.dll to php.ini (usually c:\xampp\php\php.ini)
restart apache with fingers crossed
questions/answers http://www.apachefriends.org/f/viewtopic.php?f=16&t=41913
If you are using windows 64bit, you will also need to to copy all of those dll files to C:\Windows\SysWOW64 along with C:\Windows\System32.
You will probably have problems with toGdImage(), I have no idea how to fix this...
If above solution not working, one thing you can do is as below:
Go to this url: http://ffmpeg.zeranoe.com/builds/
Download 32 or 64 bit (as per your system) static FFMPEG.
After download you can see "ffmpeg.exe' file, copy and paste this file in your xampp directory. (e.g. C:\xampp)
Then, set "C:\xampp" this path in your application.
Enjoy..
Go to apachefriends.org You will find a link to ffmpeg 0.6.0 for php 5.3.1 there.
Copy php_ffmpeg.dll to xampp\php\ext.
Copy ffmpeg.exe into root of your site or anywhere else as long you know where (you will have to define path to it in your php file)...
Copy everything else to windows/system32.
Add "extension=php_ffmpeg.dll" or remove ";" on the beginning of that line in php.ini file (xampp\php\php.ini )
Restart apache server... and voila :)
It worked for me on PHP 5.3.1 and 5.3.5 :)
I found this on apachefriends.org
Good luck :)
You can follow steps from here or do the following steps.
Download ffmpeg from here: https://ffmpeg.org/download.html
Copy php_ffmpeg.dll from the php5 folder to the C:\wamp\bin\php\php5.2.9-2\ext
Copy files from common to the windows/system32 folder
Add extension=php_ffmpeg.dll to php.ini file ( \apache...php.ini )
Restarted all services (Apache, PHP...)
And enable "extension=php_ffmpeg.dll" directive in your php.ini.

Enabling CURL with PHP 5.6 on Windows 8

I have Apache 2.4.12 and php 5.6.9 on my Windows 8 computer and I'm trying to enable the curl extension for php however, I haven't had much success. After searching the internet for this issue it appears that other's have had the same trouble. Here are the suggestions I've found:
Uncomment ;extension=php_curl.dll in php.ini
Uncomment ;extension_dir = "ext" in php.ini
Download and replace the php_curl.dll file in the ext directory of php with one from this website
Add to the PATH environment variable where php is installed
Copy libeay32.dll and ssleay32.dll from where php is installed to C:\Windows\System32
I've tried every single suggestion with no success except the third item in the list because it doesn't have a .dll file for curl with php 5.6, in fact the highest version avaible is one for php 5.4. There has to be way to enable this extension without having to downgrade my php version to 5.4 and using a .dll file from that website. I've tried searching the internet for a .dll file like the one on the linked website for php 5.6 opposed to a version of php that's outdated but I've had no luck in finding one so I'd like help with this issue.
How can I enable curl for php 5.6 on my Windows 8 machine?
Locate your php folder and follow these instructions:
Move to Windows\system32 folder:
libssh2.dll, php_curl.dll, ssleay32.dll, libeay32.dll
Move to Apache24\bin folder
libssh2.dll
Uncomment extension=php_curl.dll
Note: Don't overwrite when prompted.
Source
I give you an example of a set up that just worked perfectly for me :
downloaded the VC11 x86 Thread Safe version of PHP,
unzipped it within a directory C:\php,
edited the php.ini-development, uncommenting 2 lines :
extension=php_curl.dll
extension_dir = "ext"
saved this file under php.ini.
I just tested it via the CLI (windows CMD here) on a PHP a file (i.e. C:\php\php myFile.php) and cURL worked.
If you have Apache installed and prefer to test it in a browser, you obviously have to adapt this installation with your own files structure and to do not forget to restart Apache.
Running apache service with a specific user other than local system solved the problem for me. You can test this easily by stopping the apache service and running manually <apache dir>\bin\httpd.exe.
I fixed this problem by adding C:\php and C:\php\ext to PATH system variables.
Press window + pause to bring up the System Properties page.
Click Advanced System Settings
Click Environment Variables
You'll see the Path variable in the System Variables box in the bottom.
Append your PHP path to that variable. Now the system will be able to load the extensions.
In addition to uncommenting the line
;extension_dir = "ext"
Try also setting it to the absolute path of the PHP installation's ext folder and then restarting apache.
e.g.:
extension_dir = "C:\PHP 5.6.19\ext"

PHP Install SSH2 on Windows machine

I am trying to install this on a Windows+Apache machine.
Documentation says that SSH2 requires the OpenSSL and libssh2 libraries.
I have added this lines in my php.ini file:
extension=php_openssl.dll
extension=php_ssh2.dll
and restarted Apache but it still not working (Fatal error: Call to undefined function ssh2_connect()).
Can anyone explain me how to install this service?
Here's how I did it:
Downloaded Win32 SSH2 PECL extension from this location
(choose the appropriate version);
Extracted the archive's content and:
placed php_ssh2.dll and php_ssh2.pdb files in the ext folder (e.g. C:\php\ext);
copied libssh2.dll file to C:\Windows\system32 and (if you got Win64) C:\Windows\SysWOW64 folder(s);
Run the following command to register the DLL:
C:\> regsvr32 libssh2.dll
Restarted Apache.
Final note
If you got PHP x64, you have to lookup for the x64 version of the SSH2 library / DLLs.
This site offers some Win64 compiled libraries for PHP, try here first.
Hope this helps.
If anyone is having trouble installing SSH2, here's how I did it:
1) Download SSH2 PECL library from PHP.net [choose the appropriate version].
2) Copy libssh2.dll to System32 [x86] or SysWOW64 [x64] folder.
3) Copy php_ssh2.dll and php_ssh2.pdb to php/ext folder.
4) Remove ';' from the ;extension=php_ssh2.dll line in php.ini. If this line is not on your php.ini, add it.
5) Restart Apache.
Place php_ssh2.dll in ext folder
Place libssh2.dll in php folder
Restart IIS
that work for me
PHP 5.4.25 NTS + Windows Server 2012
If you are running xamp 3.2.1 and PHP 5.6.8, this could be helpful for you.
Do what alex b said, and download the package that corresponds dependindg your php version (and bits) from this page (link)
I've downloaded and replaced in C:\xampp\php\ext and it worked!
Hope this helps, regards.
libssh2 (deps): http://windows.php.net/downloads/php-sdk/deps/
php_ssh2 (ext): http://windows.php.net/downloads/pecl/releases/ssh2/0.12/
Versions prior to 5.5 has already the libssh2.dll (from the second link)
I have wamp with PHP 5.6.25/7.0.10 – MySQL 5.7.14 installed and I cm currently working on PHP 7.0. I had the same error. I checked using phpinfo() if both librarires OpenSSL and libssh2 was working(you can google how to check it). After I could see they was working, I have downloaded php_ssh2.dll at http://pecl.php.net/package/ssh2/1.0/windows (can also be found http://windows.php.net/downloads/pecl/releases/ssh2/ ) for the 7.0 version, put it to php\ext folder. Than I included it in php.ini file using extension=php_ssh2.dll.
Then it appeared at phpinfo(). And it worked. Hope it helps.
Fix that worked for me. Am running xampp v. 3.2.1 apache 2.2 facing the same issue tried placing the dll files at different c: location but failed finally this helped.
1.) Download the version specific dll files from http://pecl.php.net/package/ssh2/0.12/windows and extract the files
Note that even though you are in 64 bit version of windows download the 32 version of THREAD SAFE ssh i.e. Thread Safe (TS) x86 as per your version of php
2.) Add/replace the libssh2.dll at C:\xampp\php (standard installation)
3.) Add/replace the php_ssh2.dll & php_ssh2.pdb within the C:\xampp\php\ext (standard installation)
4.) restart the apache server
Worked Like a charm
CHEERS
First of all, your question reveals two misconceptions:
The Requirements section actually says this:
The » OpenSSL and » libssh2 libraries are required. Ensure that the
development libraries are installed, where a typical package name
might be openssl-dev.
It isn't talking about PHP extensions, it's talking about third-party libraries that have nothing to do with PHP.
extension=php_ssh2.dll requires that you actually have a file called php_ssh2.dll in your PHP's ext directory and you probably don't have it, mainly because it isn't bundled with PHP.
If we check the Installation chapter we can read that SSH2 is a PECL extension. There're a few links with instructions but I can make a summary of the important info:
You need a php_ssh2.dll file that matches your PHP installation.
Neither the PHP team nor the PECL team distribute such file.
Installing PECL extensions on Windows is hard. You need to download the C source code, grab a C compiler and make the file yourself, or find someone who already did it for you.
Said that, unless you Google for php_ssh2.dll and find something relevant, you're probably out of luck.

Install FFMPEG on XAMPP

I have installed xampp 1.7.4 with php version 5.3.5 on windows xp.
How to install ffmpeg in xampp with php 5.3.5 on windows xp?
Sodobni-mediji.si's method worked, but some things need to be clarified.
Download: https://rapidshare.com/#!download|934l34|422916798|php_ffmpeg_v0.6.0_for_PHP_5.3.1.rar
unzip
copy ffmpeg.exe somewhere and remember the path for later use
move php_ffmpeg.dll to php extension dir (usually c:\xampp\php\ext)
move all other files to Windows\System32 (except COPYING.GPLv3.txt, readme.txt)
add extension=php_ffmpeg.dll to php.ini (usually c:\xampp\php\php.ini)
restart apache with fingers crossed
questions/answers http://www.apachefriends.org/f/viewtopic.php?f=16&t=41913
If you are using windows 64bit, you will also need to to copy all of those dll files to C:\Windows\SysWOW64 along with C:\Windows\System32.
You will probably have problems with toGdImage(), I have no idea how to fix this...
If above solution not working, one thing you can do is as below:
Go to this url: http://ffmpeg.zeranoe.com/builds/
Download 32 or 64 bit (as per your system) static FFMPEG.
After download you can see "ffmpeg.exe' file, copy and paste this file in your xampp directory. (e.g. C:\xampp)
Then, set "C:\xampp" this path in your application.
Enjoy..
Go to apachefriends.org You will find a link to ffmpeg 0.6.0 for php 5.3.1 there.
Copy php_ffmpeg.dll to xampp\php\ext.
Copy ffmpeg.exe into root of your site or anywhere else as long you know where (you will have to define path to it in your php file)...
Copy everything else to windows/system32.
Add "extension=php_ffmpeg.dll" or remove ";" on the beginning of that line in php.ini file (xampp\php\php.ini )
Restart apache server... and voila :)
It worked for me on PHP 5.3.1 and 5.3.5 :)
I found this on apachefriends.org
Good luck :)
You can follow steps from here or do the following steps.
Download ffmpeg from here: https://ffmpeg.org/download.html
Copy php_ffmpeg.dll from the php5 folder to the C:\wamp\bin\php\php5.2.9-2\ext
Copy files from common to the windows/system32 folder
Add extension=php_ffmpeg.dll to php.ini file ( \apache...php.ini )
Restarted all services (Apache, PHP...)
And enable "extension=php_ffmpeg.dll" directive in your php.ini.

intl extension: installing php_intl.dll

I'm trying to locate php_intl.dll and install it.
Does anyone have any tips?
For the php_intl.dll extension to work correctly, you need to have the following files in a folder in your PATH:
icudt36.dll
icuin36.dll
icuio36.dll
icule36.dll
iculx36.dll
icutu36.dll
icuuc36.dll
By default they're sitting in your PHP directory, but that directory isn't necessarily in your PATH (it wasn't for me, using xampp)
This has to be in your global path, not just your user's path. To set the global path, go to system info (windows key + PAUSE), then Advanced System Settings (Vista+) or Advanced (XP) and click the "Environment Variables" button and add the appropriate directory to the PATH variable in the System Variables list.
The packages at http://windows.php.net/download/ all contain the php\_intl.dll which is located in the subdir ext/.
All you have to do is to check if your extension_dir points to the right directory and add (or uncomment) the extension=php\_intl.dll directive.
I have XAMPP 1.8.3-0 and PHP 5.5.0 installed.
1) edit php.ini:
from
;extension=php_intl.dll
to
extension=php_intl.dll
Note: After modification, need to save the file(php.ini) as well as need to restart the Apache Server.
2) Simply copy all icu* * * *.dll files:
from
C:\xampp\php
to
C:\xampp\apache\bin
Then intl extension works!!!
Had the same issue ... I found the files needed by searching my drive for icu**.dll and found the ones listed above but with 46 instead of 36 in the php folder. I copy pasted them to the apache/bin file and tried starting apache and it finally started. On the Server Checks page it has now changed from Yellow Check to Green OK. Hope this helps.
If you read error message, "icuuc36.dll" is missing.
The problem is that you don't have the PHP dir in your PATH, or you can copy all "intl" files from php directory to apache\bin directory.
They are :
icudt36.dll
icuin36.dll
icuio36.dll
icule36.dll
iculx36.dll
icutu36.dll
icuuc36.dll
The package is already included in the extensions for PHP 7.2 and above and you just need to uncomment the following line in php.ini
extension=intl
I resolved this issue by adding PHP directory to PATH variable.
I just appended ;C:\xampp\php to Path variable in Windows Environment Variables.
For WampServer 2.5 (Apache 2.4.9 and PHP 5.5.12):
In default I've had php_intl enabled (you can enable it when you left click on the wamp icon in the system tray > PHP > PHP extensions and check if is it marked)
To have it properly working, I've had to copy:
C:\wamp\bin\php\php5.5.12\icu**51.dll
(total 8 files)
to
C:\wamp\bin\apache\apache2.4.9\bin
Then just restart the wamp and everything was just fine.
You can type this command in terminal: sudo apt-get install php-intl
I have PHP 5.3.1 and Apache
When I add the extension=php_intl.dll to php.ini and restart apache, it comes an alert that says "the requested operation has failed"
And this error on Event Monitor:
Faulting application name: httpd.exe, version: 2.2.14.0, time stamp: 0x4ac181d6
Faulting module name: php5ts.dll, version: 5.3.1.0, time stamp: 0x4b051b35
Exception code: 0xc0000005
The problem was some DLLs like icudt36.dll were missing (noticed with sysinternals ProcMon), I've downloaded php 5.3.1 zip version and extract all DLL's to PHP folder. That solved the problem.
When I faced this issue it was sorted out by using below mentioned steps:
Edit php.ini:
Make
;extension=php_intl.dll
to
extension=php_intl.dll
Simply copy all icu* * * *.dll files(any icu file with dll extension) from
C:\xampp\php to C:\xampp\apache\bin
Also If you have the msvcp110.dll missing file error. You have to download the right .dll or just go here http://www.microsoft.com/es-es/download/confirmation.aspx?id=30679 and install the vcredist_x64.exe and vcredist_x86.exe.
Now the intl extension should work :-)
I have IIS 7 and installed PHP using Microsoft Web Platform Installer on Windows 7. In IIS, go to PHP Manager in settings main page -> PHP Extensions -> Enable or Disable an Extension.
Intl extension is disabled by default.
I hope this helps
If you have the msvcp110.dll missing file error. You have to download the right .dll or just go here http://www.microsoft.com/es-es/download/confirmation.aspx?id=30679 and install the vcredist_x64.exe and vcredist_x86.exe, it worked for me.
There is a better way of doing this.
I was having same kind of problem with ldap, intl, curl php extensions. I've solved those issues by the following ways:
At first you've to check whether these extensions have been enabled in the php.ini file by removing semicolon (;) in front of the following lines:
;extension=php_intl.dll
;extension=php_ldap.dll
;extension=php_curl.dll
Now you can directly load those necessary dll files (ie libeay32, libssh2, ssleay32, icu**.dll ) from your httpd.conf (apache configuratio file) file. You don't have to do any other things like copying them to the apache's bin directory or php's ext directory. Just add them directly in you apache's httpd.conf file.
Please note that the followng example is for php version 5.5.x.
LoadFile "C:/php/icudt51.dll"
LoadFile "C:/php/icuin51.dll"
LoadFile "C:/php/icuio51.dll"
LoadFile "C:/php/icule51.dll"
LoadFile "C:/php/iculx51.dll"
LoadFile "C:/php/icutest51.dll"
LoadFile "C:/php/icutu51.dll"
LoadFile "C:/php/icuuc51.dll"
LoadFile "C:/php/libeay32.dll"
LoadFile "C:/php/libssh2.dll"
LoadFile "C:/php/ssleay32.dll"
That's it. Now, restart your apache or wamp and you're good to go.
In my case adding PHP directory to PATH in user environment didn't work. After some testing I've found that it should be added to system PATH (I don't know what's the name of this part of system setting windows, 'couse I have Polish Windows).
/Digger here/
Moving the icu*****.dll files to /ext/ seems to resolve the issue as well.
( If you specified the extension directory to be there of course )
In my xampp control panel, Click config to open php.ini
remove ; in
;extension=php_intl.dll
Then restart the apache.
Under php extensions in your wampserver, ensure intl is checked
check your extension_dir in your php/v7.0/php file ensure the directory is not commented and it is accurate
(Dont know if this contributed but i did all three)In your extension list in the same file as 2 above, include the intl file in the same format as the rest(if it is not included).
All the best
I was having trouble getting intl to run using PHP 7.1.7 and PhpStorm on Windows 10. Based on other answers here I could tell it was a PATH/DLL dependency problem but I couldn't seem to find all of the required files even after (re-)installing the Visual C++ Redistributable.
I eventually went searching my C: drive for vcr*.dll and found a copy of vcruntime140.dll in my C:\Program Files\Mozilla Firefox directory. So, in addition to making these changes to php.ini:
extension_dir = "ext"
extension=php_intl.dll
I also set my runtime PATH to ONLY the PHP directory (in my case, C:\Program Files\PHP\7.1.7) and the Firefox directory (above) and it FINALLY worked! I know it needs more than just the vcruntime140.dll but the other required DLLs must be in the FF directory too (there are a few dozen but I didn't bother to figure out which ones are essential).
You have to modify the php.ini file by removing the semi-colon on the line containing
extension=php_intl.dll
After this, go to the php folder of Xamp or Wamp or EasyPHP, copy every dll file containing
icu*,
Paste them inside your windows file.
That worked for me.
Configuration : EasyPHP Dev Server, Windows 10.

Categories