Spellchecker for php apps?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

Spellchecker for php apps?

Post by Bill H »

I know, I know, Hotscripts.

The ones listed there keep coming up with requirements that "aspell" be a part of your php system and that you have aspell and the appropriate dictionary. Well, phpinfo() shows me "-with-aspell" is present in the php compiler line, but when I go to the aspell site, I get the impression that aspell itself is part of the server. (So how can I "have" it?)

The two requirements are listed separately, tho. (The compiler issue and "having aspell and the dictionary.") So, I don't know what to make of it. Therefor two questions:

1. What, and where, the heck is "aspell"?
2. What spellcheckers have you used that you like?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Ideally, you want to look for the --with-pspell directive. Aspell is still supported, but is deprecated. Look in the manual for more: http://www.php.net/aspell
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

--with-aspell means that php was compiled with support for the aspell libraries. You don't have to know where the aspell library is, when php was built, it was told where they were.
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

Post by Bill H »

Sorry, my question was a little vague, and upon revisiting one of the spallcheckers the requirements are even more confusing because it wants both of them.

I think I knew that the compiler directive compiled the library in, I was more asking if aspell itself was a separate component that used the library, as is implied by the requirement for the spellchecker being shown in this manner:
0.register_globals set ON
1.aspell with appropriate dictionary
2.PHP with pspell compiled in
I know, the register_globals is insecure, but my host has it set that way anyway. So I am meeting 0 and 2, but have no idea how to check 1 or to comply with it if I am not presently compliant. When I go to the aspell site it discusses compiler directives.

I would like to add a spellchecker for a <textarea>, but....
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

I'd bet that if your host compiled PHP with pspell, then it has apsell with the appropriate dictionary. Do a test page that spell checks a single word and see what you can do. It'll probably work.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

Post by Bill H »

Thanks, I'll do that. I didn't want to go to that effort without at least a glimmer that it might work, and you provided that glimmer. I'll let you know, in due course, how it worked.
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

Post by Bill H »

Yep, system does meet requirements. Spellchecker works.
Thanks for the encouragement.
Post Reply