Want to subscribe to topics you're interested in?
Become a Member

PHP-FPM PHP Filter not working

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Oxide, Jun 11, 2015.

  1. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    9:19 AM
    I noticed that these kind of filters doesn't work for some reason. Anyone got any idea?

    They return invalid url no matter what:
    if (!filter_var($url, FILTER_VALIDATE_URL) === false)

    [root@server ~]# php -v
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/imagick.so' - libMagickWand.so.2: cannot open shared object file: No such file or directory in Unknown on line 0
    PHP 5.4.40 (cli) (built: May 7 2015 23:44:50)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with Suhosin v0.9.37.1, Copyright (c) 2007-2014, by SektionEins GmbH

    Any idea why? From what I'm aware, this is fully supported in 5.4

     
  2. eva2000

    eva2000 Administrator Staff Member

    55,156
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    9:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Code:
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/imagick.so' - libMagickWand.so.2: cannot open shared object file: No such file or directory in Unknown on line 0
    you're missing your imagick PHP extension

    run centmin.sh menu option 15 to recompile imagick php extension

    as to the filter no idea.. try disabling Suhosin as it could be blocking some stuff
     
  3. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    9:19 AM
    Most likely, curious how i could disable suhosin? would be nice with a option to uninstall too
     
  4. eva2000

    eva2000 Administrator Staff Member

    55,156
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    9:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    command below lists all custom PHP extensions' ini file paths for extensions added by Centmin Mod specifically
    Code:
    php --ini
    find the suhosin.ini path file and either delete it or edit it and comment out the extension load line and restart PHP-FPM service

    example
    Code:
    php --ini
    Configuration File (php.ini) Path: /usr/local/lib
    Loaded Configuration File:         /usr/local/lib/php.ini
    Scan for additional .ini files in: /etc/centminmod/php.d
    Additional .ini files parsed:      /etc/centminmod/php.d/a_customphp.ini,
    /etc/centminmod/php.d/curlcainfo.ini,
    /etc/centminmod/php.d/geoip.ini,
    /etc/centminmod/php.d/igbinary.ini,
    /etc/centminmod/php.d/imagick.ini,
    /etc/centminmod/php.d/memcache.ini,
    /etc/centminmod/php.d/memcached.ini,
    /etc/centminmod/php.d/mongodb.ini,
    /etc/centminmod/php.d/redis.ini,
    /etc/centminmod/php.d/suhosin.ini
    just remove /etc/centminmod/php.d/suhosin.ini
    Code:
    rm -rf /etc/centminmod/php.d/suhosin.ini
    
    or comment out load line for suhosin.so to disable, uncomment to re-enable
    Code:
    #extension=suhosin.so
    restart PHP
    Code:
    service php-fpm restart
    or with command shortcut
    Code:
    fpmrestart
     
  5. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    9:19 AM
    There is nothing called suhosin in php.ini? Weird..
     
  6. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    9:19 AM
    i removed the suhosin.ini file and it worked iwthout any errors :) thnx
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,156
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    9:19 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+