ID:               33095
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mkellogg at wordreference dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Pspell related
 Operating System: Windows 2003
 PHP Version:      4.3.11
 New Comment:

Try with this script:

<?php
$pspell_config = pspell_config_create("en");
pspell_config_mode($pspell_config, PSPELL_FAST);
$pspell_link = pspell_new_config($pspell_config);
if (!pspell_check($pspell_link, $_GET['word'])) {
$suggestions = pspell_suggest($pspell_link, $_GET['word']);
foreach ($suggestions as $key => $suggestions)
  echo "$suggestion<br />"; 
?>

(calling pspell_config_create() and not using the value it returns
anywhere is not very useful)



Previous Comments:
------------------------------------------------------------------------

[2005-05-23 15:18:48] mkellogg at wordreference dot com

I don't have a Linux server to test it on.  If you want to put my
original code on a Linux server, I would be happy to put the exact same
load on it.

Even if it works under Linux, it might be good if it works on all
platforms.

------------------------------------------------------------------------

[2005-05-23 09:12:53] [EMAIL PROTECTED]

Have you tried it under Linux/anything else bug windows?


------------------------------------------------------------------------

[2005-05-21 19:40:01] mkellogg at wordreference dot com

Description:
------------
I have tried this under IIS and Apache on Windows 2003.  The script
works fine in testing, but once I put it in production on the server,
it stops working within a few minutes.

Using latest version of Aspell 0.50.3


Reproduce code:
---------------
<?php
// my code was longer than this, but this is the jist of it. 
// Original code:
http://forum.wordreference.com/wr_spelling/iframe5.txt

pspell_config_create("en");
$pspell_link = pspell_new("en","","","", PSPELL_FAST);

if (!pspell_check($pspell_link, $_GET['word'])) {
$suggestions = pspell_suggest($pspell_link, $_GET['word']);

foreach ($suggestions as $key => $suggestion)   {
echo "$suggestion<br />"; 
                                                }
                                                }

?>

Expected result:
----------------
Spelling suggestions. :)


Actual result:
--------------
User: A page that hangs.

Apache's error message:
PHP Warning:  PSPELL couldn't open the dictionary. reason: No word
lists can be found for the language "en".  in C:\\Program Files\\Apache
Group\\Apache2\\htdocs\\iframe5.php on line 4

Apache often crashes as a result, too.

IIS error message as seen by Firefox users:
PHP has encountered an Access Violation at ...



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=33095&edit=1

Reply via email to