How do I install missing PHP modules (intl)?

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
JensBr
New here
Posts: 6
Joined: Sat Nov 14, 2020 5:11 pm

Re: How do I install missing PHP modules (intl)?

Post by JensBr »

  1. install libicu
    http://mirror.centos.org/centos/7/os/x8 ... x86_64.rpm
    • extract
    • copy *.so files to /share/ext_lib/usr/local/lib and chmod 755
    • create a *.sh in /share/ext_lib -> in my case i named autostart.sh and paste following content:

      Code: Select all

      ln -s -f /share/ext_lib/usr/local/lib/libicudata.so.50.2 /usr/local/lib/libicudata.so.50.2
      ln -s -f /share/ext_lib/usr/local/lib/libicudata.so.50.2 /usr/local/lib/libicudata.so
      
      insert for all 8 *.so.50.2 files in this format (in sum 16 lines)
      also insert:

      Code: Select all

      \cp /share/ext_lib/etc/config/php.d/20-intl.ini /etc/config/php.d/
      \cp /share/ext_lib/etc/config/php.d/40-apcu.ini /etc/config/php.d/
      
continue...
You do not have the required permissions to view the files attached to this post.
Last edited by JensBr on Sun Nov 15, 2020 2:49 pm, edited 2 times in total.
JensBr
New here
Posts: 6
Joined: Sat Nov 14, 2020 5:11 pm

Re: How do I install missing PHP modules (intl)?

Post by JensBr »

  • run this script in ssh commandline:

    Code: Select all

    /share/ext_lib/autostart.sh
  • run command:

    Code: Select all

    ldconfig
  • check *.so:

    Code: Select all

    ldd /share/ext_lib/usr/local/apache/modules/apcu.so
    ldd /share/ext_lib/usr/local/apache/modules/intl.so
    

    there was no more "not found" in dependencies
continue...
Last edited by JensBr on Sun Nov 15, 2020 2:47 pm, edited 1 time in total.
JensBr
New here
Posts: 6
Joined: Sat Nov 14, 2020 5:11 pm

Re: How do I install missing PHP modules (intl)?

Post by JensBr »

  1. add autostart.sh to autostart

    source: viewtopic.php?t=112970
    • type following commands in ssh comandline

      Code: Select all

      mount $(/sbin/hal_app --get_boot_pd port_id=0)6 /tmp/config
      touch /tmp/config/autorun.sh
      chmod +x /tmp/config/autorun.sh
      $EDITOR /tmp/config/autorun.sh
      
    • press i for insert
    • type:

      Code: Select all

      /share/ext_lib/autostart.sh
      
    • press ESC and type :wq for save
    • type following command in ssh commandline:

      Code: Select all

      umount /tmp/config
continue...
Last edited by JensBr on Sun Nov 15, 2020 2:48 pm, edited 1 time in total.
JensBr
New here
Posts: 6
Joined: Sat Nov 14, 2020 5:11 pm

Re: How do I install missing PHP modules (intl)?

Post by JensBr »

  1. Restart Web-Server or NAS
    • if you edit the php.ini under "webpage of nas -> app: setttings -> applications -> web server -> php.ini -> edit" and click commit the web server is restarting
    • or restart the service /etc/init.d/Qthttpd restart
    • or restart the NAS
  2. check php extensions

    type in ssh commandline:

    Code: Select all

    /usr/local/apache/bin/php -m
    to list the enabled php extension or

    Code: Select all

    /usr/local/apache/bin/php -i
    to get more info (if something wrong there are error messages at first lines of output)

    or create a *.php file with phpinfo();
with this two extension it is possible to run owncloud on the internal webserver with ssl
i hope i can help somebody


p.s. is very hard to post theses messages, because the spam protection is very hard in this forum... (alert after submit "...seems spam, contains contacts, ...")
Last edited by JensBr on Sun Nov 15, 2020 2:49 pm, edited 1 time in total.
JensBr
New here
Posts: 6
Joined: Sat Nov 14, 2020 5:11 pm

Re: How do I install missing PHP modules (intl)?

Post by JensBr »

