PHP GD bundled extension without recompiling PHP - solution

前端 未结 2 366
灰色年华
灰色年华 2020-12-16 07:28

The bundled extension offer a lot of functionality. I have spent a lot of time how to compile extension for my version of PHP. So there are instructions.

2条回答
  •  醉梦人生
    2020-12-16 08:07

    Another way:

    1. Go to rpmfind.net and search php-gd-bundled for you php version.
    2. Extract rpm (rpm2cpio archive_name.rpm | cpio -idmv)
    3. Backup your gd.so and then copy gd.so from archive to you php lib directory.

    Also I could compile a module with the following parameters:

    #! /bin/sh
    #
    # Created by configure
    
    './configure' \
    '--with-php-config=/usr/bin/php-config' \
    '--with-gd=shared' \
    '--with-freetype-dir=/usr' \
    '--with-vpx-dir=/usr' \
    '--with-jpeg-dir=/usr' \
    '--with-xpm-dir=/usr' \
    '--with-png-dir=/usr' \
    '--with-t1lib=/usr' \
    '--enable-gd-native-ttf' \
    "$@"
    

提交回复
热议问题