Showing posts with label PHP modules. Show all posts
Showing posts with label PHP modules. Show all posts

Monday, January 7, 2019

FreeBSD: Dependencies not found - PHP modules installation

Error: "Dependencies not found. The following PHP modules are required to use Nextcloud"

To install PHP extentions/dependencies/modules simply run it:
# cd /usr/ports/lang/php73-extensions && make install clean

To find available modules run:
# find /usr/ports -type d -iname "php73-*"

/usr/ports/archivers/php73-bz2
/usr/ports/archivers/php73-phar
/usr/ports/archivers/php73-zip
/usr/ports/archivers/php73-zlib
/usr/ports/converters/php73-iconv
/usr/ports/converters/php73-mbstring
/usr/ports/converters/php73-recode
/usr/ports/databases/php73-dba
/usr/ports/databases/php73-interbase
/usr/ports/databases/php73-mysqli
/usr/ports/databases/php73-odbc
/usr/ports/databases/php73-pdo
/usr/ports/databases/php73-pdo_dblib
/usr/ports/databases/php73-pdo_firebird
/usr/ports/databases/php73-pdo_mysql
/usr/ports/databases/php73-pdo_odbc
/usr/ports/databases/php73-pdo_pgsql
/usr/ports/databases/php73-pdo_sqlite
/usr/ports/databases/php73-pgsql
/usr/ports/databases/php73-sqlite3
/usr/ports/devel/php73-gettext
/usr/ports/devel/php73-intl
/usr/ports/devel/php73-json
/usr/ports/devel/php73-pcntl
/usr/ports/devel/php73-readline
/usr/ports/devel/php73-shmop
/usr/ports/devel/php73-sysvmsg
/usr/ports/devel/php73-sysvsem
/usr/ports/devel/php73-sysvshm
/usr/ports/devel/php73-tokenizer
/usr/ports/ftp/php73-curl
/usr/ports/ftp/php73-ftp
/usr/ports/graphics/php73-exif
/usr/ports/graphics/php73-gd
/usr/ports/lang/php73-extensions
/usr/ports/mail/php73-imap
/usr/ports/math/php73-bcmath
/usr/ports/math/php73-gmp
/usr/ports/misc/php73-calendar
/usr/ports/net-mgmt/php73-snmp
/usr/ports/net/php73-ldap
/usr/ports/net/php73-soap
/usr/ports/net/php73-sockets
/usr/ports/net/php73-xmlrpc
/usr/ports/security/php73-filter
/usr/ports/security/php73-hash
/usr/ports/security/php73-openssl
/usr/ports/security/php73-sodium
/usr/ports/sysutils/php73-fileinfo
/usr/ports/sysutils/php73-posix
/usr/ports/textproc/php73-ctype
/usr/ports/textproc/php73-dom
/usr/ports/textproc/php73-enchant
/usr/ports/textproc/php73-pspell
/usr/ports/textproc/php73-simplexml
/usr/ports/textproc/php73-wddx
/usr/ports/textproc/php73-xml
/usr/ports/textproc/php73-xmlreader
/usr/ports/textproc/php73-xmlwriter
/usr/ports/textproc/php73-xsl
/usr/ports/www/php73-opcache
/usr/ports/www/php73-session
/usr/ports/www/php73-tidy

To install any needed dependency you need to cd to the port directory and install it, for example;
# cd /usr/ports/devel/php73-json && make install clean
# cd /usr/ports/archivers/php73-zip && make install clean
# cd /usr/ports/archivers/php73-zlib && make install clean
# cd /usr/ports/ftp/php73-curl && make install clean
# cd /usr/ports/graphics/php73-gd && make install clean

Enable /Disable PHP modules: 

Enable /Disable PHP modules: freeBSD

Checking for installed php modules and packages# php -m

Search extension# ee /usr/local/etc/php.ini

1.
To enable /disable PHP modules# cd /usr/ports/converters/php73-mbstring && make install clean
# cd /usr/ports/converters/php73-mbstring && make deinstall

To search extension,
# ee /usr/local/etc/php.ini

;extension=mbstring
Remove the semicolon to enable this extention

mbstring configuration starts with:
[mbstring]


2.
To find the default extension directory:The extention directory location dependes on the OS thus you need to find it manually.
# cat /usr/local/bin/php-config
Find this line.
extension_dir='/usr/local/lib/php/20180731'

In php.ini find this line 
;extension_dir = "./"
Changed it to 
extension_dir = "/usr/local/lib/php/20180731/"

;When the extension library to load is not located in the default extension
; directory, You may specify an absolute path to the library file:
; extension=/path/to/extension/mysqli.so

Simple call to the apachectl command for a graceful restart is needed to load the PHP module:
# apachectl graceful
Or to hard restart,
# service apache24 restart