Page 1 of 1

Error: \compat.inc.php on line 104

Posted: Wed Oct 11, 2006 6:37 pm
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

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

Posted: Wed Oct 11, 2006 8:48 pm
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

Thanks !! :D

Posted: Thu Oct 12, 2006 10:40 am
by xqTpx
Hi,

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

:D

Posted: Fri Nov 03, 2006 7:40 pm
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);
    }
}

Posted: Mon Nov 06, 2006 12:33 pm
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?

Posted: Tue Nov 07, 2006 10:00 am
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

Posted: Tue Nov 07, 2006 10:02 am
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

Posted: Tue Nov 07, 2006 10:19 am
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.

Posted: Tue Nov 07, 2006 11:59 am
by garvinhicking
Hi!

1.0.3 was just released :)

Regards,
Garvin

Posted: Tue Nov 07, 2006 3:09 pm
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