ID: 14218
User updated by: beckman@purplecow.com
Reported By: beckman@purplecow.com
Status: Open
Bug Type: Pspell related
Operating System: FreeBSD 4.4-STABLE
PHP Version: 4.0.6
New Comment:
Answers:
1. Built pspell from scratch again, uninstalled and reinstalled, su'ed to nobody, executed
example-c with success, ran a few lookups. Cut and paste:
--> su - nobody -c id
uid=65534(nobody) gid=65534(nobody) groups=65534(nobody)
--> su - nobody -c "pwd/example-c en"
Using: en---aspell
Type "h" for help.
s recieve
receive
receiver
Recife
relieve
received
receives
[...]
2. I wasn't sure what the pws format looked like, so I threw out the personal one and just
tried pspell_new("en");, with no luck. I put an echo and exit before the pspell_new, and
it works fine. Put an echo and an exit AFTER the pspell_new call, and it "Abort"s the
apache thread.
[Thu Nov 29 19:10:42 2001] [notice] child pid 79097 exit signal Abort trap (6)
Could it be that we're running mod_gzip? I wouldn't think so, but we are using it. We
are also using the Zend PHP Optimizer.
I'm happy to install PHP on a FreeBSD box and give you access if you want to play, though it
wouldn't be the box I'm having trouble with, and I haven't tested the pspell failure
on that install.
Previous Comments:
------------------------------------------------------------------------
[2001-11-29 18:30:05] vlad@php.net
hmmm... It does not crash, it does not let you have a backtrace, yet it doesn't work either.
And you seem to have followed most of the installation instructions and have recent versions of
everything. On top of that I know nothing concerning FreeBSD, and do not have a FreeBSD machine.
Couple questions:
1. Can you execute and use example-c as nobody (I know you executed it, period, but probably with
more permissions, so this might not work.
2. Is /usr/share/dict/acmovies is a *file* (not a dir) in the .pws format? I know, it's kinda
stupid to askm but just in case...
Besides that, I have no clues right now. Any ideas? anyone?
------------------------------------------------------------------------
[2001-11-25 15:00:29] beckman@purplecow.com
Sorry -- That script has an extra close curly brackets that isn't really there. Please remove
that to get desired crashing effect.
Also, http://www.adcritic.com/spellcheck.php is
the offending script. In IE, I get the "The page cannot be displayed." Telnetting gets
me this:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /spellcheck.php?q=foo HTTP/1.0
Connection closed by foreign host.
where if I leave the query blank (it doesn't run the offending pspell function), I get:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /spellcheck.php HTTP/1.0
HTTP/1.1 200 OK
Date: Sun, 25 Nov 2001 19:59:49 GMT
Server: Apache/1.3.22 (Unix) mod_gzip/1.3.19.1a PHP/4.0.6
X-Powered-By: PHP/4.0.6
Set-Cookie: ADCRITICPHPSID=188feaf823cbb54ca102332da63464d8; expires=Sat, 23-Feb-02 19:59:49 GMT;
path=/; domain=.adcritic.com
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Connection: close
Content-Type: text/html
<form action="/spellcheck.php" method="GET">
<input name='q' type='text'>
</form>
Connection closed by foreign host.
If q is empty, the script isn't executed (if !empty($q)) etc...
------------------------------------------------------------------------
[2001-11-25 14:57:01] beckman@purplecow.com
Script:
$q = "foo";
$pl = pspell_new_personal("/usr/share/dict/acmovies","en");
$sug = pspell_suggest($pl,$q);
if (count($sug)>0) {
echo "Suggestions:<ul>";
while(list(,$val)=each($sug)) {
echo "<li>{$val}";
}
} else {
echo "No matches.";
}
}
Script runs when pspell_new_personal is not included (commented out). fails with pspell_new
function as well.
Configure line:
'./configure' '--with-apxs=/usr/local/sbin/apxs'
'--with-config-file-path=/usr/local/etc' '--enable-versioning'
'--with-system-regex' '--disable-debug' '--enable-track-vars'
'--without-gd' '--without-mysql' '--with-gd=/usr/local'
'--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local'
'--with-png-dir=/usr/local' '--with-zlib' '--with-mysql=/usr/local'
'--with-pspell=/usr/local' '--prefix=/usr/local' 'i386--freebsd4.4'
Server Version: Apache/1.3.22 (Unix) mod_gzip/1.3.19.1a PHP/4.0.6
Aspell: aspell-0.33.7.1
Pspell: pspell-0.12.2_1
Ispell: ispell-3.1.20c_2
mod_PHP: mod_php4-4.0.6_5
Apache error line:
[date] [notice] child pid X exit signal Abort trap (6)
Successfully compiled example-c and tested it in pspell.
All pspell and aspell directories and files are readable by nobody, directories executable for
nobody (others).
httpd does not crash, the child gets an Abort trap (6). No backtrace available.
Not using Soblot.
PHP compiles correctly, everything works except that when I use pspell functions httpd crashes.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14218&edit=1