BREW not working on Local Host PHP - php

I am having some trouble using BREW on my local host server. I installed brew via Terminal on my Mac and installed FREETDS using brew. I have also changed my default PHP to the MAMP PHP.
Running which php gives:
which php
/Applications/MAMP/bin/php/php7.0.0/bin/php
But it seems the packages I install via brew don't take effect on the MAMP PHP SERVER. I cant see the FREETDS driver anywhere in PHPINFO. Any help guys?

Maybe you can try from terminal to run
php --ini
Output will show you loaded ini file for PHP client. Than you can try to edit that ini file and include additional PHP extension if they are installed.
If possible i would suggest to don't use MAMP, but some Vagrant environment.

If you type:
brew info php
You'll see that Homebrew is installing to a separate directory than MAMP (including extensions). You'll need to reconcile the two somehow to get it working correctly, but it may be worth it to configure your machine to serve from Homebrew's version instead of relying on MAMP Pro - otherwise you'll be moving files around.

The problem here lies with me using MAMP. MAMP is not compatible with brew nor does it let me install extensions. The way I got around this was completely ditch MAMP and just go with PHPBREW which is a much more flexible solution and VERY EASY to setup. If you are going to need anything remotely custom (extensions etc.) go for PHPBREW.... it will save you so much time.

Related

Can't install memcached on XAMPP with PHP 7.4.3

I'm at a loss.
I tried every single instruction on the internet, I can't seem to install and run memcached on my xampp server.
I'm using a mac. I installed memcached via brew and updated the php.ini file with extension=memcached.so
When I check with phpinfo(); I see that there is no memcached installed.
Could someone please instruct me from the very beginning the steps I needed to take in order to run this on my local with xampp? Or hint me what I'm missing?
Many thanks!

Change PHP binary being used by localhost

I had been PHP version using 5.5.11 on my Mac and have some modules installed. They took quite a lot of tinkering around to get working. I have my OSX already using this version by using a PATH in my ./~profile. After I installed Yosemite though my localhost now runs PHP 5.5.14, which doesn't have the modules installed. How do I get my localhost to use my other PHP installation?
I have tried in httpd.conf LoadModule php5_module \path\to\other\binary. I restarted Apache but it wouldn't load my page then. So i'm unsure of how to achieve this.
Not so easy, in my mind the easy way should be to install a new version with the modules you need
If you are lucky all modules you need are present in the package from
http://php-osx.liip.ch/
The hard way : install manually the php and all modules ...

Configuring mongodb on MAMP

So I've tried almost all the tutorials I've found here and on other sources but the problem is always the same. The extension is not installed when I call the phpinfo method.
I've added the file mongo.so to the extensions folder and I've called it on the php.ini as extension=mongo.so.
I'm using MAMP 2.2 on Mavericks and the php version is 5.5.3.
Appreciate any kind of help.
The output of phpinfo() will tell you which php.ini file (if any) is in use.
You have to modify that php.ini file and add extension=mongo.so and then restart your webserver.
One thing you need to keep in mind when you are installing the MongoDB driver for MAMP is the pecl command you are using is actually the MAMP command, not some alternative PHP install you may have on your system.
To do this, locate the PHP binary distributed with MAMP, and the use the full path to the pecl command of the MAMP installation.

Unsuccessful XDebug installation

I'm trying to install XDebug on my local machine with Win 7, Apache 2, PHP 5.3.6 TS VC9 build (server manually installed, no package). I've followed instructions at http://xdebug.org/find-binary.php:
I've downloaded dll, moved to dir with other extensions, added following code to C:\Windows\php.ini, restarted server and - in contrary to my expectations - xdebug is neither installed nor listed in phpinfo page.
zend_extension="E:\www\server\php\ext\php_xdebug-2.1.2-5.3-vc9.dll"
Altough I've gone trough my phpinfo and XDebug site several times I still have no idea what can cause this problem. Do you have any suggestions how to get XDebug working please?
Thank you
According to netbeans manual you have to add the xdebug configuration file to the apache php ini directory and not the local php ini directory to make it work with anykind of wamp.
1) http://wiki.netbeans.org/HowToConfigureXDebug
2) Definition of wamp: http://en.wikipedia.org/wiki/WAMP
try zend_extension**_ts**=...
and the in a console fire php -m to see whats in. No need to restart server
I "solved" the problem by updating from 5.3.6 to 5.3.8. I dont know where the problem was, but update and it will work fine. (I used http://xdebug.org/find-binary.php)

Apache windows uninstall path

I'm trying to find the path of the uninstall file for apache 2.2. I can see it in add/remove programs, and tried to find the uninstall path in the registry under HKLM\software\microsoft\windows\currentversion\uninstall but there is no folder for apache...
I'm trying to find the path because I'm making an install file which installs apache/php/mysql and want to uninstall any existing installations of those 3 beforehand.
I know that running the apache installer gives you the option of repair/remove if its already installed but I want the uninstall to be silent/automated, so that the end user doesnt have to manually select remove to actually uninstall the existing apache.
I hope this makes sense, thanks in advance.
On my WinXP x32 laptop there is a key for Apache (2.2.13), installed with the MSI, under
HKLM\software\microsoft\windows\currentversion\uninstall
...and the uninstall string is
MsiExec.exe /I{UUID of key}
Just checked a Win2003 machine (Apache 2.2.19) at work and it is the same.
This probably doesn't help you very much, because you need to find the key before you know which UUID to pass to msiexec.
Looking through the other keys, this seems to be similar for all packages that were installed with MSIs.
Which version of Apache are you looking at? Because some older releases in the 2.2 branch didn't use MSI (if I remember rightly), I think they may have used InstallShield?
How did you originally install apache? Most of the time on Windows it is installed with XAMPP, WAMP, or some other similar bundled package. Try a search for php.ini or apache.conf, then look at the directory structure. That should point you in the right direction, you could also try
apache -k uninstall
Also take a look here http://support.esri.com/en/knowledgebase/techarticles/detail/23569
Here are the instructions I followed when I uninstalled my Apache server on Windows 7: http://www.ehow.com/how_7361546_uninstall-apache-windows.html
And one more thing, when doing the command prompt instruction, be sure to run it as Administrator or it will tell you that access is denied.

Categories