To add aspell functionality to the HTML editor:
- Install aspell and dictionary using Win32 install directions. I preferred using c:\progra~1\aspell as the path instead of c:\aspell. Leaving spaces in the path will probably not work.
- In Windows (i.e. lusrmgr.msc) create a Moodle user account and remove User privileges.
- Set permissions on the c:\progra~1\aspell folder (files and subfolders) to allow the Moodle account read and execute.
- Add read and execute privileges to CMD.EXE in the system32 folder for the Moodle user.
- Using IIS's Internet Service Manager, locate your site and the Moodle folders, change the security authentication from anonymous user to the Moodle user and set its password for the following folders:
- In Moodle's Configuration, Editor settings, change the aspellpath to C:\progra~1\aspell\bin\aspell.exe and set editorspelling to Yes and set your language.
- Test using an editable page on your site. If you have used the editor before, you may need to press Ctrl-F5 (in firefox and IE) to completely reload the editor. (Or restart your browser)
Before adding read/execute privileges to CMD.EXE I was seeing the 'Couldn't create handle!' error on the Editor settings page. I did not have to add anything to the system path or change any registry settings.
If someone is successful in using this on W2K Server, please let me know; or post what was different.
I followed the steps above for setting up the spell check on my Moodle server (Moodle version 1.97). But to no luck. When I enter the path to the aspell.exe on the system path in Admin/server of the moodle, the html editor does not load up. But when I remove the system path the html editor works normally but with no spell check option. Please help.
PS. I have granted permissions (full control) for all the folders that were suggested in your article. including cmd.exe for moodleuser-user account. Since I have several user accounts on the Moodle server I had to add moodleuser account to the list of users that could have "full control" access to the above folders.
This is something we want to install, however our IT department won't allow it saying that it is a security risk to allow execute privileges for the Moodle user to cmd.exe
Can anyone elaborate on the potential risk, ways to minimize the risk, or any alternatives to Aspell for Windows servers?
opening up cmd.exe so that the system could open any program or execute any cmd line options is always risk.
A small risk. But a risk that should be avoided.
About two months ago I developed an alternative part of the speller that still uses aspell as the engine, but uses the PHP calls that tie into the aspell engine instead of using shell_exec (which is what causes the problem).
We've had it in production for about a month and have had no issues, so I'm willing to send this out for further testing/use if anyone else wants to try it. I offer no promise or guarantees. But it is working here with no reported problems.
All you need to do is backup the file spellchecker.php in moodleroot\lib\speller\server-scripts and replace it with the attached file.
You still need to have aspell installed and the paths configured like you normally would.
I hope this helps.
Note: This has only been tested on a windows 2003 server running IIS6. But in theory it should work on an Apache Server as well.
I keep getting the error:
-aH --lang error --encoding=utf-8 <E:moodledataaspC4A.tmp 2>&1'
Acces is denied
Can anyone help?
Thanks Erik for the work around. We can't, however, get the checker to actually check. The checker runs, but does not catch any spelling errors. No server errors are displayed and the interface looks intact.
(Sorry for the long delay in responding)
Do you have PSpell enabled in your PHP?