Skip to content

Instantly share code, notes, and snippets.

@agusmu
Last active February 9, 2022 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agusmu/06412ccc0d190a39ff46cdb02de4d57d to your computer and use it in GitHub Desktop.
Save agusmu/06412ccc0d190a39ff46cdb02de4d57d to your computer and use it in GitHub Desktop.
How to setup browscap (get_browser php function) in RunCloud

How to setup browscap (get_browser php function) in RunCloud

First, login to your server from terminal using root

ssh root@YOUR_IP_ADDRESS

Second, run this command to download the browscap file

wget http://browscap.org/stream?q=Lite_PHP_BrowsCapINI -O /etc/php-extra/browscap.ini

Third, setup this browscap to your php.ini

For example, I want to setup to PHP7.4

Create new file using text editor, vi or nano for example,

nano /etc/php74rc/conf.d/browscap.ini

then add this content to this file and save it

[browscap]
; http://php.net/browscap
browscap = /etc/php-extra/browscap.ini

Fourth, reload the PHP-FPM by running this command

systemctl reload php74rc-fpm

Done!

You can repeat the step by step above for other PHP versions, if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment