Segmentation fault on setup

Found a bug? Tell us!!
Post Reply
wonko
Posts: 1
Joined: Wed Apr 30, 2008 12:31 pm

Segmentation fault on setup

Post 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.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# 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/
Post Reply