How to install pecl memcached extension on wamp? - wamp

I need to install memcached for my windows 64bit wamp running on localhost. My specific php version is 5.5.12.
I am using version 2.2.0 of the extension found here:
http://pecl.php.net/package/memcached
How do I install the extension as it is a .tgz file?
I tried finding a working dll for this extension without any success.

Step 1:
Check in your PHP’s extension directory (like: C:\wamp64\bin\php\php5.6.25\ext) if not exists file php_memcache.dll, go to the page http://windows.php.net/downloads/pecl/releases/memcache/3.0.8/
to download this file (depends on your PHP version) and put php_memcache.dll in your directory C:\wamp64\bin\php\php5.6.25\ext
Step 2:
Edit your file php.ini, add this line:
extension=php_memcache.dll
Step 3: restart apache
and check now your phpinfo

Related

Installing PGroonga on Windows 10 for PostgreSQL 11

PostgreSQL extension Novice here.
So I am trying to install PGroonga on Windows 10 for PostgreSQL 11(already installed)
The instructions it telling me to extract the downloaded PGroonga package. And I need to specify PostgreSQL folder as extract target folder as show below.
If you installed installer version PostgreSQL,
C:\Program Files\PostgreSQL\%POSTGRESQL_VERSION%
is the extract target folder.
If you installed zip version PostgreSQL,
%POSTGRESQL_ZIP_EXTRACTED_FOLDER%\pgsql
is the extract target folder.
I installed my PostgreSQL using the installer version however,I am unable to find this folder on my PostgreSQL and therefore can’t install the extension.
Any help will be highly appreciated .
The extracted pGroonga file has bin, etc, include, lib, share folder. While my installed pg11 also has bin etc include init lib and share folder. Extracting this file here will update the files which I think is not good. I have however copied the files to respective folder but I still get an error when.
CREATE EXTENSION pgroonga;

Where is StarCluster Installed on MacOS

I installed "StarCluster" using the terminal on my MacOs by following instructions from the link provided below. Now, I need to edit the configuration file to add my AWS credentials. However, I am not sure which folder "StarCluster" is installed on my hard drive. Does anyone know how to locate the folder ? I would appreciate your help.
http://star.mit.edu/cluster/docs/latest/installation.html
According to the easy-install docs:
By default, packages are installed to the running Python installation's site-packages directory, unless you provide the -d or --install-dir option to specify an alternative directory, or specify an alternate location using distutils configuration files.
Here's a guide to finding your site-packages directory.

Drupal 8 - Commerce Module - BC math PHP extension not found

