installing PHP APC extension on windows - php

I want to install the APC extension for PHP. I've got to this page and I'm a little stuck.
I've downloaded a file from here, which gives me a APC-3.1.9.tgz file.
I've extracted the file. However from the page I've mentioned above, I'm given the impression I need to load a .dll file.
I'm lost and confused, what should I be doing?
OS: Windows Vista
Server: Apache
PHP: 5.3.5

You can download the compiled dll from downloads.php.net.

From http://www.php.net/manual/en/apc.installation.php
A DLL for this PECL extension is currently unavailable. See also the
building on Windows section.
In other words: no easy way on Windows

I downloaded the file from above mentioned http://downloads.php.net/pierre/. The zip contains two folders: "nts" and "ts" (probably "tread safe" and "non thread safe") with php_apc.dll file.
You must put this file in your PHP extensions folder (for exemple c:\wamp\bin\php5.4.1\ext) and edit PHP.ini file to add or uncomment the line:
extension=php_apc.dll
After restarting web service (Apache, IIS, etc.) you can check the PHP configuration with
<?php phpinfo(); ?> to see if "apc" block appeared

Here's hoping people looking for APC for Windows are still checking this post.
I just found APC 3.1.9 for Windows here:
http://dev.freshsite.pl/php-accelerators/apc.html
Confirmed working on Apache 2, PHP 5.3.8, Windows 7 (32-bit).

try this Alternative PHP Cache (APC) 3.1.9 extension
https://code.google.com/p/xampp-php-extensions/downloads/detail?name=php_apc.dll&can=2&q=

Related

intl extension: installing php_intl in Moodle

I have WAMPSERVER 3.0.6 64 bit.
I have updated PHP version 5.6.25 from 7.0.10.
I have installed updated version of Moodle 3.4 and have tried to run but getting the issue is following -
Intl extension is required to improve internationalization support, such as locale aware sorting and international domain names.
For resolving this issue I have tried so many tips but could not resolve this issue.
Even after doing the steps in moodle doc
if it is not working, Try to do this.
Change the directory to php folder(server/PHP/) and type the this command
deplister.exe ext\php_intl.dll
It list down all the .dll files in moodle.
If there is any file 'Notfound', Download missing dlls from : dllfiles.com
For 64-Bit windows you have to download 32-Bit file + 64-Bit file
Copy msvcp140.dll (32-bit file) into C:/Windows/SYSWOW64
Copy msvcp140.dll (64-bit file) into C:/Windows/System32
Check if it is using deplister.exe ext\php_intl.dll command.
Refresh and see the environment by Site Administration->Server -> Environment
Maybe this will be a late answer. Anyways, if someone stll looking for information, these steps could help:
open PHP.ini in edit mode using notepad or whatever editor
add:
extension= php_intl.dll
Then add:
[intl]
intl.default_locale = en_utf8
intl.error_level = E_WARNING
You may need to restart the webserver
It will work fine
In my case, I realized I did not have all the necessary .dll files. To check missing files go to xampp/php in your cmd terminal and type deplister.dll ext\php_intl.dll
See image
You will see list of all both available and missing files marked as Ok or Notfound
then download the files from here https://www.dll-files.com/search/?q=string. Extract the files and place the .dll file at windows/system32. Remember this requires administrative privileges.

How to install PHP 7 extension "memcache" on Windows

I'm having huge problems installing memcached extension for php.
Currently using:
OS: Windows 10 x64
PHP: 7.0.1 via XAMPP
Apache: 2.4.18 (Win32)
I have successfully installed memcached in C:/memcached the service is running.
But the problem starts when trying to add the memcache php extension. I've tried numerous versions of php_memcache.dll and non seem to be working. I did include the extension in php.ini extension=php_memcache.dll
When i run php -m memcache is not listed and at the top i recieve the error:
PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_memcache.dll' - The specified module could not be found.
And when I try running a test.php for memcache initialization i recive the Class not found exception
This is a huge problem, because I need it for running selenium tests.
The memcached service doesn't actually install the PHP memcached extension for you. It only installs the memcached server used to store your cache.
You'll need to download the Windows DLL from the PECL repository first (click on the blue Windows DLL link). Then you must add the extension=php_memcache.dll line to the correct php.ini file for your SAPI. Also, note the extension DLL file needs to be placed in the correct path for your XAMPP installation.
For Apache, simply create a script in your document root with the line <?php phpinfo(); and try loading that in your web browser. You should see a line at the top labeled Loaded configuration (php.ini) which gives you the full path to your loaded php.ini file. On Windows the path may actually appear different than what is stated in phpinfo() if you installed PHP through something like XAMPP. So you may need to rely on XAMPP to locate the correct php.ini file.
For the CLI SAPI, you can use php.exe --ini to do the same. Again, you may need to rely on the XAMPP package if it has modified your configuration path (since this is a compile time directive).
After making your changes to php.ini you will need to restart PHP for the changes to take effect.
Since you're using PHP 7 on Windows it's probably also important to note that the compiled DLL from PECL may not actually work under apache for Windows, because you're more than likely using a theaded SAPI. So make sure you are downloading the correct version. As far as I can tell that version is only compiled to work with up to PHP 5.6. The github alternative, for PHP 7, available at https://github.com/nono303/PHP7-memcahe-dll as mentioned in the comments is tested under non-thread safe. So you may only be able to get this working for your CLI scripts on Windows.

