#31626 [NEW]: calling ereg_replace before pspell_new crashes pspell

From: Date: Thu, 20 Jan 2005 16:25:48 +0000
Subject: #31626 [NEW]: calling ereg_replace before pspell_new crashes pspell
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-72522@lists.php.net to get a copy of this message
From: bram dot dejong at gmail dot com Operating system: Windows XP PHP version: 5.0.3 PHP Bug Type: Pspell related Bug description: calling ereg_replace before pspell_new crashes pspell Description: ------------ Calling ereg_replace before pspell_new crashes pspell. pspell_new *only* fails when calling ereg_replace before it (i.e. I haven't witnessed any other crashes yet...) Pspell is installed following this guide (and all is working): http://www.oblius.com/?.blogs.184 Changes in php.ini file: extension=php_pspell.dll Reproduce code: --------------- <? $string1 = "heeelp"; $string2 = ereg_replace("squeek","squaak",$string1); $pspell_link = pspell_new("en", "", "", "", PSPELL_FAST); print_r(pspell_suggest($$pspell_link, $string1) ?> Expected result: ---------------- when I comment this line: // $string2 = ereg_replace("squeek","squaak",$string1); the result is: Array ( [0] => help [1] => Heep [2] => heel [3] => heeler [4] => heeled [5] => heels [6] => whelp [7] => helps [8] => helper [9] => harelip [10] => hep [11] => Helen [12] => hello [13] => heel's ) Actual result: -------------- Warning: pspell_new() [function.pspell-new]: PSPELL couldn't open the dictionary. reason: No word lists can be found for the language "en". in c:\Apache\htdocs\Work\bug.php on line 5 Warning: pspell_suggest() [function.pspell-suggest]: 0 is not a PSPELL result index in c:\Apache\htdocs\Work\bug.php on line 6 -- Edit bug report at http://bugs.php.net/?id=31626&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31626&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31626&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31626&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31626&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31626&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31626&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31626&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31626&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31626&r=support Expected behavior: http://bugs.php.net/fix.php?id=31626&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31626&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31626&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31626&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31626&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31626&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31626&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31626&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31626&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31626&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31626&r=mysqlcfg

« previous php.bugs (#72522) next »