At 03:27 PM 11/26/2001 -0500, you wrote:
>Hi Sean,
>
>have you run AOLserver under GDB yet to find out where it is segfaulting?
>Here's an example of how to do that.

Thanks. It is happening when in the PHP statement

     include "../src/load_prefs.php";

The relative path is expanded to

     
/usr/local/aolserver-3.4.2/servers/webmail/pages/squirrelmail-1.2.0-rc2/src/../src/load_prefs.php

instead of:

     
/usr/local/aolserver-3.4.2/servers/webmail/pages/squirrelmail-1.2.0-rc2/src/load_prefs.php

I.e the ".." is not treated correctly. It seems to be PHP's fault.

here is the relevant output of gdb:

[New Thread 6151 (LWP 26839)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 6151 (LWP 26839)]
0x400afdd3 in canonicalize (
     name=0x4083b278
"/usr/local/aolserver-3.4.2/servers/webmail/pages/squirrelmail-1.2.0-rc2/src/../src/load_prefs.php",
resolved=0x4053414c "")
     at canonicalize.c:88
88      canonicalize.c: No such file or directory.
         in canonicalize.c
(gdb) bt
#0  0x400afdd3 in canonicalize (
     name=0x4083b278
"/usr/local/aolserver-3.4.2/servers/webmail/pages/squirrelmail-1.2.0-rc2/src/../src/load_prefs.php",
resolved=0x4053414c "")
     at canonicalize.c:88
#1  0x402be679 in virtual_file_ex (state=0x40535184,
     path=0x40665cd4 "../src/load_prefs.php", verify_path=0)
     at tsrm_virtual_cwd.c:299
#2  0x402423cc in expand_filepath (
     filepath=0x40665cd4 "../src/load_prefs.php", real_path=0x0)
     at fopen_wrappers.c:531
#3  0x40241a3f in php_fopen_and_set_opened_path (
     path=0x40665cd4 "../src/load_prefs.php", mode=0x402d2627 "rb",
     opened_path=0x405373b4) at fopen_wrappers.c:237
#4  0x40242059 in php_fopen_with_path (
     filename=0x40665cd4 "../src/load_prefs.php", mode=0x402d2627 "rb",
     path=0x8178b38
".:/usr/local/lib/php:/home/aol30/webmail/pages/webmail/src",
opened_path=0x405373b4) at fopen_wrappers.c:391
#5  0x40242288 in php_fopen_url_wrapper (
     path=0x40665cd4 "../src/load_prefs.php", mode=0x402d2627 "rb",
     options=1, issock=0x405372d0, socketd=0x405372d4, opened_path=0x405373b4)
     at fopen_wrappers.c:470
#6  0x4023fc81 in php_fopen_wrapper_for_zend (
     filename=0x40665cd4 "../src/load_prefs.php", opened_path=0x405373b4)
     at main.c:477
#7  0x40239074 in open_file_for_scanning (file_handle=0x405373ac,
     compiler_globals=0x40630900) at zend_language_scanner_cc.cc:2899
#8  0x402394ee in compile_file (file_handle=0x405373ac, type=2,
     compiler_globals=0x40630900) at zend_language_scanner_cc.cc:2966
#9  0x4023966b in compile_filename (type=2, filename=0x406d92bc,
     compiler_globals=0x40630900, executor_globals=0x4061f440)
     at zend_language_scanner_cc.cc:3022
#10 0x40224016 in execute (op_array=0x406be8d0, executor_globals=0x4061f440)
     at ./zend_execute.c:2028
#11 0x40221da3 in execute (op_array=0x40774028, executor_globals=0x4061f440)
     at ./zend_execute.c:1544
#12 0x40221da3 in execute (op_array=0x407721a0, executor_globals=0x4061f440)
     at ./zend_execute.c:1544
#13 0x40221da3 in execute (op_array=0x4075b340, executor_globals=0x4061f440)
     at ./zend_execute.c:1544
#14 0x40221da3 in execute (op_array=0x40643c3c, executor_globals=0x4061f440)
     at ./zend_execute.c:1544
#15 0x4023016d in zend_execute_scripts (type=8, compiler_globals=0x40630900,
     executor_globals=0x4061f440, file_count=3) at zend.c:752
#16 0x40241167 in php_execute_script (primary_file=0x405436cc,
     compiler_globals=0x40630900, executor_globals=0x4061f440,
     core_globals=0x4061f740) at main.c:1206
#17 0x4023ef32 in php_ns_module_main (ns_context=0x40625bb0,
     sapi_globals=0x40632968) at aolserver.c:434
#18 0x4023f17f in php_ns_request_handler (context=0x8187c08, conn=0x819dc60)
     at aolserver.c:519
#19 0x08077bb7 in Ns_ConnRunRequest (conn=0x819dc60) at op.c:196
#20 0x0807e2c2 in ConnRun (connPtr=0x819dc60) at serv.c:882
#21 0x0807dc10 in NsConnThread (arg=0x40604300) at serv.c:671
#22 0x0811833b in NsThreadMain (arg=0x40604310) at thread.c:228
#23 0x4002ec6f in pthread_start_thread (arg=0x40543be0) at manager.c:284
#24 0x4002ed5f in pthread_start_thread_event (arg=0x40543be0)
     at manager.c:308


Sean Redmond
Brooklyn Museum of Art

Reply via email to