zipArchive with MAMP? - php

trying to work out how to install zipArchive extension with MAMP, but not having much luck
any know how to do this? I have no idea

Answering my own question for completeness.
JUST UPGRADE MAMP!!!
Sorry for shouting ;)

First three Google results indicate that MAMP comes compiled without ZIP extension:
http://forum.mamp.info/viewtopic.php?f=2&t=8287
http://symphony-cms.com/discuss/thread/512/
http://forum.mamp.info/viewtopic.php?f=2&t=9300 - MAMP Zip Extension Install Guide

Mamp is a product that wraps PHP / MySQL etc within one easy package for the mac, and has nothing to do with the extension
the extension runs within PHP, so your questions should be how should i use the zipArchive with PHP
the answer to that questions is read the documentation:
http://php.net/manual/en/class.ziparchive.php
To install an extension is very straight forward, just drop the extension within the extensions folder and then restart PHP.

Related

Install intl.so Extension on MAMP mac system [duplicate]

Ok, I'm running MAMP 1.9.5, which includes PHP 5.3.5, on my MacBook Pro.
The "intl" extension isn't included/activated and I've tried a lot of different ways to install it ("./pecl install intl" doesn't seem to do it), but can't make it work.
I've also "googled my ass of" but can't find any hints.
Anyone of you that know how to do it? Or, alternatively, have and advice on how to install my own MySQL+Apache+PHP (and include "intl")?
I'm trying to do this to be able to run Symfony2. So if you have any advice on how to install MySQL+Apache+PHP+Symfony2 on Mac, thats also welcome :)
The best way is to download PHP for OSX at http://php-osx.liip.ch/ and then copy the intl.so file from
/usr/local/php5-20121126-100332/lib/php/extensions/no-debug-non-zts-20100525/intl.so
to
/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/intl.so
Worked like a charm for me for PHP 5.4
I just compiled on mine the other day.
I wrote a self reminder post here: http://szemian.wordpress.com/2011/03/21/compiling-intl-extension-for-mamp/
Let me know if you need further explanation. :)

Recompiling PHP, when I've previously installed it with XAMPP

I'm on Windows 10, and I really need to install this PHP extension in order to use advanced GeoPHP methods. I've already asked about this previously here. There is no available DLL for this extension, and the instructions for installation on GitHub are for Linux. What I've understood is that I need to recompile PHP with the extensions in the ext folder, so I'm planning on doing that using these instructions. However, I've previously installed PHP through XAMPP.
My question is, will these instructions work with this? If yes, where can I find the PHP source files? I'm not quite sure what they look like, and googling "PHP source files location" gives me stuff about actual PHP files, not the ones used for installation. I just want to make sure. Thanks.
No, you do not have to recompile PHP. The module you stated is not baked into PHP but dynamically included.
Just build the module and include it like
extension=geos.dll
The Github link you posted does have instructions...

Unable to install imagick

I found tons of instructions, how to install Imagick on windows. Here is a very good and detaild explanation.
I am following the instructions. So, first, download the latest DLL from PECL. Copy the php_imagick.dll to the extension dir, copy the _CORE* libraries to PHP root directory, and it shows me the following version: ImageMagick 6.9.1-2 Q16 x64 2015-04-14
Wow, great, now I have nothing to do just install this exe.
Oh, wait...
There are no installer like this. And the problems starts here. Of course, I've tried to download and install the latest installer, installed it, set the environment variables, but it always says something about entry points.
I don't know why Imagick guys removes the releases from their ftp, I think this is a very bad behaviour. Can not access from archive too.
So I am unable to installing the Imagick.
Can anybody help me with this version of installer, or give me a step-by-step instruction, how to install this Imagick for Windows 10, 64bit for Apache 2.4.2 64bit, and PHP 5.6.5 64bit?
I tried the 32bit version, but with that, the phpinfo() does not show me anything.
EDIT: There is an alternative download location here.
I started a thread on the Imagick forum, and now I don't know, should I cry or should I laugh...
The answer for my question was this:
Hmm... it seems we don't build our libraries with 'deprecated' methods. I will see if we can change this before the next release so DrawAllocateWand will not suddenly be gone.
I tell to the guy, ok, it's a cool thing, but I've just reinstall my machine from the scratch, so, I got this error:
Procedure entry point (DrawAllocateWand) not found in DLL
or something similar, I translated it.
So, please tell me, where can I download the ImageMagick 6.9.1-2 Q16 x64 2015-04-14 binaries, because it seems, that php_imagick.dll need this, and I should work...
The answer was:
We don't keep an archive of old binary version of ImageMagick. You could however decide to build IM from source.
CONCLUSION
If you ever had a working installer for windows for Apache, PHP, Imagick, you should always keep these in the cloud for yourself. MHO: I really hate these things. I know, most of us is working on linux boxes, but our company policy is to use OS what admin says. So I need to use windows. Now I should suck for a while, to download and install a cygwin with compilers, compile the Imagick somehow, and set all the environments variables, because some developers do not use a version controller, or maybe the sotrage is too expensive for them to store old binaries... I can not imagene these options.
ImageMagick is available here:
http://windows.php.net/downloads/pecl/deps/
Imagick, that has been compiled against that version of ImageMagick is available here
http://windows.php.net/downloads/pecl/releases/imagick/3.4.0rc5/
Downloading random versions of libraries from other places is not guaranteed to work.

