xiao Posted December 14, 2007 Share Posted December 14, 2007 My WAMP installation doesn't seem to have the following functions installed: http://php.net/filter While php.net states that they're included in the default module. How do I get them in my installation? Quote Link to comment https://forums.phpfreaks.com/topic/81733-undefined-functions/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 14, 2007 Share Posted December 14, 2007 The PECL Windows binaries are available here - http://www.php.net/downloads.php Download the PECL zip archive that matches your version of php, un zip it, copy the .dll that you want to use into your php extensions folder (ext for php5), and add a line to your php.ini file to load the extension. Quote Link to comment https://forums.phpfreaks.com/topic/81733-undefined-functions/#findComment-415118 Share on other sites More sharing options...
xiao Posted December 14, 2007 Author Share Posted December 14, 2007 what would that line look like? And which .dll file would I need? Quote Link to comment https://forums.phpfreaks.com/topic/81733-undefined-functions/#findComment-415140 Share on other sites More sharing options...
PFMaBiSmAd Posted December 14, 2007 Share Posted December 14, 2007 what would that line look like? Just like the other extension lines in the php.ini file, but with a name specific to the filter extension dll. And which .dll file would I need I don't know as I have never used the filter functions, but if you look at the file names I am sure you probably can find the right one. Quote Link to comment https://forums.phpfreaks.com/topic/81733-undefined-functions/#findComment-415161 Share on other sites More sharing options...
xiao Posted December 15, 2007 Author Share Posted December 15, 2007 I think I've figured out what to add to the php.ini file, but I have no idea which dll I need. The names don't look too obvious to me. Quote Link to comment https://forums.phpfreaks.com/topic/81733-undefined-functions/#findComment-415338 Share on other sites More sharing options...
PFMaBiSmAd Posted December 15, 2007 Share Posted December 15, 2007 What version of PHP are you using. PHP 5.2 and above has the filter functions built in. Some of the PHP 5.1.x versions have the php_filter.dll in the PECL zip package. Older versions are available on the pecl.php.net site. Quote Link to comment https://forums.phpfreaks.com/topic/81733-undefined-functions/#findComment-415465 Share on other sites More sharing options...
xiao Posted December 15, 2007 Author Share Posted December 15, 2007 I have v5.2.2, and in phpinfo(), there's a tabel named Filter. I don't see why they aren't recognized :s Quote Link to comment https://forums.phpfreaks.com/topic/81733-undefined-functions/#findComment-415550 Share on other sites More sharing options...
PFMaBiSmAd Posted December 15, 2007 Share Posted December 15, 2007 You would need to post your code and the error message. It's likely just a typo you made. Quote Link to comment https://forums.phpfreaks.com/topic/81733-undefined-functions/#findComment-415579 Share on other sites More sharing options...
xiao Posted December 15, 2007 Author Share Posted December 15, 2007 $page = filter_sanitize_int($_GET['page']); (line 19 in matches.php) I also tried using caps, but that doesn't work either. When I type filter and press ctrl+space in phpDesigner, it gives filter_sanitize_number_int as an option. I found a line in php.ini loading php_filter.dll and I uncommented it, but there's no php_filter.dll in my extensions folder. Nor in the one I downloaded. And the error: Fatal error: Call to undefined function filter_sanitize_number_int() in C:\xampp\htdocs\league\matches.php on line 19 Quote Link to comment https://forums.phpfreaks.com/topic/81733-undefined-functions/#findComment-415618 Share on other sites More sharing options...
PFMaBiSmAd Posted December 15, 2007 Share Posted December 15, 2007 As always, the php manual is where you should lookup how to use functions - http://www.php.net/manual/en/ref.filter.php FILTER_SANITIZE_NUMBER_INT is a constant that you use in the filter functions, it is not a function name. Quote Link to comment https://forums.phpfreaks.com/topic/81733-undefined-functions/#findComment-415620 Share on other sites More sharing options...
wildteen88 Posted December 15, 2007 Share Posted December 15, 2007 filter_sanitize_number_int is not actually a function within PHP. Instead it is a constant. This constant is used in conjunction with PHP's filter_* functions. edit: PFMaBiSmAd beat me Quote Link to comment https://forums.phpfreaks.com/topic/81733-undefined-functions/#findComment-415621 Share on other sites More sharing options...
xiao Posted December 15, 2007 Author Share Posted December 15, 2007 lol, sorry Got it working now Quote Link to comment https://forums.phpfreaks.com/topic/81733-undefined-functions/#findComment-415639 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.