Can't enable php modules in MAMP - php

It may sound stupid, but I can't add extensions to my php.ini
let me explain.
on a script, I do a phpinfo(), it tells me my php.ini is at "/Library/Application Support/appsolute/MAMP PRO/conf/php.ini"
I open the file, check the extension dir, put my new extension there (mongo) make it executable.
I add "extension=mongo.so" after all other extension declarations, reboot the server ... and the extension doesn't load ... And nothing in the error log. (apache and php)
after many retries and even a complete reboot, it's still the same.
I tried to disable every extension that is loaded with it. and it's the same, all these extensions remain loaded.
Is there another place where it loads extensions ?
I use php 5.2.11 on Snow Leopard 10.6.4

in the main window of MAMP click File -> Edit Template and chose the php.ini you want to edit and add the mongodb extension there ..
save and restart MAMP and it should be loaded.
more info: http://www.davidgolding.net/mongodb/installing-mongodb-on-mamp-1-9-5.html

SOLUTION: restart your machine not just web server.
the same thing happened to me on mamp, and i restarted the machine, not just the web server and it loads. but you may run into client issue with php command in such case do this:
this is the solution for osx:
brew install php56-mongo
if it errors out then read the package name and re-run such as - example:
example: brew install php5789-mongo
source: http://php.net/manual/en/mongo.installation.php#mongo.installation.osx

Related

How can I install PHP extension libsodium in Wampserver?

I am trying to install the Libsodium PHP extension using PECL, but I have no idea how to get the dll files needed. I want to use it with Wampserver on Windows 7 (64-bit).
Can any one help me?
Here is How I did it.
Download the libsodium from here > For PHP 7.0, For PHP 5.6 And For PHP 5.5 (All x64). #One Important Note, Please download appropriate x86-32 bit or x64-64 bit of this extension matching of your environment from here
Extract the Downloaded file and copy libsodium.dll to wamp->bin->php->php5(x).x.xx Folder
Copy php_libsodium.dll From the extracted File to wamp->bin->php->php5(x).x.xx ->ext
Now Click on the WAMP System tray icon.
Go to PHP-> PHP Settings and Click on the enable dl from the menu of the WampManager from the system tray
Now Add bellow line to php.ini from PHP -> php.ini from the menu of Wampmanager, save and close it
extension=php_libsodium.dll
Now Restart Apache or click Restart All Services from the menu of WampManager
You should now get your php_libsodium in the extensions of the php Up and Running.
:)
**I didn't notice that, this question is 4 months old. I hope You have solved this.
use command prompt :
pecl install libsodium
and go to wamp folder find php.ini in php folder :
append this line: to ini file
extension=libsodium.so
You might be able to achieve this result by running php5enmod libsodium, depending on which webserver you use. Make sure you restart your webserver after installing PECL libsodium
here is good references:
https://paragonie.com/book/pecl-libsodium/read/00-intro.md#installing-libsodium
You can download the dll files you need here: http://windows.php.net/downloads/pecl/releases/libsodium/1.0.2/
Select the version that corresponds with your PHP version, compiler and architecture. (this can be checked using phpinfo(); on your machine)
Copy php_libsodium.dll to "ext" directory (C:\PHP\ext)
Copy libsodium.dll to root of PHP directory (C:\PHP)
Add extension=php_libsodium.dll to php.ini
restart apache
This worked on a standalone version of PHP running on Windows 7, I see no reason why this shouldn't work on WAMP or XAMP.
Wamp 3.2.0 64-bit
Even though in the past apparently more steps were required (see my comment from 2018), today I installed Wamp 3.2.0 64-bit, and when I got an error about libsodium not working, I was able to easily fix it by:
Wamp tray icon > PHP > PHP Extensions > ensure "sodium" is checked
(Wamp will automatically refresh)
I was pleasantly surprised that is worked!
You can also use https://github.com/paragonie/sodium_compat. You can simply use :
composer require paragonie/sodium_compat

symfony2 requirements cant be met

