Cannot install INTL extension with XAMPP on Mac - php

When I wrote sudo pecl install intl command on terminal I get the following error.
My path is Applications/XAMPP/xamppfiles/bin/php.
I wrote extension=intl.so in php.ini file in etc.
Warning: PHP Startup: Unable to load dynamic library 'intl.so' (tried: /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/intl.so (dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/intl.so, 9): Symbol not found: _zend_string_init_interned
Referenced from: /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/intl.so
in /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/intl.so), /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/intl.so.so (dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/intl.so.so, 9): image not found)) in Unknown on line 0
Can someone help ?

Related

Using Postgres with PHP 7.4 macOs Big Sur

After update to macOs Big Sur and update PHP 7.3 -> 7.4.19 my postgres not working.
Extensions activated in php.ini
extension=pdo_pgsql
extension=pgsql
PHP instaled using brew
Output command php -m not contains the module pdo_pgsql
Error output in command php artisan serve:
PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /opt/local/lib/php74/extensions/no-debug-non-zts-20190902/pdo_pgsql (dlopen(/opt/local/lib/php74/extensions/no-debug-non-zts-20190902/pdo_pgsql, 9): image not found), /opt/local/lib/php74/extensions/no-debug-non-zts-20190902/pdo_pgsql.so (dlopen(/opt/local/lib/php74/extensions/no-debug-non-zts-20190902/pdo_pgsql.so, 9): image not found)) in Unknown on line 0

How to install PDO_PGSQL for PHP 8 on Mac OS Big Sur having M1 Chip?

I have been trying to install pdo_pgsql. Homebrew is not working. Adminer needs this extension for accessing the DB. How to solve the issue?
PgSQL and PDO_PgSQL extensions are already enabled on the php.ini file. But, still, Adminer shows the Error:
None of the supported PHP extensions (PgSQL, PDO_PgSQL) are available.
When running $ php artisan serve, it shows the following error
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /opt/homebrew/lib/php/pecl/20190902/pdo_pgsql (dlopen(/opt/homebrew/lib/php/pecl/20190902/pdo_pgsql, 9): image not found), /opt/homebrew/lib/php/pecl/20190902/pdo_pgsql.so (dlopen(/opt/homebrew/lib/php/pecl/20190902/pdo_pgsql.so, 9): image not found)) in Unknown on line 0

OSX Big Sur unable to install php 7.4 intl

