Page 1 of 1

php and pspell problem

Posted: Fri Aug 19, 2005 4:08 pm
by devnetwork_guy
I’ve recently encountered a problem with my hoster that I was hoping someone could shed some light on.

I want to create a spell-checker and being unfamiliar with the pspell functionality, I threw together a tester snippet:

Code: Select all

<?
$pspell_link = pspell_new("en");
$testWord = 'test';
$html = 'testing... '.$testWord.'<br>';

$pslStatus = ( $pspell_link ? 'good to go' : 'you no spell' );

if(pspell_check($pspell_link, $testWord)) 

			{ $html .= "This is a valid spelling"; }

else 	{ $html .= "Sorry, wrong spelling"; }
?>
<?=$pslStatus?>
<br>
<?=$html?>
This code fails without any error notification (just a page not found error). I checked my error logs and saw that a missing 403 page was logged. This made me think that there is a permission problem with the “en” dictionary, so I changed the

Code: Select all

$pspell_link = pspell_new("en");
line to

Code: Select all

$pspell_link = pspell_new("xx");
to see what would happen. I received this warning:
Warning: PSPELL couldn't open the dictionary. reason: I'm sorry I can't find any suitable word lists for the language-tag "xx".
This makes me think that the code is fine, that the “en” dictionary exists and that the problem is permissions related. I contacted my hoster and was informed:
I am sorry but seems that is unresolved issue for PHP and pspell binding... I am not sure that we can help you atm.
Can anyone give me insight to whether this response is valid or where I should go from here? Also, is it possible to get the built English dictionary so that I can test this locally?

Thank for reading.

Posted: Fri Aug 19, 2005 4:24 pm
by feyd
Moved to PHP - Code.