PHP Startup Unable to load dynamic library php_mongo.dll

I'm a beginner for this. I'm trying to install mongodb driver on php.
Platform: Windows 8.1 64bit.
PHP 5.5.9
Apache/2.4.7
Followed the instruction here:http://php.net/manual/en/mongo.installation.php#mongo.installation.windows
I've tried all php_mongo.dll file with VC11 and put in php/ext folder. and added extension=php_mongo.dll in php.ini file but when I tried to start apache in xampp controller I got an error.
Php Startup: Unable to load dynamic library
'C:\xampp\php\ext\php_mongo.dll' -%1 is not a valid Win32 application.
I've already check my VC compilator version inside phpinfo() and it's stated there MSVC11 with architecture: x86.
it would be nice if someone can help me.
Thanks. appreciate it.
Make sure you download the correct .DLL for your PHP installation. Good chance you're running apache x86, so download an x86 php_mongo.dll. Also if you're running PHP as an Apache module, make sure you pick the thread safe (ts) one and also pick this type of dll that matches the PHP version you're running.
The versions must match or else you will get a php startup error. Find these Mongo DLLs here.
I did this then I got an error libsasl.dll not found. I simply copied the libsasl.dll found in my PHP installation directory to the Apache installation directory (where httpd.exe is found). Then I restarted my Apache and it worked!
For anyone googling this in 2017, the PECL Package has been updated and is now found at http://pecl.php.net/package/mongodb/1.2.9/windows
and use:
extension=php_mongodb.dll
instead of:
extension=php_mongo.dll
Copy C:\xampp\php\libsasl.dll to C:\xampp\apache\bin\, restart Apache and enjoy.
If you are still having problems after doing the above, do try older version drivers instead.
That is what worked for me on for my XAMPP/ PHP 5.5 on windows 8.
Older drivers can be found here: https://s3.amazonaws.com/drivers.mongodb.org/php/index.html
New drivers can be found here: http://pecl.php.net/package/mongo/1.5.5/windows
You may also want to visit : https://serverfault.com/questions/563867/mongodb-unable-to-load-driver-on-php
This is normally because we use 64 Bit supported DLL file 64 Bit system. But the wamp/xampp architecture could be 32 Bit. We need to use based on the wamp/xampp architecture not the windows architecture. So, try to find relevant version of DLL file to the wamp/xampp architecture. The solution in the below link worked like a charm to me,
http://grokbase.com/t/gg/mongodb-user/151xpk3fkr/php-5-6-3-with-mongodb-driver-unable-to-load-dynamic-library-not-a-valid-win32-application
This link helps you to find the wamp/xampp architecture, https://stackoverflow.com/a/22454865/4874281
After doing all the steps as mentioned in previous comments xampp may not be able to load the ".dll" file. Just ensure to add the path of the ".dll" file's folder to the environment variable as a system variable path.
I was facing same issue, then after adding the path of the ".dll" file's folder to the environment variable as a system variable path, it worked. It is then able to find the file.
At the end that was the only step which was stopping xampp to load the ".dll" file, although it was present in that folder. Often people miss this step as it is no where pointed out clearly.
My PHP version is 7.2.3 x86
Go to this website and pick DLL according to php version:
https://pecl.php.net/package/mongodb/1.4.2/windows
And set this in php.ini
extension=mongodb

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.

cannot load php5apache2_2.dll

