Upgrading Mediawiki to PHP 7.0

The discussion lounge for third-party packages.
Forum rules
Please note the Disclaimer before modifying your Synology Product.
j.xavier.atero
Beginner
Beginner
Posts: 22
Joined: Wed Aug 10, 2016 8:51 am
Location: Barcelona

Upgrading Mediawiki to PHP 7.0

Postby j.xavier.atero » Thu Dec 07, 2017 9:51 pm

Adding this entry just as a reference ...

1- Install PHP 7.0

2- Enable PHP extensions:
    - Main Menu > Web Station > PHP Settings
    - PHP version: PHP 7.0
    - Enable extensions:
      - iconv
      - mcrypt
      - mysqli
    - Click Apply
    :!: If iconv extension not enabled, the following error message will be displayed:

    ... Installing some PHP extensions is required.

    Required components

    You are missing a required extension to PHP that MediaWiki requires to run. Please install:

    iconv (more information).


    :!: If mcrypt extension not enabled, the following error message will be displayed: ... Encryption is not available. You really should install the PHP OpenSSL extension, or failing that the mcrypt extension ...

    :!: If mysqli extension not enabled, the following error message will be displayed: ... Database::factory no viable database extension found for type 'mysql' ...
3- Change PHP version of Web Station:
    - Main Menu > Web Station > General Settings
    - Select PHP: PHP 7.0
    - Click Apply
Last edited by j.xavier.atero on Sat Dec 09, 2017 2:00 am, edited 1 time in total.
User avatar
slavikf
Sharp
Sharp
Posts: 183
Joined: Fri Dec 10, 2010 7:37 am
Location: Seattle, WA

Re: Upgrading Mediawiki to PHP 7.0

Postby slavikf » Fri Dec 08, 2017 1:54 am

So, were you able to install it?

I got PHP7 running on my DS412+, but mysqli extension is missing, - that "Enable PHP extensions" doesn't enable anything...
owner of DS412+
j.xavier.atero
Beginner
Beginner
Posts: 22
Joined: Wed Aug 10, 2016 8:51 am
Location: Barcelona

Re: Upgrading Mediawiki to PHP 7.0

Postby j.xavier.atero » Sat Dec 09, 2017 2:02 am

slavikf wrote:So, were you able to install it?

I got PHP7 running on my DS412+, but mysqli extension is missing, - that "Enable PHP extensions" doesn't enable anything...


Make sure that you are enabling the extensions in PHP version: PHP 7.0. I have added that missing information to my original post.

2- Enable PHP extensions:
    - Main Menu > Web Station > PHP Settings
    - PHP version: PHP 7.0
    - Enable extensions:
      - iconv
      - mcrypt
      - mysqli
    - Click Apply
User avatar
slavikf
Sharp
Sharp
Posts: 183
Joined: Fri Dec 10, 2010 7:37 am
Location: Seattle, WA

Re: Upgrading Mediawiki to PHP 7.0

Postby slavikf » Mon Dec 11, 2017 11:37 pm

As I said, - I enabled `mysqli` extension - but I still don't have mysqli function, because mysql extension is not loaded.

so, I'm going to say it again: "Enable PHP extensions" doesn't enable anything, particularly mysql.

My extension folder is empty - it doesn't have single extension file.
owner of DS412+
j.xavier.atero
Beginner
Beginner
Posts: 22
Joined: Wed Aug 10, 2016 8:51 am
Location: Barcelona

Re: Upgrading Mediawiki to PHP 7.0

Postby j.xavier.atero » Tue Dec 12, 2017 1:49 am

I run a:

Code: Select all

<?php phpinfo(); ?>

and it displays all the extensions enabled, including mysqli. I am attaching part of the output for your reference:

PHP Version 7.0.21

System Linux NASBML 3.10.102 #15217 SMP Fri Nov 10 20:10:53 CST 2017 x86_64
Build Date Jul 28 2017 15:55:49
Server API FPM/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/etc/php70
Loaded Configuration File /usr/syno/etc/packages/WebStation/php70/php.ini
Scan this dir for additional .ini files no value
Additional .ini files parsed /usr/syno/etc/packages/WebStation/php70/conf.d/user_settings.ini
PHP API 20151012
PHP Extension 20151012
Zend Extension 320151012
Zend Extension Build API320151012,NTS
PHP Extension Build API20151012,NTS
Debug Build no
Thread Safety disabled
Zend Signal Handling disabled
Zend Memory Manager enabled
Zend Multibyte Support provided by mbstring
IPv6 Support enabled
DTrace Support disabled
Registered PHP Streams compress.zlib, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports tcp, udp, unix, udg
Registered Stream Filters zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, convert.iconv.*, mcrypt.*, mdecrypt.*

...

mysqli

MysqlI Support enabled
Client API library version mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
Active Persistent Links 0
Inactive Persistent Links 0
Active Links 0
Directive Local Value Master Value
mysqli.allow_local_infile On On
mysqli.allow_persistent On On
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket /run/mysqld/mysqld.sock /run/mysqld/mysqld.sock
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.max_persistent Unlimited Unlimited
mysqli.reconnect Off Off
mysqli.rollback_on_cached_plink Off Off

...


I guess PHP has been compiled already with the extensions, and the folder /usr/local/lib/php70/modules is empty (there is where extension_dir has been defined in /usr/syno/etc/packages/WebStation/php70/php.ini). If you check folder /usr/local/lib/php56/modules for PHP5.6 is also empty, but I guess that it is possible to add additional extensions there.

Return to “Third-party Packages”

Who is online

Users browsing this forum: No registered users and 5 guests