[PHP-DEV] PHP 4.0 Bug #8464 Updated: PHP SIGABRT's using pspell functions

2001-01-23 Thread schu

ID: 8464
User Update by: [EMAIL PROTECTED]
Status: Open
Bug Type: Pspell related
Description: PHP SIGABRT's using pspell functions

After looking at bug 8133 I decided to play with it a little, here is what I found:

I noticed that the aspell docs suggested that you have a /etc/aspell.conf so I made a 
conf file that contained:

personal/root/.aspell.english.pws
repl/root/.aspell.english.prepl

Then I symlinked /root/.aspell.conf to /etc/aspell.conf.  When running another 
backtrace I found that it was now looking for /usr/local/etc/aspell.conf so I 
symlinked that to /etc/aspell.conf as well.  After trying again, I got an error about 
not being able to open /usr/local/lib/aspell/english.dat.  I noticed that the file was 
in /usr/local/share/aspell/english.dat so I made another symlink.

After all that I am stuck again, but now have more backtrace data to analyze.

I should also note that I am almost certain that bug 8133 and 8464 are the same 
problem on different platforms.

thanks
schu

Backtrace output:

#0  0xef69a034 in _libc_kill () from /usr/lib/libc.so.1
#1  0xef63512c in abort () from /usr/lib/libc.so.1
#2  0xef52af00 in __default_terminate ()
   from /usr/local/apache/libexec/libphp4.so
#3  0xef52af30 in __terminate () from /usr/local/apache/libexec/libphp4.so
#4  0xef52bc28 in __throw () from /usr/local/apache/libexec/libphp4.so
#5  0xef019210 in autil::open_file (in=@0x132e60, file=@0xefffd808,
mode=-284925040) at file_util.cc:24
#6  0xeefeda18 in aspell::Language::setup (this=0xefffd930, lang={
  static npos = 4294967295, static nilRep = {len = 0, res = 0, ref = 1,
selfish = false}, dat = 0x1432f8 "english"}, config=0x1437b0)
at language.cc:110
#7  0xeeff63ac in aspell::DataSet::set_check_lang (this=0x1443b0,
l=@0xefffd9d0, config=0x1437b0) at inc/language.hh:56
#8  0xeeffa424 in aspell_default_readonly_ws::ReadOnlyWS::load (this=0x1443b0 ,
fn=@0xefffdac0, config=0x1437b0) at readonly_ws.cc:317
#9  0xeeff87b0 in aspell::add_data_set (file_name=@0x1443b0, config=@0x1437b0 ,
manager=0x143214, local_info=0xefffdbd4, allowed=4294967040) at data.cc:3 08
#10 0xef0112fc in aspell::MultiWS::load (this=0x131180, fn=@0xefffdd30,
config=0x1437b0, manager=0x143214, li=0xefffdbd4) at multi_ws.cc:61
#11 0xeeff87b0 in aspell::add_data_set (file_name=@0x131180, config=@0x1437b0 ,
manager=0x143214, local_info=0x0, allowed=4294967040) at data.cc:308
#12 0xef004a50 in aspell::Manager::real_setup (this=0x143214) at manager.cc:5 76
---Type return to continue, or q return to quit---
#13 0xef004818 in aspell::Manager::setup (this=0x143214, override=@0x142868)
at manager.cc:563
#14 0xef146c64 in pspell_aspell::PA_Manager::PA_Manager (this=0x1431f0,
config=0x142868, h=0x0) at manager.cc:189
#15 0xef147cac in libpspell_aspell_LTX_new_pspell_manager_class (
config=0x142868, h=0x0) at manager.cc:308

#16 0xef2c1594 in new_pspell_manager_class (config=0x142868)
at manager_impl.cc:45
#17 0xef2c2440 in new_pspell_manager (c=0x142d92) at manager_impl.cc:254
#18 0xef420364 in php_if_pspell_new (ht=1, return_value=0x1438b8,
this_ptr=0x0, return_value_used=1) at pspell.c:155
#19 0xef377b54 in execute () from /usr/local/apache/libexec/libphp4.so
#20 0xef3907d0 in zend_execute_scripts (type=8, file_count=3) at zend.c:729
#21 0xef3b52d0 in php_execute_script (primary_file=0xe6e8) at main.c:1221
#22 0xef3aeb70 in apache_php_module_main (r=0x139078, display_source_mode=0)
at sapi_apache.c:89
#23 0xef3afe34 in send_php (r=0x139078, display_source_mode=0,
filename=0x13ab10 "/home/www/schu/spell.html") at mod_php4.c:506
#24 0xef3afe78 in send_parsed_php (r=0x139078) at mod_php4.c:517
#25 0x414c8 in ap_invoke_handler ()
#26 0x5e700 in process_request_internal ()
#27 0x5e784 in ap_process_request ()
#28 0x520dc in child_main ()
---Type return to continue, or q return to quit---
#29 0x52398 in make_child ()
#30 0x525b4 in startup_children ()
#31 0x52fa4 in standalone_main ()
#32 0x53bb8 in main ()




Previous Comments:
---

[2000-12-28 16:48:57] [EMAIL PROTECTED]
Ok, here is all the info ;)

PHP info:

OS, Solaris 8 Generic February 2000
PHP, php-4.04
aspell, aspell-.32.6
pspell,  pspell-.11.2
apache, apache_1.3.14
gcc, gcc version 2.95.2 19991024 (release)

Compile switches:
'./configure' '--with-mysql' '--enable-track-vars' '--enable-trans-sid'
'--with-apxs=/usr/local/apache/bin/apxs' '--with-ftp' '--with-imap' '--with-pspell' 
'--enable-debug'

Link to phpinfo()
http://schu.net/phpinfo.php