I am getting crazy since days as my new MacBook OS X Big Sur with php#7.4 is giving issues to XAMPP.
As far as I understood it's better to use the php from OS X than from XAMPP, but I am getting error while trying to install intl using brew. Here my code:
sudo pecl install intl
When I run the above I get this warning:
PHP Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/local/lib/php/pecl/20190902/intl (dlopen(/usr/local/lib/php/pecl/20190902/intl, 9): image not found), /usr/local/lib/php/pecl/20190902/intl.so (dlopen(/usr/local/lib/php/pecl/20190902/intl.so, 9): image not found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/local/lib/php/pecl/20190902/intl (dlopen(/usr/local/lib/php/pecl/20190902/intl, 9): image not found), /usr/local/lib/php/pecl/20190902/intl.so (dlopen(/usr/local/lib/php/pecl/20190902/intl.so, 9): image not found)) in Unknown on line 0
downloading intl-3.0.0.tgz ..
then I am asked about path for ICU.
Specify where ICU libraries and headers can be found [DEFAULT] :
I press ENTER and I get this:
running: /private/tmp/pear/temp/intl/configure --with-php-config=/usr/local/opt/php#7.4/bin/php-config --with-icu-dir=DEFAULT
Then the installation starts, but at the end I get this error:
configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met:
No package 'icu-uc' found
No package 'icu-io' found
No package 'icu-i18n' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables ICU_CFLAGS
and ICU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
ERROR: `/private/tmp/pear/temp/intl/configure --with-php-config=/usr/local/opt/php#7.4/bin/php-config --with-icu-dir=DEFAULT' failed
If I make:
which php
I get:
/usr/local/opt/php#7.4/bin/php
Anyone able to give real solution?
thanks!

PHP 7.4 Extensions Such as SQLite3 Not Built by Default

I've installed PHP 7.4.11 on macOS using Homebrew.
When I tried to enable extensions which are built with PHP, such as sqlite3 and pdo_sqlite, the extensions couldn't be found, as implied from the following warnings:
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: /usr/local/lib/php/pecl/20190902/pdo_sqlite (dlopen(/usr/local/lib/php/pecl/20190902/pdo_sqlite, 9): image not found), /usr/local/lib/php/pecl/20190902/pdo_sqlite.so (dlopen(/usr/local/lib/php/pecl/20190902/pdo_sqlite.so, 9): image not found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: /usr/local/lib/php/pecl/20190902/pdo_sqlite (dlopen(/usr/local/lib/php/pecl/20190902/pdo_sqlite, 9): image not found), /usr/local/lib/php/pecl/20190902/pdo_sqlite.so (dlopen(/usr/local/lib/php/pecl/20190902/pdo_sqlite.so, 9): image not found)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'sqlite3' (tried: /usr/local/lib/php/pecl/20190902/sqlite3 (dlopen(/usr/local/lib/php/pecl/20190902/sqlite3, 9): image not found), /usr/local/lib/php/pecl/20190902/sqlite3.so (dlopen(/usr/local/lib/php/pecl/20190902/sqlite3.so, 9): image not found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'sqlite3' (tried: /usr/local/lib/php/pecl/20190902/sqlite3 (dlopen(/usr/local/lib/php/pecl/20190902/sqlite3, 9): image not found), /usr/local/lib/php/pecl/20190902/sqlite3.so (dlopen(/usr/local/lib/php/pecl/20190902/sqlite3.so, 9): image not found)) in Unknown on line 0
In my extension's directory, /usr/local/lib/php/pecl/20190902/, there is not a single file. I expected shared object (.so) files for all the extensions built with PHP.
I also tried installing PHP 8.0 using the command brew install php --HEAD, but the problem persists. According to the Homebrew formula for PHP, all these extensions such as sqlite3, pdo_sqlite, etc should be built with PHP.
Can anyone tell me how I can resolve this issue?

Wordpress Installation PHP Error

THis is the update I get when I run the following command php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/curl.so' - /usr/lib/php/modules/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/dbase.so' - /usr/lib/php/modules/dbase.so: wrong ELF class: ELFCLASS32 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/fileinfo.so' - /usr/lib/php/modules/fileinfo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/json.so' - /usr/lib/php/modules/json.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysql.so' - /usr/lib/php/modules/mysql.so: wrong ELF class: ELFCLASS32 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/mysqli.so' - /usr/lib/php/modules/mysqli.so: wrong ELF class: ELFCLASS32 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo.so' - /usr/lib/php/modules/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_mysql.so' - /usr/lib/php/modules/pdo_mysql.so: wrong ELF class: ELFCLASS32 in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/pdo_sqlite.so' - /usr/lib/php/modules/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/phar.so' - /usr/lib/php/modules/phar.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/zip.so' - /usr/lib/php/modules/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0
I'm trying to install Wordpress on a RHEL Machine. I initially had gotten mySQL up and running and then realized that my PHP was version 5.1.6. I added another repo, installed PHP 5.3 and removed the old php packages.
The error I get on a browser when I open localhost/wp-admin/install.php is:
Your PHP installation appears to be missing the MySQL extension which
is required by WordPress.
I have the package php-mysql.x86_64 installed and I can't figure out what the problem is.
I don't know what to do! Any help would be greatly appreciated.
Thanks.
Install required PHP libraries. RHEL installation command ( with all required modules for Wordpress):
sudo yum install php-bcmath php-cli php-common php-devel php-gd php-imap php-mbstring php-mcrypt php-mysqlnd php-odbc php-pdo php-pear php-pecl-geoip php-pecl-jsonc php-pecl-jsonc-devel php-pecl-zip php-pgsql php-process php-tidy php-xml php-xmlrpc
Install EPEL repos to update to latest PHP:
#CentOS 6 64Bit
sudo wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum update php
EPEL repos installation process for other versions - How to Enable EPEL Repository for RHEL/CentOS 7.x/6.x/5.x
EDIT 1:
In order to disable other repositories, see and edit .repo files in /etc/yum.repos.d/ directory and set enabled=1 to enabled=0. After all don't forget to run:
yum clean all
So, I figured this out. The latest php version was installed. I was using 64 Bit RHEL and the libraries were in the /usr/lib64 folder instead of the /usr/lib folder. Once I changed that bit in the php.ini file, it ran like a charm. :)

Categories