Aspell problem solved!!

Aspell problem solved!!

by Frank Claessen -
Number of replies: 7
Hi all,

after following the discussion I have tried it myself and I think I found the solution - for the windows environment that is.

There are several step that have to be taken:

1. Install aspell under the root - c:\aspell is fine
2. Change the editor settings as an administrator the following way:
    -aspell path = c:\aspell\bin\
    that last part is essential - and don't forget the backslash
3. Then the source code has to be changed since there is a bug in it
    -open the editor.php source in the directory admin and look for the following         piece of code:
=======================================================================
    global $CFG;

    $cmd          = $CFG->aspellpath;
    $output       = '';
    $dictionaries = array();
    $dicts        = array();

    if(!($handle = @popen(escapeshellarg($cmd) .'dump dicts', 'r'))) {
        return $strerror = "Couldn't create handle!";
        exit;
    }
the coloured line holds the error. The programmer tries to execute the command dump dicts. That however is no command. It is the parameter that has to be passed on to the program aspell.exe so - this line must read

    if(!($handle = @popen(escapeshellarg($cmd) .'aspell dump dicts', 'r'))) {
        return $strerror = "Couldn't create handle!";
        exit;
    }
=======================================================================
Now you can choose the present dictionary in the editor settings AND it works again in the editor itself.

Try it yourself

Cheers

Frank
Average of ratings: -
In reply to Frank Claessen

Re: Aspell problem solved!!

by Janne Mikkonen -
As said in article http://docs.moodle.org/en/Editor_settings

"On a Windows system it might look like c:\program\aspell\bin\aspell where the last aspell is the aspell.exe file."

The defined path must include the executable.

- Janne -
In reply to Janne Mikkonen

Re: Aspell problem solved!!

by Frank Claessen -
Hi Janne,

I realised it must work the way you write a little later. I also realised this is error prone, since - in a path setting - we normally do not include the executable. That's why there have been many mistakes.

Frank
In reply to Frank Claessen

Re: Aspell problem solved!!

by Janne Mikkonen -
Hi Frank,

Since nobody really takes care of it. It really should have proper check of $CFG->aspellpath that makes sure that it really points out to an executable ( /admin/editor.php ), and the help text should also say it'll need to be a path including executable.

- Janne -
In reply to Frank Claessen

Re: Continued trouble with Aspell

by A. T. Wyatt -
Even with this, we don't seem to be able to solve our Aspell problem!  We are running a WIMP server, XP.

This is our path:
E:\moodle\aspell\bin\aspell.exe

Executable specified.
Here is a screen shot of the error message we keep getting.

Any ideas?  We are stumped! We are not sure how to interpret the error message.

Thanks in advance!
atw
Attachment aspell-error.gif
In reply to Frank Claessen

Re: Aspell problem solved!!

by Jonathan Sanders -
Server -> System paths -> set Path to aspell to C:\Program Files\Aspell\bin\aspell.exe (or whereever you installed ASpell). For me, having just C:\Program Files\Aspell\bin\ or C:\Program Files\Aspell\bin\aspell did not work.

Also, copied the aspell-15.dll to the c:\WINNT\system32 folder

now ASpell 0.50-2-3 works on Windows server.