Code that causes failure:

?
$pspell_link = pspell_new ("en");

if (pspell_check ($pspell_link, "testt")) {
echo "This is a valid spelling";
} else {
echo "Sorry, wrong spelling";
}
?

Could not get it to spit out

[PHP-DEV] PHP 4.0 Bug #8464 Updated: PHP SIGABRT's using pspell functions

2001-02-26 Thread schu

ID: 8464
User Update by: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Open
Bug Type: Pspell related
Description: PHP SIGABRT's using pspell functions

Vlad,

Here is the output of the commands that you requested:

*
[schu@untied:examples]$ make example-c
gcc -DPACKAGE=\"pspell\" -DVERSION=\".11.2\"  -I. -I.  -I/usr/local/include-g -O2 
-c example-c.c
/bin/sh ../libtool --mode=link gcc  -g -O2  -o example-c  example-c.o -L/usr/local/lib 
-lpspell
mkdir .libs
gcc -g -O2 -o example-c example-c.o  -L/usr/local/lib 
/usr/local/lib/libpspell_aspell.so 
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2 -L/usr/ccs/bin -L/usr/ccs/lib 
/usr/local/lib/libaspell.so /usr/local/lib/libpspell-impl.so 
/usr/local/lib/libpspell.so /usr/local/lib/libpspell-modules.so -lstdc++ 
-R/usr/local/lib -R/usr/local/lib

[schu@untied:examples]$ ./example-c en
Using: en---aspell

Type "h" for help.

s hullow

hallow
hollow
Hull
hull
hull ow
hull-ow
hello
Harlow
Hall
Hill
hall
hallows
halo
hell
hill
hollows
hula
hulls
hurl

x

[schu@untied:examples]$ 
*

As you can see the example works just fine.  Any other ideas?

I am glad to help in any way I can.

thanks

schu

Previous Comments:
---

[2001-02-26 18:43:17] [EMAIL PROTECTED]
hmmm... Too bad I don't have Solaris (or free time) to play with this. But I've got 
one question: Do pspell and aspell work on your solaris machine at all? It seems that 
the failures you observe in php would be exactly the same if you use aspell and pspell 
without php, and the fault lies within pspell, not within php module.

Can you try to compile the examples provided with pspell *and* try to run them? They 
are located in pspell/examples directory. Do:

: cd pspell-.11.2/examples
: make example-c
: ./example-c en
and then do something 's hullow' and see if that works. Please, tell me if that 
failed. I have a feeling we'll have to ask the author of aspell/pspell (Kevin 
Atkinson) to fix a few issues on solaris.

thanks,

Vlad


---

[2001-01-23 19:51:58] [EMAIL PROTECTED]
After looking at bug 8133 I decided to play with it a little, here is what I found:

I noticed that the aspell docs suggested that you have a /etc/aspell.conf so I made a 
conf file that contained:

personal/root/.aspell.english.pws
repl/root/.aspell.english.prepl

Then I symlinked /root/.aspell.conf to /etc/aspell.conf.  When running another 
backtrace I found that it was now looking for /usr/local/etc/aspell.conf so I 
symlinked that to /etc/aspell.conf as well.  After trying again, I got an error about 
not being able to open /usr/local/lib/aspell/english.dat.  I noticed that the file was 
in /usr/local/share/aspell/english.dat so I made another symlink.

After all that I am stuck again, but now have more backtrace data to analyze.

I should also note that I am almost certain that bug 8133 and 8464 are the same 
problem on different platforms.

thanks
schu

Backtrace output:

#0  0xef69a034 in _libc_kill () from /usr/lib/libc.so.1
#1  0xef63512c in abort () from /usr/lib/libc.so.1
#2  0xef52af00 in __default_terminate ()
   from /usr/local/apache/libexec/libphp4.so
#3  0xef52af30 in __terminate () from /usr/local/apache/libexec/libphp4.so
#4  0xef52bc28 in __throw () from /usr/local/apache/libexec/libphp4.so
#5  0xef019210 in autil::open_file (in=@0x132e60, file=@0xefffd808,
mode=-284925040) at file_util.cc:24
#6  0xeefeda18 in aspell::Language::setup (this=0xefffd930, lang={
  static npos = 4294967295, static nilRep = {len = 0, res = 0, ref = 1,
selfish = false}, dat = 0x1432f8 "english"}, config=0x1437b0)
at language.cc:110
#7  0xeeff63ac in aspell::DataSet::set_check_lang (this=0x1443b0,
l=@0xefffd9d0, config=0x1437b0) at inc/language.hh:56
#8  0xeeffa424 in aspell_default_readonly_ws::ReadOnlyWS::load (this=0x1443b0 ,
fn=@0xefffdac0, config=0x1437b0) at readonly_ws.cc:317
#9  0xeeff87b0 in aspell::add_data_set (file_name=@0x1443b0, config=@0x1437b0 ,
manager=0x143214, local_info=0xefffdbd4, allowed=4294967040) at data.cc:3 08
#10 0xef0112fc in aspell::MultiWS::load (this=0x131180, fn=@0xefffdd30,
config=0x1437b0, manager=0x143214, li=0xefffdbd4) at multi_ws.cc:61
#11 0xeeff87b0 in aspell::add_data_set (file_name=@0x131180, config=@0x1437b0 ,
manager=0x143214, local_info=0x0, allowed=4294967040) at data.cc:308
#12 0xef004a50 in aspell::Manager::real_setup (this=0x143214) at manager.cc:5 76
---Type return to continue, or q return to quit---
#13 0xef004818 in aspell::Manager::setup (this=0x143214, override=@0x142868)
at manager.cc:563
#14 0xef146c64 in pspell_aspell::PA_Manager