I'm trying to install the commerce module in Drupal 8 however I get the error 'BC math PHP extension not found'.
I've searched for this problem and tried different things such as editing the PHP.ini by adding 'bcmath.scale=2' however I still get the error message.
Any help would be appreciated, thanks.
Just install bcmath plugin for your php version with no need to (re)build php as mentioned on accepted answer
# get php version
php -v
# install bcmath based on your version lets assume php 7.1
# for ubuntu
sudo apt install php7.1-bcmath
# for centos
yum install bcmath
# restart apache
sudo systemctl restart apache2
Above problem appears when installing commerce or commerce kickstart using composer
Update 2020
Please refer to #GiorgosK's answer for installing bcmath via a package manager if you are using a distribution that provides a bcmath package for PHP. I will ask the OP in comments to update the recommended answer, since that solution is probably what most people need.
Three years ago when I answered this question, I suggested that you have to rebuild PHP to get bcmath. That was incorrect. I was using an older distribution of Debian/Ubuntu that provided bcmath as a statically linked extension in the core php package. I determined at the time (incorrectly) that bcmath was a core extension that had to be enabled at build-time (like SPL and PCRE).
For those trying to troubleshoot a missing bcmath extension (such as those building/installing PHP themselves or nevertheless encountering issues), I've corrected and updated my original answer below. It explains in detail how to troubleshoot a missing PHP extension.
Original Answer (Corrected)
The error message indicates that PHP wasn't built with bcmath support or can't find the installed extension. PHP extensions are either built into PHP directly or they are loaded from an external dynamic library file at runtime.
Since PHP obviously doesn't have the extension built-in, it can't find the external library file that provides bcmath. This file on POSIX platforms will be called bcmath.so and php_bcmath.dll on Windows.
Extension files are installed under a directory indicated by the extension_dir property in php.ini. To determine the value of this property, run the following command:
php -r 'echo ini_get("extension_dir").PHP_EOL;'
The default value for this property is configured when PHP is built and may vary from distribution-to-distribution.
Once you verify the extension file is installed in this location, you can then check to see if the extension is enabled in php.ini. You should see a line that enables the extension like so:
# POSIX platforms
extension=bcmath.so
# Windows
extension=php_bcmath.dll
For Linux distributions like Ubuntu/Debian that install extensions via the package manager, the format is somewhat different since Debian employs a distributed configuration. Typically the package manager installs everything correctly, but you can check to see if an ini file exists for bcmath under the corresponding conf.d directory. These small ini files are snippets imported into the larger php.ini file, and they are typically symlinked to /etc/phpX/mods-available, allowing modules to be initially enabled for all PHP SAPIs such as CLI, CGI, Apache Mod PHP, ETC. Make sure a symlink exists for the PHP SAPI you need to use.
To ensure your PHP is loading the extension, run phpinfo(); in a test page and search for bcmath. You can also more easily do this with the CLI using a command like:
$ php -i | grep -i bcmath
# Success output: BCMath support => enabled
# (Another command that works well for checking extensions)
$ php -m | grep -i bcmath
# Success output: bcmath
In order for the CLI to show accurate results, it must target the same php.ini file. If it doesn't, then use the -c option to temporarily point the CLI at the correct php.ini (i.e. the one being used by your Drupal site).
Add BC MATH extension for PHP 7.2
If you are getting this (https://prnt.sc/sehmd5) error then, run below command using vagrant ssh
Run these command in root of vagrant ssh
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.2-bcmath
service apache2 restart
Then open php.ini and search for bcmath
If bcmath scale is 0, Change it to 2
Restart php
Restart Apache
Hard Reload website
Install required modules
Similarly for any version of PHP, you only need to change PHP version in 3rd command.

Class 'ZipArchive' not found in opencart

I am getting an error "Class 'ZipArchive' not found in opencart" whenever i am trying to export from server.
It works fine from loacl system
what is the exact problem can anyone tell me ?
In server: php version 5.5.32
In local: php version 5.5.9
STEP 1:
Go to Cpanel - PHP Pear Packages - Find PHP Extension - Search for zip.
Install the zip extension found.
STEP 2:
Go to Cpanel - Select PHP Version - Tick the zip Option - Save.
Now try to upload the .ocmod.zip file. Should work now.
Worked for me.
It worked for me too this morning. From Cpanel I went to Select PHP version, and then checked the zip extension before I installed Opencart 3.02.
Enable the extension zip.so extension, by adding the following line of code to your server php.ini file:
extension=zip.so
This problem is raised due to some server configuration.
If you are on linux server you need to add zip archive module in php version.
cpanel -> Select PHP version -> check zip module in this page

SublimeText 3 - Package Control: Removed directory for orphaned package ColdFusion

I am running SublimeText 3 (build 3083). I follow the manual install directions for the ColdFusion plugin as described here (https://github.com/SublimeText/ColdFusion):
Download Manually
Download the files using the GitHub .zip download option
Unzip the files and rename the folder to ColdFusion
Copy the folder to your Sublime Text 2 Packages directory
This has worked (and still works) on many machines. But today I have a PC that each time I re-open SublimeText it removes the ColdFusion directory and in the SublimeText console it says "Package Control: Removed directory for orphaned package ColdFusion". Haven't been able to find anything on this yet. Help appreciated. Thanks!
The "Download Manually" section is for Sublime Text 2 only. At the very top of the README you linked are the ST3 instructions:
The development branch contains a rewrite of the ColdFusion plugin. The only installation method is via Git.
cd Packages/
git clone https://github.com/SublimeText/ColdFusion.git
cd ColdFusion
git checkout development
On Windows machines, the Packages folder is in %APPDATA%\Sublime Text 3\Packages. You'll need to have a working copy of git on your machine, which can be obtained here.
Alternatively, you can download a zip file of the development branch, extract it, rename the resulting ColdFusion-development folder to ColdFusion, then copy that into your Packages folder.
EDIT
I did a little digging, and apparently this package is no longer being developed. However, the CFML package has been suggested as a replacement. Not being a ColdFusion user, I haven't tested it myself, but reviews from others are good. It's available for ST3 only, but can be installed directly via Package Control, so you don't have to worry about using git.
If you are using Sublime Text 3 ST3, the recommended package to use is the one named CFML available via Package Control here: https://packagecontrol.io/packages/CFML
If you are using Sublime Text 2 ST2, the recommended package is the one named Cold​Fusion available via Package Control here: https://packagecontrol.io/packages/ColdFusion
For both of them you'll find there installation instructions using Package Control or manually from GitHub.