Install/activate PHP "intl" extension running MAMP

Ok, I'm running MAMP 1.9.5, which includes PHP 5.3.5, on my MacBook Pro.
The "intl" extension isn't included/activated and I've tried a lot of different ways to install it ("./pecl install intl" doesn't seem to do it), but can't make it work.
I've also "googled my ass of" but can't find any hints.
Anyone of you that know how to do it? Or, alternatively, have and advice on how to install my own MySQL+Apache+PHP (and include "intl")?
I'm trying to do this to be able to run Symfony2. So if you have any advice on how to install MySQL+Apache+PHP+Symfony2 on Mac, thats also welcome :)
The best way is to download PHP for OSX at http://php-osx.liip.ch/ and then copy the intl.so file from
/usr/local/php5-20121126-100332/lib/php/extensions/no-debug-non-zts-20100525/intl.so
to
/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/intl.so
Worked like a charm for me for PHP 5.4
I just compiled on mine the other day.
I wrote a self reminder post here: http://szemian.wordpress.com/2011/03/21/compiling-intl-extension-for-mamp/
Let me know if you need further explanation. :)

PECL extension for Windows

I found a few related posts here but didn't get my answer. So posting again.
How would I install a PECL extension on windows? Say I want the PECL oAuth extension on Windows XP.
I know 2 methods, but none of them is working for me.
The site http://pecl4win.php.net/ is down for months. So I cant download the DLL. Is there any place we can download the DLLs from ?
running the command
pecl install oauth-0.99.9.tgz is throwing the error
The DSP oauth.dsp does not exist.
I tried with few other extensions also and getting the same error.
What am I missing here?
Releases can now be found here:
http://windows.php.net/downloads/pecl/releases/
If you need an extension not available there you might ask on the pecl-dev at lists.php.net mailing list.
I got what I am looking for in http://windows.php.net/downloads/pecl/releases/
Currently PECL for windows is in an odd reformation state. The reason being that I believe they are trying to provide VS2008 source versions. I would actually suggest using Zend Server for now until the windows half of the php group gets everything fixed up. Zend Server includes almost all of the extensions that you can find in PECL, and everything else, if you are lucky, you could find an compile yourself.
The PECL installer downloads the source code of the extension and tries to compile it with your local C compiler. The problem is that the whole process is designed for Unix systems, where a C compiler is available or can be easily installed. Setting an environment to compile C code under Windows is pretty complicate.
The ideal solution is getting a DLL file that someone already compiled. That's what the pcle4win site was for. However, there's currently no official repository to download PECL DLLs so you only have two alternatives:
Find an unofficial DLL somewhere in Google
Compile it yourself (another link) with Microsoft Visual Studio
It'd be cool that there was a DLL repository out there but I'm unaware of any.
The php source ships with a set of configuration scripts for windows (using windows script host) that mimics the autoconf tools as far as php is concerned. If you place the code for the extension in a directory under the /ext directory (where all the other extensions like bcmath, bzip, ... are located) you can let the buildconf-script create a makefile that includes the build rules for that (new) extension.
There's a step-by-step walk-through at http://wiki.php.net/internals/windows/stepbystepbuild which seems to be brief but feasible.
compiled oauth: http://windows.php.net/downloads/pecl/releases/oauth/
another pecl extension: http://windows.php.net/downloads/pecl/releases/

Categories