Was trying to play with symfony2. If I hit the web/config.php of my symfony2 installation it shows me the following problems
Install and enable the mbstring extension.
Install and enable the intl extension (used for validators).
Install and enable a PHP accelerator like APC (highly recommended).
Install PDO drivers (mandatory for Doctrine).
I can understand that these are not mandatory ones but question is I fixed these in my php.ini file but still cant see any reflection in this page. Here is how I fixed the above problems
extension=php_intl.dll
extension=php_mbstring.dll
extension=php_pdo_mysql.dll
Didnt install anything for APC so no complain with that. Restarted apache server "thousand" times, but no luck.
Side Note:
I tried to figure out something from phpinfo(). I can see one discrepancy. The phpinfo is showing one of my old php directory path F:\Softwares\Development\PHP\php-5.5.13-x64. This path used to exist in my system PATH variable earlier. But I myself remove this location from System PATH variable. But it is still visible in phpinfo(). But if I print the PATH variable from command prompt or cygwin console, it shows the correct PATH variable.
Also ran php app/check.php. It shows everything OK except the APC, which is completely fine for me. But it also shows that "PHP CLI can use a different php.ini file than the one used with your web server".
Environment Details:
OS: Windows 7
php: php-5.4.30-Win32-VC9-x86
Apache: Win32-2.4.9 VC9
MySQL: mysql-5.6.19-winx64
Not using any xampp/wampp etc.
Few more hear left on my head. Please help.
Make sure that you have these extensions in your ext directory, if not search and put it in the directory (for windows extension file type must be .dll).
APC https://www.dropbox.com/s/hmnrgle8xing3fo/php_apc.dll
INTL https://www.dropbox.com/s/wm14zk0grc6pm6v/php_intl.dll (you also need ICU lib)
mbstring https://www.dropbox.com/s/wm14zk0grc6pm6v/php_intl.dll
PDO mysql https://www.dropbox.com/s/hd5cm02oti8qw3s/php_pdo_mysql.dll
Also, don't forget to restart apache after changes in php.ini

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.

PHP-SOAP extension is not loaded

I have Centos 6.4 Final running on a (Linux certified) HP PC. I'm writing a small EPOS app in PHP and need to access various Magento SOAP methods.
When I installed php (via yum) I did not know I needed SOAP. So i used yum install php-soap at a later date. After which I did yum update.
Looking at the phpinfo() output
Link http://www.prendas.co.uk/images/download/phpinfo.pdf
SOAP appears to be working. However I get "SOAP extension is not loaded." in my PHP code when I try and load it.
Can anybody pls help?
Go to Php.ini File from phpmyadmin open in text editor and search for ;extension=php_soap.dll and just remove ; symbol and after that restart your Wamp/xamp services and then refresh your url page..enjoy
I dont really know much about centOS, but it could be possible, that there are two php.ini files. One for Apache and one for the CLI. So in case you place your SOAP-call from CLI (which I thought to be likely), you might have to add the SOAP-extension to the list of loaded extensions within this CLI's php.ini.
ok just go to php.ini file and see if extension=php_soap.dll actually exist, if it doesn't, then look through the file and find where your extensions are and paste extension=php_soap.dll. if extension=php_soap.dll actually exist but it's written as ;extension=php_soap.dll then remove the semi-colon, save the file, stop and restart your modules and voila!!!

PHP extension "curl" must be loaded while installing on xampp Windows 7

I am installing Magento on xampp local server on Windows 7. How to fix this error "PHP extension "curl" must be loaded." ?
Uncomment the following line: extension=php_curl.dll in the php.ini configuration file of your XAMP.
The location of the php.ini file will be mostly
%XAMPP_HOME%/php/php.ini
Stop apache and restart it.
In the xampp control panel go to the SCM tab and then select apache server and stop it and again restart it.
Then, go to the installation page of magento and refresh the page.
The setting to change:
;extension=php_curl.dll
to (semicolon removed)
extension=php_curl.dll
I would like to point out something regarding this problem. First of all
doing the same under Wamp instead of Xampp (i.e. uncommenting the
extension=php_curl.dll line under the php and apache directories
causes an error because Wamp does not package this dll with its
distribution (at least as of wamp server 2.2). I had do ditch
wamp and install xampp to get magento running. Perhaps someone
can suggest where one can alternatively download the php_curl.dll
from so that magento can be brought to work with Wamp as well.
There is a magento checklist file at:
http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento
This script has two problems. First the opening tag should be <?php rather than <?
or the xampp server wil not run it. Secondly the shell_exec() statement returnss an
empty array because the path to mysql is not configured, that's all, otherwise even
that part should be fine I suppose. (???)

Categories