Installing PHP extensions on shared hosting

后端 未结 4 993
渐次进展
渐次进展 2021-02-15 16:24

I need to enable the mcrypt functions on my website, except I\'m on a shared host (running linux) and obviously don\'t have access to the php.ini file. There does s

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-15 16:48

    The MCrypt Sourceforge page should have it http://mcrypt.sourceforge.net/
    To compile it just:

    wget http://superb-east.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.8.tar.gz
    tar -xzvf libmcrypt-2.5.8.tar.gz
    cd libmcrypt-2.5.8
    ./configure
    make
    sudo make install
    

    EDIT: Can you reference it with a direct path?
    What have you tried?

    Edit2: It seems that you can only load moduals from the extensions directory set in the php.ini and you cannot override extensions_dir with ini_set so you will either have to convince your host to install it or if they allow you to have your own php.ini (many do usually in [username]/php.ini) then you could set the extensions_dir in there and load the modual with that.

提交回复
热议问题