Error: \compat.inc.php on line 104

Having trouble installing serendipity?
Post Reply
xqTpx
Regular
Posts: 25
Joined: Wed Oct 11, 2006 6:29 pm

Error: \compat.inc.php on line 104

Post by xqTpx »

Hi,

i'm trying to install senerdipity on an windows 2003 server with apache 2.2 and php 5. So far so good ;-). Apache and php works fine as far as i can tell, im actually very new to apache so please be patient :).

I don't get the first installation site from serendipity.
When i open http://website.de/test/index.html its just white.

The appache is giving out the folllowing error:


[Wed Oct 11 18:17:30 2006] [error] [client 85.88.14.xx] PHP Fatal error: Call to undefined function input_name_to_filter() in C:\\www\\xxx\\test\\include\\compat.inc.php on line 104


Any hints ? ;-)

One more question please:
php needs access to some directorys. I didn't define any user in php yet so which user is php acutally using?

Thanks a lot for your time!

xqTpx
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Error: \compat.inc.php on line 104

Post by garvinhicking »

Hi!

That PHP error seems to be caused because your PHP setup advocates it has the "filter" extension loaded - but it does not provide the input_name_to_filter() function.

You could bypass this by just removing the whole IF-part frmo line 104 to 117...?
php needs access to some directorys. I didn't define any user in php yet so which user is php acutally using?
Uh, that's a Windows-specific thing. If your IIS runs as a system service, the user is that of the system service...Usually it's something like "IIS_USR".

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
xqTpx
Regular
Posts: 25
Joined: Wed Oct 11, 2006 6:29 pm

Thanks !! :D

Post by xqTpx »

Hi,

thanks for your answer, its working fine with your solution ;-).
Just deleting the lines solved the problem !!!

:D
bjornbjorn
Posts: 4
Joined: Fri Nov 03, 2006 7:36 pm
Contact:

Post by bjornbjorn »

Hi guys,

I think this is a problem with PHP 5.2.0 -- my host upgraded tonight and s9y went down.

I suggest the following fix in include/compat.inc.php:

Code: Select all

if (extension_loaded('filter') && function_exists("input_name_to_filter") && input_name_to_filter(ini_get('filter.default')) !== FILTER_UNSAFE_RAW) {
    foreach ($_POST as $key => $value) {
        $_POST[$key] = input_get(INPUT_POST, $key, FILTER_UNSAFE_RAW);
    }
    foreach ($_GET as $key => $value) {
        $_GET[$key] = input_get(INPUT_GET, $key, FILTER_UNSAFE_RAW);
    }
    foreach ($_COOKIE as $key => $value) {
        $_COOKIE[$key] = input_get(INPUT_COOKIE, $key, FILTER_UNSAFE_RAW);
    }
    foreach ($_SESSION as $key => $value) {
        $_SESSION[$key] = input_get(INPUT_SESSION, $key, FILTER_UNSAFE_RAW);
    }
}
Dawn
Regular
Posts: 69
Joined: Thu May 04, 2006 11:46 am

Post by Dawn »

I agree with bjornbjorn, since I've installed PHP 5.2.0 this weekend, I can't connect to my blog with exactly the same error.

Can a developer verify that we can use the fix of bjornbjorn?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Please read blog.s9y.org for details on that, we're also preparing a 1.0.3 release because of this.


Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Please read blog.s9y.org for details on that, we're also preparing a 1.0.3 release because of this.


Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Dawn
Regular
Posts: 69
Joined: Thu May 04, 2006 11:46 am

Post by Dawn »

@garvinhicking: Thx for your answer

I think I'll use bjornbjorn's temporary solution till 1.0.3 is released. I don't want to install the beta version of serendipity.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

1.0.3 was just released :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Dawn
Regular
Posts: 69
Joined: Thu May 04, 2006 11:46 am

Post by Dawn »

I've just upgraded my installation. It works nice :) Thanks a lot for your very fast release of this new version.

Greets,
Dawn
Post Reply