php7?

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
br8kwall
Posts: 35
Joined: 03 Mar 2005, 17:36

php7?

Post by br8kwall »

Searching around I don't see any reference to php7, but I was wondering if anyone knows if it's support or doesn't work for 1.3.0rc1? Apologies if it's documented somewhere and I missed it.

I'm running the installer and it tries to install before throwing
  • Setting Database Type GOOD
    Checking PHP support for database type BAD. database is not supported by PHP. Check that it has been compiled into your server.
    Checking ADOdb Library version is at least 5.19 GOOD
Here's what I have installed in Ubuntu LTS.

dpkg --get-selections | grep mysql
libapache2-mod-auth-mysql install
libdbd-mysql-perl install
libmysqlclient18:amd64 install
mysql-client-5.5 install
mysql-client-core-5.5 install
mysql-common install
mysql-server install
mysql-server-5.5 install
mysql-server-core-5.5 install

php5-mysql deinstall
php7.0-mysql install

dpkg --get-selections | grep php
libapache2-mod-php5 deinstall
libapache2-mod-php7.0 install
php-apcu install
php-apcu-bc install
php-cli install
php-common install
php-gd install
php-pear install
php-readline install

php5-cli deinstall
php5-common deinstall
php5-curl deinstall
php5-gd deinstall
php5-json deinstall
php5-mcrypt deinstall
php5-mysql deinstall
php5-readline deinstall
php7.0-cli install
php7.0-common install
php7.0-curl install
php7.0-gd install
php7.0-json install
php7.0-mcrypt install
php7.0-mysql install
php7.0-opcache install
php7.0-readline install



php -v
PHP 7.0.2-1+deb.sury.org~trusty+1 (cli) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: php7?

Post by atrol »

br8kwall wrote:Searching around I don't see any reference to php7
There is none.
br8kwall wrote:if anyone knows if it's support or doesn't work for 1.3.0rc1?
Can't recommend at the moment. You should use this combination just if you are a PHP expert and know how to deal with problems if they occur.
br8kwall wrote: Checking PHP support for database type BAD. database is not supported by PHP. Check that it has been compiled into your server.
I assume this is no PHP 7 issue, but a missing mysqli extension http://php.net/manual/en/mysqli.installation.php
Please use Search before posting and read the Manual
cinatic
Posts: 2
Joined: 19 Feb 2016, 21:15

Re: php7?

Post by cinatic »

The following has worked to me:

1. Fix this https://www.mantisbt.org/bugs/view.php?id=20484

In the file core/lang_api.php around line 98 you will find the following function which starts as follows:

Code: Select all

function lang_get_default() {
        global $g_active_language;

        $t_lang = false;
Change it by adding two lines so it reads as follows:

Code: Select all

function lang_get_default() {
        global $g_active_language;

        $t_pref_file = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'user_pref_api.php';
        require_once($t_pref_file);

        $t_lang = false;
2. change the db_type in yourMantisBT/config_inc.php to mysqli (line 3) (make also sure you also enable the mysqli modules in your httpd/Apache configuration file!)

Code: Select all

        $g_db_type = 'mysqli';
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: php7?

Post by atrol »

Not sure, but it seems that you did not notice that br8kwall tried a new installation of 1.3, so
- the mentioned code changes will not work and are not needed
- config_inc.php does not even exist when starting the installation, so you can't change anything in it
- mysql is not offered during installation if you use PHP 7, you get just mysqli in the list
Please use Search before posting and read the Manual
cinatic
Posts: 2
Joined: 19 Feb 2016, 21:15

Re: php7?

Post by cinatic »

Yes right I didn't noticed there is a new release out there. Maybe this will help others with their older version
Post Reply