ChurchCRM / CRM

ChurchCRM is an OpenSource Church CRM & Management Software.
https://ChurchCRM.io
MIT License
636 stars 446 forks source link

Debian 8 and PHP 7 errors #2455

Closed apmuthu closed 5 years ago

apmuthu commented 7 years ago

Ripped out PHP 5.6 from Debian 8 install of ChurchCRM v2.7.4 and put in PHP 7.0 from the DOTDEB Repo. Still the Backup and List Groups errors come. Looks like a CentOS specific shell command is used somewhere in the code denying Debian installs.

https://www.cyberciti.biz/faq/installing-php-7-on-debian-linux-8-jessie-wheezy-using-apt-get/
https://docs.moodle.org/22/en/Compiling_PHP_from_source
https://shiji.info/blog/2016/en/99

# cat /etc/debian_version
8.7

# tar zcvf /root/etc.backup.tar.gz /etc/

# dpkg --list | grep php | awk '/^ii/{ print $2}'
dh-php5
libapache2-mod-php5
php-pear
php5
php5-cli
php5-common
php5-curl
php5-dev
php5-gd
php5-json
php5-mcrypt
php5-mysql
php5-xsl
pkg-php-tools

# x="$(dpkg --list | grep php | awk '/^ii/{ print $2}')"
# apt-get --purge remove $x

The following packages were automatically installed and are no longer required:
  debhelper intltool-debian libmail-sendmail-perl libmcrypt4 libpcre3-dev libpcrecpp0 libsys-hostname-long-perl
  po-debconf shtool
Use 'apt-get autoremove' to remove them.

dpkg: warning: while removing php-pear, directory '/usr/share/php/.registry' not empty so not removed
dpkg: warning: while removing php-pear, directory '/usr/share/doc/php5-common/PEAR' not empty so not removed

dpkg: warning: while removing php5-common, directory '/etc/php5/mods-available' not empty so not removed
dpkg: warning: while removing php5-common, directory '/usr/share/doc/php5-common' not empty so not removed
dpkg: warning: while removing php5-common, directory '/usr/lib/php5/20131226' not empty so not removed

apt-get autoremove
rm -rf /usr/share/php/.registry
rm -rf /usr/share/doc/php5-common/PEAR
rm -rf /etc/php5/mods-available
rm -rf /usr/share/doc/php5-common
rm -rf /usr/lib/php5/20131226
rm -rf /etc/php5

ls -al /usr/share/php/.registry
ls -al /usr/share/doc/php5-common/PEAR
ls -al /etc/php5/mods-available
ls -al /usr/share/doc/php5-common
ls -al /usr/lib/php5/20131226
ls -al /etc/php5

echo 'deb http://packages.dotdeb.org jessie all' >> /etc/apt/sources.list
echo 'deb-src http://packages.dotdeb.org jessie all' >> /etc/apt/sources.list

# cat /etc/apt/sources.list
deb http://ftp.debian.org/debian jessie main contrib
deb http://ftp.debian.org/debian jessie-updates main contrib
deb http://ftp.debian.org/debian jessie-backports main contrib
deb http://security.debian.org jessie/updates main contrib
deb http://packages.dotdeb.org jessie all
deb-src http://packages.dotdeb.org jessie all

====

wget https://www.dotdeb.org/dotdeb.gpg
apt-key add dotdeb.gpg
rm dotdeb.gpg

apt-get update
y="$(sed 's/php5/php7.0/g' <<<$x)"
echo Old PHP5 packages name: $x
    Old PHP5 packages name: dh-php5 libapache2-mod-php5 php-pear php5 php5-cli php5-common php5-curl php5-dev php5-gd php5-json php5-mcrypt php5-mysql php5-xsl pkg-php-tools
echo New PHP7 packages name: $y
    New PHP7 packages name: dh-php7.0 libapache2-mod-php7.0 php-pear php7.0 php7.0-cli php7.0-common php7.0-curl php7.0-dev php7.0-gd php7.0-json php7.0-mcrypt php7.0-mysql php7.0-xsl pkg-php-tools
y="libapache2-mod-php7.0 php-pear php7.0 php7.0-cli php7.0-common php7.0-curl php7.0-gd php7.0-json php7.0-mcrypt php7.0-mysql php7.0-xsl php7.0-readline php7.0-zip php7.0-mbstring"

apt-get install $y

apt-get install libmcrypt-dev mcrypt

The following extra packages will be installed:
  libapparmor1 libmcrypt4 libwebp5 php-common php-xml php7.0-opcache php7.0-xml
Suggested packages:
  libmcrypt-dev mcrypt
