HOW TO INSTALL V3 VERSIONS:
Before we start making changes to the code, I strongly urge you to backup the source files so that you do not have any problems if something goes wrong. The list of files that we have to change:
/app/vendor/mgp25/instagram-php
Step 1
To begin with, you’ll have to check the Ubuntu, PHP and CURL versions that’s currently installed in your system by typing the following commands:
lsb_release -a
php -v
curl -V
Minimum server requirements:
- Ubuntu 20.4
- PHP v.7.4
- CURL v.7.73
1.1. Ubuntu 20.04 is required for the correct work of Zstd compression in API.
IMPORTANT: Create a full server back-up before update!
Upgrade Ubuntu 18.04 to 20.04 LTS using command line:
https://www.cyberciti.biz/faq/upgrade-ubuntu-18-04-to-20-04-lts-using-command-line/
Notice that you cannot run both Apache and Nginx on the same port.
Don’t forget to disable old PHP versions and keep working only PHP 7.4. It’s important to not running more than one PHP version in the same moment.
You’ll need to disable Apache webserver using command line:
sudo systemctl disable --now apache2
1.2. Curl update.
Upgrade
Curl to
7.73 using command line:
apt-get update
apt-get install build-essential libcurl4 openssl libssl-dev libssh-dev zlib1g-dev zlib1g libbrotli-dev brotli libkrb5-dev libldap2-dev librtmp-dev libpsl-dev libnghttp2-dev zstd libzstd-dev
wget
https://curl.haxx.se/download/curl-7.73.0.tar.gz
tar -xvf curl-7.73.0.tar.gz && cd curl-7.73.0
./configure --with-libzstd --with-libssh2 --with-libmetalink --with-ngtcp2; make && make install
sudo ldconfig
1.3. Zstd extension for PHP.
Installation of
Zstd Extension for PHP is required. Without that PHP extension API will not work correctly.
git clone --recursive --depth=1
https://github.com/kjdev/php-ext-zstd.git
cd php-ext-zstd
phpize
./configure
make
make install
cd modules
cp zstd.so /usr/local/
Open
php.ini and add this line anywhere after
“
PHP:
”[/B]:
extension = "/usr/local/zstd.so"
Then just save the file and restart server using:
sudo service nginx restart
sudo service php7.4-fpm restart
[B]php7.x-fpm[/B] – depends on which php you use.
To check if everything is working create a file called [B]phpinfo.php[/B] into your root web directory and put these lines of code:
<?php phpinfo(); ?>
And then visit [B]http://yoursite.com/phpinfo.php[/B] and search “zstd”.
If that is installed correctly, you will see the latest version is showing up.
[SIZE=5][B]1.4. API files update.[/B][/SIZE]
[LIST]
[*]Unzip file [B]api-files (Android only).zip[/B], which attached to your order in [URL='https://nextpost.tech/dashboard/']Dashboard[/URL].
[*]Replace [B]/app/vendor/mgp25/instagram-php[/B] folder with the folder from [B]api-files (Android only).zip[/B].
[/LIST]