Page 1 of 1

Segmentation fault on setup

Posted: Wed Apr 30, 2008 12:42 pm
by wonko
Trying to setup s9y the page was always offered for download and segmentation faults appeared in the apache error log. After some research I found out that the line 24

Code: Select all

if (@include(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_'. $serendipity['lang'] .'.inc.php') ) {
in include/lang.inc.php caused the problem. For some reason $serendipity['lang'] was not set and the failing include broke php. This happened with PHP 4.4.8 and 5.2.0, serendipity version is 1.3.1.
Adding an is_file() before trying to include fixed the problem and is IMO quite more elegant than @include.

Posted: Wed Apr 30, 2008 5:04 pm
by judebert
Sounds like your config_local and/or config files are not being executed. Usually this happens because they get corrupted during FTP upload. Try uploading the files again.

Occasionally, this will be a hosting issue: the provider won't allow scripts to run outside the cgi directory, or doesn't like the permissions. For those issues, you'd have to check with your hosting service.

Posted: Wed Apr 30, 2008 6:26 pm
by garvinhicking
Hi!

Adding an is_file() check would mean another fileystem lookup that is already contained in include. To keep performance reasonable in file that are included everytime, I'd really not like to add that additional check.

Segmentation faults are always a sign of a bad setup. @include("invalid file") should NEVER coredump, if it does, there's something seriously wrong with the setup.

Regards,
Garvin