From:
Operating system: Centos 5.6
PHP version: Irrelevant
Package: Pspell related
Bug Type: Bug
Bug description:Occasionally and aleatory error 500
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 bug report at https://bugs.php.net/bug.php?id=55417&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=55417&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=55417&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=55417&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=55417&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=55417&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=55417&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=55417&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=55417&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=55417&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=55417&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=55417&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=55417&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=55417&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=55417&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=55417&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=55417&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=55417&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=55417&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=55417&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=55417&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=55417&r=mysqlcfg