Join the community today
Register Now

PHP-FPM PHP Filter not working

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

  1. Oxide

    Oxide Active Member

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    4:45 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

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    4:45 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

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

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    4:45 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    502
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    4:45 AM
    There is nothing called suhosin in php.ini? Weird..
     
  6. Oxide

    Oxide Active Member

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

    eva2000 Administrator Staff Member

    28,984
    6,579
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,766
    Local Time:
    4:45 AM
    Nginx 1.13.x
    MariaDB 5.5