Skip to content

Instantly share code, notes, and snippets.

@GitHub30
Last active September 24, 2023 03:30
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 GitHub30/0b8d548d0912ff4cc7b065e378904fd0 to your computer and use it in GitHub Desktop.
Save GitHub30/0b8d548d0912ff4cc7b065e378904fd0 to your computer and use it in GitHub Desktop.
cd
VERSION=$(php -r 'echo phpversion();')
wget https://www.php.net/distributions/php-$VERSION.tar.gz
tar xf php-$VERSION.tar.gz
cd php-$VERSION/ext/exif
phpize
./configure
make
echo n | make test
make install
sed -i 's/;extension=exif/extension=exif/' /opt/php/$VERSION/ini/php.ini
php -m | grep exif
cd
VERSION=$(php -r 'echo phpversion();')
wget https://www.php.net/distributions/php-$VERSION.tar.gz
tar xf php-$VERSION.tar.gz
cd php-$VERSION/ext/gd
phpize
./configure
make
echo n | make test
make install
sed -i 's/;extension=gd/extension=gd/' /opt/php/$VERSION/ini/php.ini
php -m | grep gd
# https://serverfault.com/a/57378/347079
sudo apt update
sudo apt install -y libmagickwand-dev libmagickcore-dev
cd
VERSION=$(php -r 'echo phpversion();')
git clone https://github.com/Imagick/imagick
cd imagick
phpize && ./configure
make
make install
echo 'extension=imagick' >> /opt/php/$VERSION/ini/php.ini
php -m | grep imagick
cd
VERSION=$(php -r 'echo phpversion();')
wget https://www.php.net/distributions/php-$VERSION.tar.gz
tar xf php-$VERSION.tar.gz
cd php-$VERSION/ext/intl
phpize
./configure
make
echo n | make test
make install
sed -i 's/;extension=intl/extension=intl/' /opt/php/$VERSION/ini/php.ini
php -m | grep intl
cd
VERSION=$(php -r 'echo phpversion();')
wget https://www.php.net/distributions/php-$VERSION.tar.gz
tar xf php-$VERSION.tar.gz
cd php-$VERSION/ext/mysqli
phpize
./configure
make
echo n | make test
make install
sed -i 's/;extension=mysqli/extension=mysqli/' /opt/php/$VERSION/ini/php.ini
php -m | grep mysqli
sudo apt install -y libzip-dev
cd
VERSION=$(php -r 'echo phpversion();')
wget https://www.php.net/distributions/php-$VERSION.tar.gz
tar xf php-$VERSION.tar.gz
cd php-$VERSION/ext/zip
phpize
./configure
make
echo n | make test
make install
echo 'extension=zip' >> /opt/php/$VERSION/ini/php.ini
php -m | grep zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment