Unable to install php intl extenstion in MAC OS Ventura - php

Iam new to Mac..
I installed Xampp 8.2.0 in php.ini I uncommented the extension=php_intl.dll
still not working
I am trying to install codeigniter 4 it shows Class "Locale" not found
I tried to install
pecl install intl;
In file included from /private/var/tmp/pear/temp/intl/php_intl.c:25:
/private/var/tmp/pear/temp/intl/php_intl.h:33:10: fatal error: 'unicode/ubrk.h' file not found
#include <unicode/ubrk.h>
Getting error like this
Please help..

I solved the issue by uninstalling the Xampp and I installed MAMP its working fine now... I'm Using MacBook Air M1

Related

installing Mcrypt php extension fails on Ubuntu and Xampp

I installed Xampp on Ubuntu 16 to work with Laravel.
I ran my Laravel code and got this error : Mcrypt PHP extension required.
After that I tried to install Mcrypt on PHP.
I have done these :
sudo apt-get install mcrypt
sudo phpenmod mcrypt
I have also done this : Link
I also restart the all services from Xampp after every change but I still get error on Laravel.
Any idea ?
My PHP version is 7.0.22 and Ubuntu version is 16.04.1 .
Thank you .
Edit 1
I did this and I still see the error.
After trying to many things. I just got rid of this shit by installing both version on my computer.
First I installed php 7.1.19 version.
Secondly I installed php 7.2.15 version
Now I am working perfectly with my project.

MongoDB installation on Mac OS X 10.11, with MacPorts

I am trying to install MongoDB on my computer running Mac OS X 10.11 (El Capitan).
My Apache + PHP configuration was already working correctly.
I installed MongoDB and PHP drivers for MongoDB through MacPorts:
sudo port install mongodb
sudo port install php55-mongodb
Installation ran correctly.
I added mongodb.so file to the extensions loaded in the php.ini file:
extension=/opt/local/lib/php55/extensions/no-debug-non-zts-20121212/mongodb.so
When I run phpinfo() function in php file, mongodb extension seems to be loaded correctly:
I tried to test my connexion by initializing a MongoClient instance:
<?php
$mongoDB = new MongoClient();
var_dump($mongoDB);
?>
Unfortunately, I got a HTTP ERROR 500, and I got the following line in my Apache logs:
PHP Fatal error: Class 'MongoClient' not found in ...
Did I make something wrong ?
On most of site I saw you need to add the extension mongo.so and not mongodb.so in your php.ini.
If it's not solved your problem, I recommand you to install MongoDB Drive with PELC.
Run command line:
$ sudo pecl install mongo
And add this line to your php.ini:
extension=mongo.so
Doc php.net Mongo Installation
Finally found a solution to my problem.
As #neverpanic and #Zagonine made me understand, php-mongodb and php-mongo are not the same extension.
If you want to use old PHP driving classes, you should use php-mongo package instead of the very new php-mongodb.
Trying to install latest php-mongo extension, I had an other problem related to OpenSSL. To bypass it, I installed an old version of php-mongo extension:
sudo /usr/local/pear/bin/pecl install mongo-1.5.8
Hopefully it will help someone else.

Installing ImageMagick / PECL error, missing 'magick-wand.h'

I installed imagick with homebrew on OS X Yosemite and want to install the imagemagick PHP extension with PECL. I am using the standard Apache server and PHP version included with the OS (not MAMP!). So, I tried
pecl install imagick
During the make process I get the error message
In file included from /private/tmp/pear/install/imagick/imagick_file.c:21:
/private/tmp/pear/install/imagick/php_imagick.h:51:12: fatal error: 'wand/magick-wand.h' file not found
# include <wand/magick-wand.h>
^
1 error generated.
When asked for the prefix of the Imagemagick installation
Please provide the prefix of Imagemagick installation [autodetect] :
I am not sure what to enter but I tried empty (autodetect), "/usr/local/Cellar/imagemagick/6.8.9-8/include/ImageMagick-6", and "/usr/local/Cellar/imagemagick/6.8.9-8"
There is a "magick-wand.h" file located in "/usr/local/Cellar/imagemagick/6.8.9-8/include/ImageMagick-6"/wand/magick-wand.h"
How do you install the imagemagick extension on OS X?
I got the same problem in OSX 10.10.3 with standard Apache, PHP in OSX
I found a solution from a blog.
http://charles.lescampeurs.org/2013/06/18/add-c-header-include-path-pecl
As the result, you only can compile the extension manually (I tried 3.1.2)
If you don't want to manually compile the source code, you may install the beta version of imagick (I try 3.3.1RC)

Php-intl installation on XAMPP for Mac Lion 10.8

Hi folks i am trying to install intl library on xampp for mac. I have installed php 5.3, so i just copied intl.so file from the php 5.3 location to Xampp bin folder. After that i uncommented extension=intl.so and restarted the server. Still i dont see intl updated in the phpinfo() (Getting error Class Locale not found)
I just ran this in Terminal.
sudo pecl install intl
Then just add
extension=intl.so
to php.ini.
For me this worked (php 7.1, MAMP, macOS Mojave):
Downloaded the intl.so file from https://github.com/skmedia/php-extensions-mamp/blob/master/php-5.4.4/intl.so and copy it to /usr/lib/php/extensions/no-debug-non-zts-20160303

Install PECL Oauth MAMP OSX 10.8

I am trying to install the PECL Oauth extension on OSX 10.8 with MAMP version 2.1.3. This version of MAMP has PHP 5.4.10 and 5.2.17 with it, I have already added the stuff to the include folder of 5.2.17 and run the ./configure. Although when I go to run
cd /Applications/MAMP/bin/php/php5.2.17/bin; ./pecl install oauth
I get
downloading oauth-1.2.3.tgz ...
Could not download from "http://pecl.php.net/get/oauth-1.2.3.tgz", cannot download "pecl/oauth" (could not open /tmp/pear/install/oauth-1.2.3.tgz for writing)
Error: cannot download "pecl/oauth"
Download failed
install failed
Now I am not 100% sure that MAMP is using the 5.2.17 version of PHP, I have changed it in the apache httpd.conf file and when I look at the phpinfo page in MAMP it shows up as using version 5.2.17 so I do not think this is the issue.

Categories