| Newsgroups |
gmane.comp.web.mnogosearch.general |
| Message-ID |
<[email protected]> |
Author: Amar Bouchibane
Email: [email protected]
Message:
Hi,
I don't get ISpell working.
I have an openSuse linux server (v10.3, PHP 5.2.6, Apache/2.2.4) and I'm using mnogosearch 3.3.8 from within TYPO3.
First I didn't get any spell dictonaries working. So I have tested the index.php file from the php source folder.
Any spell dict can't be loaded here, too.
I always get the following error:
"Warning: udm_load_ispell_data() [function.udm-load-ispell-data]:
Error loading ispell data 'Read error' in /srv/www/htdocs/mno_php/index.php on line 735
An error occured!
Error loading ispell data from file"
I configured $dbaddr in the index.php with my settings.
The search works perfectly!
And I configured ISpell:
$affix_file['de']='/usr/lib/ispell/deutsch2.aff';
$spell_file['de']='/usr/lib/ispell/deutsch2.wrd';
Then I opened spell.c source file and located the 'Read error' in function UdmSpellListLoad:
if ((nbytes= read(fd, L->fbody, sb.st_size)) != sb.st_size)
{
rc= UDM_ERROR;
udm_snprintf(err, errlen, "Read error");
goto ex;
}
Here I have traced some vars and I figured that nbytes always returns -1.
The open call works and returns a valid file descriptor.
I've added an access call to check if there's an permission problem:
int readAllow = access( filename, R_OK );
But readAllow always returns 0. So this means read access is permitted.
In the read call some lines above...
/* Detect *.msp hash file */
if (sizeof(tolowermap) == read(fd, tolowermap, sizeof(tolowermap)))
{
...the read function always returns -1 too.
Then I have installed mnogosearch on an Ubuntu server (without TYPO3).
But the same error occurs.
I don't have any clue why the spell file can't be read.
I'd appreciate any hint!
best regards,
Amar
Reply: <http://www.mnogosearch.org/board/message.php?id=20975>