Last active
June 17, 2020 20:31
-
-
Save kaistaerk/f5538197d06ac91b0a870599450d9d51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Change to temp dir | |
cd /tmp | |
# Install php dev package if not installed | |
apt-get install php-dev | |
# Download last mailparse version | |
pecl download mailparse | |
# Actually its 3.1.0, check if there is a newer version | |
# and modify the following lines | |
tar xzf mailparse-3.1.0.tgz | |
cd mailparse-3.1.0 | |
# Run phpize | |
phpize | |
# Configure mailparse | |
./configure | |
# THE MAGIC: | |
# Disable the exception for mbstring | |
sed -i \ | |
's/^\(#error .* the mbstring extension!\)/\/\/\1/' \ | |
mailparse.c | |
# Make it | |
make | |
make install | |
############################################################## | |
# PHP Configuration | |
# This could be configured differently depending on the system | |
############################################################## | |
# Add php module | |
echo "extension=mailparse.so" > /etc/php/7.3/mods-available/mailparse.ini | |
# Activate php module | |
phpenmod mailparse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment