Edit report at https://bugs.php.net/bug.php?id=55417&edit=1
ID: 55417 Updated by: [email protected] Reported by: daniel at stonek dot com Summary: Occasionally and aleatory error 500 -Status: Open +Status: Bogus Type: Bug Package: Pspell related Operating System: Centos 5.6 PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Thank you for taking the time to report a problem with PHP. Unfortunately you are not using a current version of PHP -- the problem might already be fixed. Please download a new PHP version from http://www.php.net/downloads.php If you are able to reproduce the bug with one of the latest versions of PHP, please change the PHP version on this bug report to the version you tested and change the status back to "Open". Again, thank you for your continued support of PHP. Previous Comments: ------------------------------------------------------------------------ [2011-08-14 19:53:16] daniel at stonek dot com Well, it seems I found a kind of solution for my particular case: adding a white space at the beginning o ending of the word. Results are no exactly the same but differences are disposable. There's a thing to care about: ask for pspell_suggestion only if the word is not in your dictionary. Adding a blank space before a know word would end in an error 500. Examples: 'co0cos' and '0cocos' are not in my dictionary, they return an error 500 ' co0cos' and ' 0cocos' are not in my dictionary, they return good suggestions arrays 'cocos' is in my dictionary so pspell_suggestion is not applied ' cocos' is not in my dictionary and it returns an error 500 !!! ------------------------------------------------------------------------ [2011-08-14 14:20:15] daniel at stonek dot com Hi! To be sure it is a pspell_suggest problem, I added pair of mail('me',....) just before and after this function. First mail is always received but the second one isn't in those error 500 cases. Web browsers: Internal Server Error httpd error log (my test): [Sun Aug 14 09:47:19 2011] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error. [Sun Aug 14 09:47:19 2011] [error] [client XXX.50.78.197] Premature end of script headers: file.php I think I found something like a pattern (there are inclusions and exclusions) SOME plurals and an intercalated single number in 5 letters words. '5bolas', 'bo5las' and any string with '5' in any position of 'bolas' get the error. '5vejas', '0vejas', 'vej0as', 'monos6', '3cocos', '0pitos', 'bocas6' Without the number, almost all these samples belong to my dictionary but 'vejas' Strangely, 'vejas' and 'veja' does not get any suggestion while '12vejas' shows 10 good ones like 'ovejas' (sheeps). Some exceptions: 'pinos', 'nubes'. Anywhere you add a number you get good suggestions Thank you. ------------------------------------------------------------------------ [2011-08-14 03:00:34] daniel at stonek dot com Description: ------------ 1) Php 5.1.6 (last from Centos 5 repositories 2) pspell_suggest drives me to error 500 in few cases. 3) './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec- prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '-- datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '-- libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '-- mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache- file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '-- with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable- rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '- -with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '-- without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg- dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '-- enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '-- enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '- -enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with- unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable- calendar' '--enable-dbx' '--enable-dio' '--with-mime- magic=/usr/share/file/magic.mime' '--without-sqlite' '--with-libxml-dir=/usr' '- -with-xml' '--with-system-tzdata' '--enable-force-cgi-redirect' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable- mbstr-enc-trans' '--enable-mbregex' '--with-ncurses=shared' '--with-gd=shared' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with- xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--with- mysql=shared,/usr' '--with-mysqli=shared,/usr/lib64/mysql/mysql_config' '-- enable-dom=shared' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--with- pgsql=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with- xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '-- enable-fastcgi' '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '-- with-pdo-mysql=shared,/usr/lib64/mysql/mysql_config' '--with-pdo- pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--enable-dbase=shared' 4) PSpell Support enabled 5) General php.ini Safe Mode Off Max Exec Time 45 Max Input Time 60 Memory Limit 64M Register Globals Off Post Max Size 15M cgi.fix_pathinfo=0 extension=imagick.so mysql.allow_persistent = off 6) PHP configured with --disable-debug Test script: --------------- $word = '1veja'; $pspell_config = pspell_config_create("es"); pspell_config_ignore($pspell_config, 4); pspell_config_personal($pspell_config, "/path-to/dictionary.pws"); //dictionary.pws contains regular spanish words $dictionary_link = pspell_new_config($pspell_config); if (!pspell_check($dictionary_link, $word)) { $suggestions = pspell_suggest($dictionary_link, $word); } Some $word examples: 1veja -> error 2veja -> error 2vejastro -> no error 5veja -> no error 12veja -> no error veja1 -> error veja5 -> no error bo0las -> error bo0las -> error bo5las -> error bo15las -> no error 5bolas -> error Expected result: ---------------- If $word='5veja' pspell_suggest array is ('vieja', 'oveja', 'verja', 'ceja', 'viejo', 'veÃa', 'deja', 'reaja', 'teja', 'vela', 'vena', 'vera', 'veta') using my dictionary. I expect from '0veja', '1veja', '2veja' .... same result as '5veja' Actual result: -------------- Error 500. Internal server error. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55417&edit=1