some tips for owncloud:
  • i used vhost with seperate port for access from external/internet
  • i used a hidden share folder for owncloud data
  • for htst edit the apache.conf under /usr/local/apache/conf from:

    Code: Select all

    ...
    <IfModule headers_module>
    	Header unset X-Frame-Options
    	Header always edit Set-Cookie ^(.*)$ $1;HttpOnly
    ...
    
    to

    Code: Select all

    ...
    <IfModule headers_module>
    	Header unset X-Frame-Options
    	Header always edit Set-Cookie ^(.*)$ $1;HttpOnly
    	Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
    ...
    
  • for access from ios or android app add line in vhost (if used) to the httpd-ssl-vhosts-user.conf under /usr/local/apache/conf/extra/:

    Code: Select all

    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    
  • apcu use in config.php:

    Code: Select all

    <?php
    $CONFIG = array (
    ...
      'filelocking.enabled' => true,
      'memcache.local' => '\\OC\\Memcache\\APCu',
      'memcache.locking' => '\\OC\\Memcache\\APCu',
    ...
    
    
kameel
First post
Posts: 1
Joined: Wed Sep 23, 2015 1:34 am

Re: How do I install missing PHP modules (intl)?

Post by kameel »

Thank you so much for your instructions, nextcloud is running smoothly on my QNAP now! :D
JensBr wrote: Sun Nov 15, 2020 12:40 am Hello,

i add successfully apcu and intl to my ts-453A internal php.

following steps:
  1. create new share folder
    • create new share folder, only access for admin and hide in network
    • i my case the name is "ext_lib" -> after create the path is /share/ext_lib
    • i create 3 folders in /share/ext_lib with chmod 755:

      Code: Select all

      /share/ext_lib/etc/config/php.d
      /share/ext_lib/usr/local/lib
      /share/ext_lib/usr/local/apache/modules
      
  2. load extensions (qts is x86_64)

    http://mirror.centos.org/centos/7/sclo/ ... x86_64.rpm
    http://mirror.cisp.com/CentOS/7/sclo/x8 ... x86_64.rpm
    • extract both
    • copy *.so files to /share/ext_lib/usr/local/apache/modules and chmod 755
    • change in intl.ini the line with:

      Code: Select all

      extension=intl.so
      to

      Code: Select all

      extension=/share/ext_lib/usr/local/apache/modules/intl.so
      and in apcu.ini the line with:

      Code: Select all

      extension=apcu.so
      to

      Code: Select all

      extension=/share/ext_lib/usr/local/apache/modules/apcu.so
    • copy *.ini files to /share/ext_lib/etc/config/php.d and chmod 755
  3. check dependencies for *.so
    • ssh needed
    • login, press q and then y to input commands
    • check *.so:

      Code: Select all

      ldd /share/ext_lib/usr/local/apache/modules/apcu.so
      ldd /share/ext_lib/usr/local/apache/modules/intl.so
      

      -> if there an dependency with "not found" you have to install them -> in may case is was libicu*50.so
continue...
User avatar
moody_blue
Easy as a breeze
Posts: 266
Joined: Tue Jan 10, 2017 9:23 am

Re: How do I install missing PHP modules (intl)?

Post by moody_blue »

QNAP TS-253A 8G QTS 5.0.1.2145
Plex Media Server 1.29.0.6209
OpenHAB 3.4.0.M2
Unifi 7.2.92
Apache80 2454.8230
GLPI 10.0.3
User avatar
abdesmok
New here
Posts: 5
Joined: Sun Jul 26, 2015 10:27 pm

Re: How do I install missing PHP modules (intl)?

Post by abdesmok »

Install the package PHPExtensions from the AppCenter. (Seems recently added to address this same issue)
Tryout79
New here
Posts: 2
Joined: Thu Jan 28, 2021 6:21 pm

Re: How do I install missing PHP modules (intl)?

Post by Tryout79 »

There is an app in the store: PHP Extension. Actually I haven't understand how to use, It's like a service in background but there isn't a menu or something else to activate ext (here the link: https://www.qnap.com/en/app_releasenote ... Extensions)
I'm a newbie, but for a project of mine i need to install some extension and i solve quite at all with a newbie workaround: I installed wordpress app. it installed automatically many ext I need, included intl
But i still need bz2 and xdiff.
Here the list of all ext I activated by installing wordpress (some of these ext are already installed when you active webserver):
php-curl
php-dom (libxml >= 2.9)
php-fileinfo
php-ftp
php-gd
php-iconv
php-imagick
php-intl
php-json
php-ldap
php-mbstring
php-mysqlnd
php-mysqli
php-openssl
php-session
php-soap
php-sockets
php-sqlite3
php-xml
php-xsl
php-zlib
php-zip
Does anyone know how to use PHP Extension App in the store?
Tryout79
New here
Posts: 2
Joined: Thu Jan 28, 2021 6:21 pm

Re: How do I install missing PHP modules (intl)?

Post by Tryout79 »

abdesmok wrote: Thu Jan 21, 2021 5:27 am Install the package PHPExtensions from the AppCenter. (Seems recently added to address this same issue)
Sorry, I have read this too late. Do you know how to use this app?
Microcabin
Starting out
Posts: 15
Joined: Sun Mar 17, 2013 1:01 am

Re: How do I install missing PHP modules (intl)?

Post by Microcabin »

abdesmok wrote: Thu Jan 21, 2021 5:27 am Install the package PHPExtensions from the AppCenter. (Seems recently added to address this same issue)
This package is not avaliable at QTS Hero OS, Do you know if I cant install it manualy?

Thanks.
Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”