The following NEW packages will be installed:
  libapache2-mod-php7.0 libapparmor1 libmcrypt4 libwebp5 php-common php-pear php-xml php7.0 php7.0-cli
  php7.0-common php7.0-curl php7.0-gd php7.0-json php7.0-mcrypt php7.0-mysql php7.0-opcache php7.0-readline
  php7.0-xml php7.0-xsl php7.0-zip php7.0-mbstring

# apt-cache search php7.0-\*
libapache2-mod-php7.0 - server-side, HTML-embedded scripting language (Apache 2 module)
libphp7.0-embed - HTML-embedded scripting language (Embedded SAPI library)
php-all-dev - package depending on all supported PHP development packages
php7.0 - server-side, HTML-embedded scripting language (metapackage)
php7.0-apcu - APC User Cache for PHP
php7.0-apcu-bc - APCu Backwards Compatibility Module
php7.0-bcmath - Bcmath module for PHP
php7.0-bz2 - bzip2 module for PHP
php7.0-cgi - server-side, HTML-embedded scripting language (CGI binary)
php7.0-cli - command-line interpreter for the PHP scripting language
php7.0-common - documentation, examples and common module for PHP
php7.0-curl - CURL module for PHP
php7.0-dba - DBA module for PHP
php7.0-dbg - Debug symbols for PHP7.0
php7.0-dev - Files for PHP7.0 module development
php7.0-enchant - Enchant module for PHP
php7.0-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary)
php7.0-gd - GD module for PHP
php7.0-geoip - GeoIP module for PHP
php7.0-gmp - GMP module for PHP
php7.0-igbinary - igbinary serializer for PHP
php7.0-imagick - Provides a wrapper to the ImageMagick library
php7.0-imap - IMAP module for PHP
php7.0-interbase - Interbase module for PHP
php7.0-intl - Internationalisation module for PHP
php7.0-json - JSON module for PHP
php7.0-ldap - LDAP module for PHP
php7.0-mbstring - MBSTRING module for PHP
php7.0-mcrypt - libmcrypt module for PHP
php7.0-memcached - memcached extension module for PHP, uses libmemcached
php7.0-mongodb - MongoDB driver for PHP
php7.0-msgpack - MessagePack serializer for PHP
php7.0-mysql - MySQL module for PHP
php7.0-odbc - ODBC module for PHP
php7.0-opcache - Zend OpCache module for PHP
php7.0-pgsql - PostgreSQL module for PHP
php7.0-phpdbg - server-side, HTML-embedded scripting language (PHPDBG binary)
php7.0-pspell - pspell module for PHP
php7.0-readline - readline module for PHP
php7.0-recode - recode module for PHP
php7.0-redis - PHP extension for interfacing with Redis
php7.0-snmp - SNMP module for PHP
php7.0-soap - SOAP module for PHP
php7.0-sqlite3 - SQLite3 module for PHP
php7.0-ssh2 - Bindings for the libssh2 library
php7.0-sybase - Sybase module for PHP
php7.0-tidy - tidy module for PHP
php7.0-xdebug - Xdebug Module for PHP
php7.0-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP
php7.0-xmlrpc - XMLRPC-EPI module for PHP
php7.0-xsl - XSL module for PHP (dummy)
php7.0-zip - Zip module for PHP

# apt-cache search php7.0-\* | grep -i mysql
php7.0-mysql - MySQL module for PHP

php7 config files are located in /etc/php/7.0/ directory as follows:

    /etc/php/7.0/apache2/ – PHP 7 with Apache 2
    /etc/php/7.0/fpm/ – PHP 7 fpm for Nginx/Lighttpd/Apache2 and other server.
    /etc/php/7.0/mods-available/ – All php ini config file for PHP modules such as gd/mysql/memecached and others.

Edit files and configure web-server as desired.

# php -v
PHP 7.0.18-1~dotdeb+8.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.18-1~dotdeb+8.1, Copyright (c) 1999-2017, by Zend Technologies

# php -m
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

# apache2 -v
Server version: Apache/2.4.10 (Debian)
Server built:   Feb 24 2017 18:40:28

# mysql --version
mysql  Ver 14.14 Distrib 5.5.55, for debian-linux-gnu (x86_64) using readline 6.3

nano /etc/php/7.0/apache2/php.ini
# Edit to be: upload_max_filesize = 24M
# Edit to be: post_max_size = 32M
service apache2 restart
DawoudIO commented 7 years ago

my prod system is using CentOS see http://docs.churchcrm.io/en/latest/Installation/CentOS7/

apmuthu commented 7 years ago

CentOS 7 works perfectly. It is just that Debian on OpenVZ VM is rock solid on a Debian host..

crossan007 commented 5 years ago

PHP 7.0 is not supported. Closing.