I´m installed Xampp in my Mac, the last version with Php7, all works fine, but in my Php proyect I´m using this function:
numfmt_format_currency()
I need install the intl, and edit the php.ini with this line:
extension="intl.so”
The problem is, I can´t install the intl, I use this command:
sudo pecl install intl
But returns me this console error:
/private/tmp/pear/temp/intl/intl_error.h:24:10: fatal error: 'ext/standard/php_smart_str.h' file not found
#include <ext/standard/php_smart_str.h>
^
1 error generated.
make: *** [php_intl.lo] Error 1
ERROR: `make' failed
After, I try download the ntl-3.0.0.tgz from here, and Install whith this command:
sudo pear install intl-3.0.0.tgz
But return me this:
No releases available for package "pear.php.net/intl" - package pecl/intl can be installed with "pecl install intl"
install failed
I'm desperate, how can I install intl?
You can use a PHP package from https://php-osx.liip.ch/. It already includes the intl extension.
This package installs the (usually) latest PHP 7.2/7.1/7.0/5.6/5.5/5.4/5.3 on OS X 10.6 (aka Snow Leopard), OS X 10.7 (aka Lion) and OS X 10.8 (aka Mountain Lion) and OS X 10.9 (aka Mavericks) and OS X 10.10 (aka Yosemite) and OS X 10.11 (aka El Capitan) and macOS 10.12 (aka Sierra) and macOS 10.13 (aka High Sierra) in /usr/local/php5. It installs many useful extensions (see below) and ini-settings and is what we at Liip use for our development. It's especially suited for Symfony 2 development. It also provides a decent php.ini with all settings configured according to "Best Practices".
Installation of PHP 7.2 is done via curl -s https://php-osx.liip.ch/install.sh | bash -s 7.2.
For more information have a look at the site and FAQ section.
Related
I need to run a php application that was built on php 7.3. Now that php 7.3 is no longer supported, I was unable to install using homebrew without including the --build-from-source option. I went ahead and attempted to build php 7.3 from source While trying to install and I encountered an error that terminated the build process:
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
make: *** [ext/phar/phar.phar] Bus error: 10
make: *** Waiting for unfinished jobs....
I've researched the error and found that this may have to do with the fact that I am installing on a Mac with an Apple M1 chip. I'd like to uninstall it now, upgrade the application to a supported version of php, and then run it. I tried running brew uninstall php and then install home-brew's default php, but the binary that was created by the first attempt is taking precedence over the latter php 8.0 version I installed.
My question is, is deleting the binaries located at /usr/bin/ enough to completely remove the unsupported version of php from my system? I searched the tar for an uninstall target but no luck.
I just want to clean it out of my system and start over. I don't imagine that there is a php 7.3 version that works with my Apple M1 chip.
Thanks much
I downloaded MacOS Mojave and did a clean installation on my mid 2012 macbook Pro. Installed XCode with command line tools. Got native Apache and PHP working, with PEARL, PECL and last version of ICU (63.1) for later use of Intl extension.
But every attempt of Intl instalation has failed. Before the clean instalation, i found a intl.so on a pen drive and used ICU version 54, but isn't the best way to get things working for a development enviroment.
In the end, i'm stuck with PECL incapable of finish intall of Intl because can't find php_smart_str.h file.
I've reinstalled the developer tools header files too:
$ sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
Is it possible to have a development enviroment without Homebrew?
When i run at the terminal:
sudo pecl install intl
Returns the following:
/private/tmp/pear/install/intl/intl_error.h:24:10: fatal error: 'ext/standard/php_smart_str.h' file not found
Right after creating libtool and running: make.
Ok, instead of using homebrew, i really wanted to use only native apache and php pre-installed on my MacBook Pro with Mac OS Mojave, trying to maintain the most clean development environment possible for CakePHP use.
So, on Pecl Official site ( https://pecl.php.net/package/intl ), it's clear that Intl package is not maintained anymore and has been superseded. Since PHP 5.3.0 you don't need to use Pecl to install intl extension, it's bundled with PHP.
But, it's missing on native instalation of PHP 7.1.24 on Mac OS Mojave.
Then i downloaded PHP 7.1 from php.net, installed XCode Command Line Tools, ICU (http://site.icu-project.org/), Autoconf, reinstalled the developer tools header files, and finally installed Intl extension using phpize.
Important: you'll have to disable SIP.
I tried to install oci8 extension on MAMP 3.5 with php 7.0.0 on Mac OS X El Capitan. I found some tutorials about install extension but no one has reported this problem before. When I execute phpize, I get the below error message:
"Cannot find build files at '/Applications/MAMP/bin/php/php7.0.0/lib/php/build'. Please check your PHP installation."
I obtain the same message with the below command
/Applications/MAMP/bin/php/php7.0.0/bin/pecl install oci8.
I went through the steps at updating mcrypt on yosemite
And when I went to run
sudo make install
and this is what came back
Tariks-Mac-mini:mcrypt tam3$ sudo make install
Installing shared extensions: /Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/
Why is it sharing extensions to MAMP? I have set my bash_profile to /usr/bin/php
How do I get everything pointing to the native php?
BTW, I have tried:
./configure --prefix=/usr/bin/php
I had such problem installing Mcrypt with following commands in the site you mentioned and finally I could solve the problem after installing Command Line Tools for OS X 10.9 for Xcode 6.1.1 GM Seed which you can download form Downloads for Apple Developers.
I'm trying to install pecl tidy extension for php5 on mac os x leopard.
I get tidy from
http://pecl.php.net/package/tidy
version 1.2
I run phpize, then configure and make command. On make command I obtain this error:
/usr/include/tidy/platform.h:530: error: duplicate ‘unsigned’
/usr/include/tidy/platform.h:530: warning: useless type name in empty declaration
/Users/paganotti/Desktop/tidyphp/tidy-1.2/tidy-1.2/tidy.c: In function ‘zm_info_tidy’:
/Users/paganotti/Desktop/tidyphp/tidy-1.2/tidy-1.2/tidy.c:387: warning: cast from pointer to integer of different size
lipo: can't open input file: /var/tmp//ccUDFWws.out (No such file or directory)
make: *** [tidy.lo] Error 1
How can I do install tidy php extension on mac os x leopard? Is there a tidy.so library already compiled so I only install without compile it?
Get php5-tidy from macports for a version that will work on MacOSX.
You get macports from here: http://www.macports.org and once installed you just do "port install php5-tidy"
Alternatively, you can use HomeBrew Link