ID:               47626
 User updated by:  geo_pro at hotmail dot com
 Reported By:      geo_pro at hotmail dot com
 Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: FreeBSD 7.1
 PHP Version:      5.2.9
 New Comment:

Yes, thanks a lot.

I have been thinking (obviously wrong) that when something is enabled
by default in php5 (
http://www.php.net/manual/en/filter.installation.php ) it should exist
in php5 on freebsd without installing additional ports or extensions.

My problem was solved when I installed php5-filter port :)
now the given example code works as expected, and I dont get any more
errors in the log.

Sorry for reporting this as a bug, my mistake.


Previous Comments:
------------------------------------------------------------------------

[2009-03-11 22:26:08] [email protected]

It looks more like you use freebsd's ports. Please ask support there. I
suppose they provide everything as shared extension (which is not a very
good idea).

------------------------------------------------------------------------

[2009-03-11 21:55:46] [email protected]

The filter extension is needed, with --disable-all you disable
everything. Add --enable-filter

------------------------------------------------------------------------

[2009-03-11 19:14:24] geo_pro at hotmail dot com

I used the freebsd ports system. I updated my ports tree and did:
cd /usr/ports/lang/php5/ && make install clean

Here is the Configure Commandline I got from phpinfo():

'./configure' '--with-layout=GNU'
'--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all'
'--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection'
'--program-prefix=' '--enable-fastcgi'
'--with-apxs2=/usr/local/sbin/apxs' '--with-regex=php'
'--with-zend-vm=CALL' '--enable-debug' '--disable-ipv6'
'--prefix=/usr/local' '--mandir=/usr/local/man'
'--infodir=/usr/local/info/' '--build=i386-portbld-freebsd7.1'

------------------------------------------------------------------------

[2009-03-11 19:01:18] [email protected]

How did you install PHP? Do you have the configure line?

------------------------------------------------------------------------

[2009-03-11 18:45:15] geo_pro at hotmail dot com

Description:
------------
apache 2.2, php as apache module

It seems that filter_input() function is missing. As far as I know it
should be in "base" php (no extensions required).

I noticed this in my apache log:
PHP Fatal error:  Call to undefined function filter_input() in
/usr/local/www/pulsar/temp/testtt.php on line 2

testtt.php is exactly the same sample from
http://www.php.net/manual/en/function.filter-input.php

This happens to php 5.2.9 and php 5.2.8 too (havent tested older)

I'll post more details if requested

Reproduce code:
---------------
<?php
$search_html = filter_input(INPUT_GET, 'search',
FILTER_SANITIZE_SPECIAL_CHARS);
$search_url = filter_input(INPUT_GET, 'search',
FILTER_SANITIZE_ENCODED);
echo "You have searched for $search_html.\n";
echo "<a href='?search=$search_url'>Search again.</a>";
?>




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=47626&edit=1

Reply via email to