• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

php error: aspell & squirrelspell for Squirrelmail

alm4rr

Diamond Member
Error opening ../../data/default_pref
Default preference file not found or not readable!

SquirrelMail detects squirrelspell as it adds the button to do the spell checking and adds an entry in under OPTIONS.... But upon spell checking or trying to access Spelling Options, I get that error. Hosted on OLM with Ensim Pro 4.0.2-7




My sqspell_config
<?php
/**
* sqspell_config.php -- SquirrelSpell Configuration file.
*
* Copyright (c) 1999-2004 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
*
*
* $Id: sqspell_config.php,v 1.14.2.1 2004/02/24 15:57:34 kink Exp $
*/

require_once(SM_PATH . 'functions/prefs.php');

/* Just for poor wretched souls with E_ALL. 🙂 */
global $data_dir;

sqgetGlobalVar('username', $username, SQ_SESSION);

/**
* Example:
*
* $SQSPELL_APP = array( 'English' => 'ispell -a',
* 'Spanish' => 'ispell -d spanish -a' );
*/

$SQSPELL_APP = array('English' => '/usr/local/bin/aspell -a');
$SQSPELL_APP_DEFAULT = 'English';

/*
* this line was originally here
* $SQSPELL_WORDS_FILE =
* getHashedFile($username, $data_dir, "$username.words");
*/

/*
* I added this one based off a form I read on web
* $SQSPELL_WORDS_FILE = "$data_dir/$username.words";
*/

$SQSPELL_WORDS_FILE = "$data_dir/$username.words";
$SQSPELL_EREG = 'ereg';

?>
----------------------------------------------
Neither one of the "$SQSPELL_WORDS_FILE" entries seem to do it....


These are the files in the aspell directory
usr/local/lib/aspell/american-w-accents.alias
/usr/local/lib/aspell/american.alias
/usr/local/lib/aspell/british-w-accents.alias
/usr/local/lib/aspell/british.alias
/usr/local/lib/aspell/canadian-w-accents.alias
/usr/local/lib/aspell/canadian.alias
/usr/local/lib/aspell/en-only.rws
/usr/local/lib/aspell/en.multi
/usr/local/lib/aspell/en_CA-only.rws
/usr/local/lib/aspell/en_CA-w-accents.multi
/usr/local/lib/aspell/en_CA.multi
/usr/local/lib/aspell/en_GB-only.rws
/usr/local/lib/aspell/en_GB-w-accents.multi
/usr/local/lib/aspell/en_GB.multi
/usr/local/lib/aspell/en_US-only.rws
/usr/local/lib/aspell/en_US-w-accents.multi
/usr/local/lib/aspell/en_US.multi
/usr/local/lib/aspell/english.alias




Yes I am a php noob. Yes I need you help. 😕
Any tips are appreciated
 
http://www.squirrelmail.org/wiki/en_US/DataPermission


OK, so I need to change the permission on the prefs file as it currently is
-rw-r-r-
but when I try to change it to
-rw-rw-r, I am told I can't do it! I'm logged in as admin of the account so why not - using chmod ?

Well I got around it somehow... I copied the file to HD, then renamed the orig on server.... then uploaded back the same file, and changed permissions *shrug*


but I still get the error.......

Directory structure is:

var/www/squirrelmail (there is no data subdirectory)
var/www/squirrelmail-attachments
var/www/squirrelmail-data
 
Well, for S&G, I added another directory: var/www/squirrelmail/data and put another exact copy of the pref in it with the correct permissions

and get a new (and improved?) error:

Error opening ../../data/default_pref
Could not create initial preference file!
../../squirrelmail-data/ should be writable by user apache



So I guess when OLM set this up, they decided not to put all things Squirrelmail into one directory, but instead made up squirrelmail_data and attachments...... And as the article points out, " If you have your data directory outside of your htdocs tree (not in the SquirrelMail directory, which is advisable), make sure NOT to use relative paths when specifying it in conf.pl; please use the full absolute path; and if editing the file manually, make sure "SM_PATH ." is removed for absolute paths."


So looking to the config file for Squirrelmail, it says,

"$default_charset = "iso-8859-1";
$data_dir = "../../squirrelmail-data/";
$attachment_dir = "../../squirrelmail-attachments/";
 
Back
Top