cannot load c:/PHP5/php5apache2_2.dll into server I am getting this error while running apache 2.2 on window XP machine
anyone have any idea what could be the problem. I can see there is no php5apache2_2.dll in c:/php5 folder.
What worked for me was obtaining php5apache2_4.dll-php-5.4-win32.zip from
apachelounge and using "php5apache2_4.dll" file from the "PHP 5.4.8" unzipped folder. I had apache 2.3.4 (32-bit) from apachelounge.com and php 5.4.9 (32-bit) from windows.php.net installed on my Win 7 (64-bit).
The dll worked despite 5.4.8 - 5.4.9 mismatch.
The corrsponding changes within "php.ini" and "httpd.conf" are to be maintained acoording to this helpful guide.
Best regards.
First you must downlaod de .dll file (php5apache2_2.dll)
then put it in your extensions directory.
Then edit your php.ini file, find de text:
;extension=php5apache2_2.dll
// and change y to
extension=php5apache2_2.dll
if the text is not present put the line yourself.
Then restart apache and it should load your extension.
PD: you can see where your extensions directory is located looking
for the text "extension_dir" in your php.ini, sometimes looks like:
extension_dir = C:\php\extensions
Hope this help you, if not please paste the error here, you can find
an error log file in apache/error/error.log or something like that.
You should download the dll file from PHP distribution package. And see three ways to set up PHP to work with Apache 2.x.
You can configure PHP as Apache handler in <[apache_home]>\conf\httpd.conf as follow:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
#configure the path to php.ini
PHPIniDir 'C:\php\'
NOTE: To avoid the error while starting apache, the php ini dir path should be in single quotes with backslash. Don't forget to end it with backslash.
Here is how I got it to GO:
Created the folder C:\Apache
Downloaded and installed http-2.2.22-win32-x86-no-ssl.msi
During install, entered localhost as Network Domain and Server Name
From browser, typed in url http://localhost/ and page came up with "It Works"
(I do not know if there is a God, but took that as a good sign:)
Created the folder C:\PHP
Downloaded and installed php-5.2.17-Win32-VC6-86.msi
Created a new file in notepad with the following:
Saved it in the Apache/htdocs folder as phpinfo.php
From browser, typed in url http://127.0.0.1/phpinfo.php
It did not work (i.e. it did not run the .php program file)
Hmm, oh yeah, you have to restart Apache for it to see updates to its
own configuration file
Start, Apache, Control..
-> generated the error that it could not find C:\Apache\php5apache2_2.dll
Well, I found it in C:\PHP and I copied it to C:\Apache\
Start, Apache, Control..
-> generated an error about a problem with the PHPINIDir directive on line 495 of C:/Apache/conf/httpd.conf
Fixed that by editing this line in the above file to
PHPIniDir "C:/PHP/php.ini"
Tried to restart Apache again, run the test file in the browser.
Still, it did not work:(
Recalled seeing this before and decided to reboot computer
Restarted (or started) the Apache Server
Ran the test file again..
IT WORKED!
Note that in some of the above I may have mixed up some forward and back slashes
Good luck!
You are getting an error due to the fact that the c:/PHP5/php5apache2_2.dll is not shipped with the non-thread safe version of PHP that you probably downloaded. Two options:
Download and install the thread safe version of PHP instead and you
will get everything you need.
If the non-thread safe version is important to what you want to accomplish, download the zip bundle of the thread safe version and take only the .dll you need from there.
Which version: For Apache Server 2.2, you need to download PHP 5.4 thread safe, which is shipped with both php5apache2_2.dll and php5apache2_4.dll. Some earlier versions probably work as well. PHP 5.5 is only shipped with php5apache2_4.dll which will mismatch with your version.
Cf the download links here on the official site: http://windows.php.net/download/.
Please check that for using Apache you should download VC6 version of PHP. If you use VC9 Apache will not start. It is clearly given in the site.
http://in3.php.net/manual/en/install.windows.manual.php
For me the problem was resolved by replacing the file php5apache2_2.dll from another site, somehow the file downloaded from the php.net site was corrupt.
I had already the file php5apache2_2.dll on my wamp 2.2 and the PHP version 5.3.13 so I just copied that file into my version 5.4.35 and it worked.
I did not have to mess with the apache configuration as other people suggest.
One more thing I did was to install the Visual C++ Redistributable for Visual Studio 2008 for my x64 machine running Windows 7 Ultimate Edition. I don't think this helped since I had already the x86 version and working with my previous PHP version, but is part of the action I taken.
None of the suggestions above worked for me. I tried replacing the php5apache2_2.dll file and restarting everything, but got the same error. I ended up uninstalling Apache, MySQL, and PHP, removing the path variables, and then installing WampServer. Had everything up and running in less than 5 minutes.
By the way, I uninstalled PHP by just deleting the folder in Program Files, since it did not turn up in Add/Remove Programs. I also deleted any leftover Apache and MySQL folders after the uninstalls.
Even file exist and apache shows error that this file don't exists, install Microsoft C++ Redistributable Package. Note, that you have to install 2008 version, then 2010. Install both packages, not only 2010 version.
I've had a similar problem. I found out after following a particular Youtube tutorial that if you go and edit the httpd.conf file while Apache is running... it will mess up.
Make sure that you install Apache first... then turn it off, then install php afterward. It should then edit the httpd.conf file itself. This Youtube tutorial solved my problem. http://www.youtube.com/watch?v=UKbEzmMliNM
Hope it helps. I got MySQL installed and working too... but had to install the .Net 4 Framework.
You need to install "http-2.2.22-win32-x86-no-ssl.msi" instead.
I had the same error.
I had installed x64 version of Apache and x86 version of php.
After a lof of searching I found that this doesn't work.
So I had to install x64 (threadsafe) version of PHP.
After this Apache works fine . :)
Hope this helps!
If your php5apache2_4.dll is missing:
My problem was the php5apache2_4.dll was not included in PHP install zip. It is included only the Thread Safe version of PHP 5.4.38
http://windows.php.net/downloads/releases/php-5.4.38-Win32-VC9-x86.zip

Categories