#24739 [NEW]: php segfaults on non-initialized session variables

2003-07-21 Thread jullrich at euclidian dot com
From: jullrich at euclidian dot com
Operating system: Linux 2.4.21, Solaris
PHP version:  4.3.2
PHP Bug Type: Reproducible crash
Bug description:  php segfaults on non-initialized session variables

Description:

If a '$_SESSION' variable is used for a new session,
it will crash php. This bug has also been reported for
Solaris (bug ID 24592) and the recent RC version of php.
Happens with apache module or command line.

Reproduce code:
---
source code:

?php
 
session_start();
 
$foo = $_SESSION['foo'];
$bar = $_SESSION['bar'];
 
$_SESSION['foo'] = $foo;
$_SESSION['bar'] = $bar;
 
?


run: php -n filename.php


Expected result:

no output other than maybe session errors as this is executed from the
command line.

Actual result:
--
Segmentation Fault.

Warning: session_start(): Cannot send session cookie - headers already
sent in /home/jullrich/x2 on line 3
 
Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at /home/jullrich/x2:3) in /home/jullrich/x2
on line 3
Segmentation fault

Backtrace:

#0  0x0813f96b in _efree (ptr=0x81dda04)
at /usr/local/src/php-4.3.2/Zend/zend_alloc.c:259
#1  0x080b33b1 in migrate_global (ht=0x822fb68, pos=0xbfffd378)
at /usr/local/src/php-4.3.2/ext/session/session.c:640
#2  0x080b355f in php_session_save_current_state ()
at /usr/local/src/php-4.3.2/ext/session/session.c:670
#3  0x080b5ba9 in php_session_flush ()
at /usr/local/src/php-4.3.2/ext/session/session.c:1591
#4  0x080b5bbf in zm_deactivate_session (type=1, module_number=7)
at /usr/local/src/php-4.3.2/ext/session/session.c:1605
#5  0x0814f71d in module_registry_cleanup (module=0x0)
at /usr/local/src/php-4.3.2/Zend/zend_API.c:1167
#6  0x081516d5 in zend_hash_apply (ht=0x81ddd80,
apply_func=0x814f6ec module_registry_cleanup)
at /usr/local/src/php-4.3.2/Zend/zend_hash.c:688
#7  0x0814ceac in zend_deactivate_modules ()
at /usr/local/src/php-4.3.2/Zend/zend.c:634
#8  0x08126a7e in php_request_shutdown (dummy=0x0)
at /usr/local/src/php-4.3.2/main/main.c:971
#9  0x0815e488 in main (argc=3, argv=0xbfffdba4)
at /usr/local/src/php-4.3.2/sapi/cli/php_cli.c:862
#10 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6


-- 
Edit bug report at http://bugs.php.net/?id=24739edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24739r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24739r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=24739r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=24739r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24739r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=24739r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=24739r=support
Expected behavior:  http://bugs.php.net/fix.php?id=24739r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=24739r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=24739r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=24739r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24739r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=24739r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=24739r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=24739r=gnused



#24739 [Fbk-Opn]: php segfaults on non-initialized session variables

2003-07-21 Thread jullrich at euclidian dot com
 ID:   24739
 User updated by:  jullrich at euclidian dot com
 Reported By:  jullrich at euclidian dot com
-Status:   Feedback
+Status:   Open
 Bug Type: Reproducible crash
 Operating System: Linux 2.4.21, Solaris
 PHP Version:  4.3.2
 New Comment:

the most recent 'STABLE' version (php4-STABLE-200307211730)
did not solve the problem:

php4-STABLE-200307211730/sapi/cli/php -n x2
Segmentation fault

running it in gdb yields as a backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x08145c53 in _efree (ptr=0x81e5704)
at /usr/local/src/php4-STABLE-200307211730/Zend/zend_alloc.c:259
259 REMOVE_POINTER_FROM_LIST(p);
(gdb) bt
#0  0x08145c53 in _efree (ptr=0x81e5704)
at /usr/local/src/php4-STABLE-200307211730/Zend/zend_alloc.c:259
#1  0x080b7461 in migrate_global (ht=0x8236ed0, pos=0xbfffda38)
at
/usr/local/src/php4-STABLE-200307211730/ext/session/session.c:640
#2  0x080b760f in php_session_save_current_state ()
at
/usr/local/src/php4-STABLE-200307211730/ext/session/session.c:670
#3  0x080b9c71 in php_session_flush ()
at
/usr/local/src/php4-STABLE-200307211730/ext/session/session.c:1593
#4  0x080b9c87 in zm_deactivate_session (type=1, module_number=7)
at
/usr/local/src/php4-STABLE-200307211730/ext/session/session.c:1607
#5  0x08155a91 in module_registry_cleanup (module=0x0)
at /usr/local/src/php4-STABLE-200307211730/Zend/zend_API.c:1167
#6  0x08157a49 in zend_hash_apply (ht=0x81e5a80,
apply_func=0x8155a60 module_registry_cleanup)
at /usr/local/src/php4-STABLE-200307211730/Zend/zend_hash.c:688
#7  0x08153220 in zend_deactivate_modules ()
at /usr/local/src/php4-STABLE-200307211730/Zend/zend.c:650
#8  0x0812cb4e in php_request_shutdown (dummy=0x0)
at /usr/local/src/php4-STABLE-200307211730/main/main.c:981
#9  0x081648b4 in main (argc=3, argv=0xbfffe264)
at /usr/local/src/php4-STABLE-200307211730/sapi/cli/php_cli.c:874
#10 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6


Previous Comments:


[2003-07-21 14:16:28] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip





[2003-07-21 11:45:37] jullrich at euclidian dot com

Description:

If a '$_SESSION' variable is used for a new session,
it will crash php. This bug has also been reported for
Solaris (bug ID 24592) and the recent RC version of php.
Happens with apache module or command line.

Reproduce code:
---
source code:

?php
 
session_start();
 
$foo = $_SESSION['foo'];
$bar = $_SESSION['bar'];
 
$_SESSION['foo'] = $foo;
$_SESSION['bar'] = $bar;
 
?


run: php -n filename.php


Expected result:

no output other than maybe session errors as this is executed from the
command line.

Actual result:
--
Segmentation Fault.

Warning: session_start(): Cannot send session cookie - headers already
sent in /home/jullrich/x2 on line 3
 
Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at /home/jullrich/x2:3) in
/home/jullrich/x2 on line 3
Segmentation fault

Backtrace:

#0  0x0813f96b in _efree (ptr=0x81dda04)
at /usr/local/src/php-4.3.2/Zend/zend_alloc.c:259
#1  0x080b33b1 in migrate_global (ht=0x822fb68, pos=0xbfffd378)
at /usr/local/src/php-4.3.2/ext/session/session.c:640
#2  0x080b355f in php_session_save_current_state ()
at /usr/local/src/php-4.3.2/ext/session/session.c:670
#3  0x080b5ba9 in php_session_flush ()
at /usr/local/src/php-4.3.2/ext/session/session.c:1591
#4  0x080b5bbf in zm_deactivate_session (type=1, module_number=7)
at /usr/local/src/php-4.3.2/ext/session/session.c:1605
#5  0x0814f71d in module_registry_cleanup (module=0x0)
at /usr/local/src/php-4.3.2/Zend/zend_API.c:1167
#6  0x081516d5 in zend_hash_apply (ht=0x81ddd80,
apply_func=0x814f6ec module_registry_cleanup)
at /usr/local/src/php-4.3.2/Zend/zend_hash.c:688
#7  0x0814ceac in zend_deactivate_modules ()
at /usr/local/src/php-4.3.2/Zend/zend.c:634
#8  0x08126a7e in php_request_shutdown (dummy=0x0)
at /usr/local/src/php-4.3.2/main/main.c:971
#9  0x0815e488 in main (argc=3, argv=0xbfffdba4)
at /usr/local/src/php-4.3.2/sapi/cli/php_cli.c:862
#10 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6






-- 
Edit this bug report at http://bugs.php.net/?id=24739edit=1



#24592 [Com]: exit signal Segmentation fault (11)

2003-07-20 Thread jullrich at euclidian dot com
 ID:   24592
 Comment by:   jullrich at euclidian dot com
 Reported By:  jhuston at cs dot umn dot edu
 Status:   Open
 Bug Type: Session related
 Operating System: Sparc Solaris 9
 PHP Version:  4.3.3RC2-dev
 New Comment:

Interestingly, I am getting the same (similar?) bug on a Linux system
(RedHat 7.3) with apache 1.3 and php 4.3.2. My stack trace from gdb:

#0  0x403271a1 in _efree (ptr=0x403d01e4)
at /usr/local/src/php-4.3.2/Zend/zend_alloc.c:259
#1  0x40294b7a in migrate_global (ht=0x81cbe5c, pos=0xb028)
at /usr/local/src/php-4.3.2/ext/session/session.c:640
#2  0x40294c69 in php_session_save_current_state ()
at /usr/local/src/php-4.3.2/ext/session/session.c:670
#3  0x40297192 in php_session_flush ()
at /usr/local/src/php-4.3.2/ext/session/session.c:1591
#4  0x402971b7 in zm_deactivate_session (type=1, module_number=26)
at /usr/local/src/php-4.3.2/ext/session/session.c:1605
#5  0x40338681 in module_registry_cleanup (module=0x80bb0a0)
at /usr/local/src/php-4.3.2/Zend/zend_API.c:1167
#6  0x4033a410 in zend_hash_apply (ht=0x403d0560,
apply_func=0x40338654 module_registry_cleanup)
at /usr/local/src/php-4.3.2/Zend/zend_hash.c:688
#7  0x403358d6 in zend_deactivate_modules ()
at /usr/local/src/php-4.3.2/Zend/zend.c:634
#8  0x4030da19 in php_request_shutdown (dummy=0x0)
at /usr/local/src/php-4.3.2/main/main.c:971
#9  0x4034fa91 in apache_php_module_main (r=0x811365c,
display_source_mode=0)
at /usr/local/src/php-4.3.2/sapi/apache/sapi_apache.c:60
#10 0x4035060e in send_php (r=0x811365c, display_source_mode=0,
filename=0x0)
at /usr/local/src/php-4.3.2/sapi/apache/mod_php4.c:617
#11 0x40350662 in send_parsed_php (r=0x811365c)
at /usr/local/src/php-4.3.2/sapi/apache/mod_php4.c:632
#12 0x08054813 in ap_invoke_handler ()
#13 0x08069c6b in process_request_internal ()
#14 0x08069ccc in ap_process_request ()
#15 0x08060a69 in child_main ()
#16 0x08060c38 in make_child ()
#17 0x08060dac in startup_children ()
#18 0x08061424 in standalone_main ()
#19 0x08061ca3 in main ()
#20 0x400ab657 in __libc_start_main (main=0x80618e0 main, argc=2,
ubp_av=0xbb64, init=0x804ec74 _init, fini=0x80814e0 _fini,
rtld_fini=0x4000dcd4 _dl_fini, stack_end=0xbb5c)
at ../sysdeps/generic/libc-start.c:129
(gdb) quit


Previous Comments:


[2003-07-15 12:49:17] jhuston at cs dot umn dot edu

I did the following configure line with fresh snapshot with debug
enabled.  Hopefully, this will pinpoint the problem even better.

./configure --disable-all --disable-cgi --enable-debug
--enable-session

Running php on test.php:

[EMAIL PROTECTED] php4-STABLE-200307151730]# sapi/cli/php -n test.php
It didn't crash at all yet.
[Tue Jul 15 12:45:46 2003]  Script:  'test.php'
---
/home/src/php4-STABLE-200307151730/ext/session/session.c(640) : Block
0x0018A5E8 status:
Beginning:  Overrun (magic=0x00B4, expected=0x7312F8DC)
Segmentation fault

backtrace on gdb:

(gdb) run -n test.php
Starting program: /home/src/php4-STABLE-200307151730/sapi/cli/php -n
test.php
It didn't crash at all yet.
[Tue Jul 15 12:46:47 2003]  Script:  'test.php'
---
/home/src/php4-STABLE-200307151730/ext/session/session.c(640) : Block
0x0018A5E8 status:
Beginning:  Overrun (magic=0x00B4, expected=0x7312F8DC)

Program received signal SIGSEGV, Segmentation fault.
0xff1f04f8 in memcpy () from
/usr/platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1
(gdb) bt
#0  0xff1f04f8 in memcpy ()
   from /usr/platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1
#1  0x10813c in _mem_block_check (ptr=0x18a610, silent=0, 
__zend_filename=0x144410
/home/src/php4-STABLE-200307151730/ext/session/session.c,
__zend_lineno=640, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /home/src/php4-STABLE-200307151730/Zend/zend_alloc.c:675
#2  0x1080f4 in _mem_block_check (ptr=0x18a610, silent=1, 
__zend_filename=0x144410
/home/src/php4-STABLE-200307151730/ext/session/session.c,
__zend_lineno=640, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /home/src/php4-STABLE-200307151730/Zend/zend_alloc.c:667
#3  0x106c88 in _efree (ptr=0x18a610, 
__zend_filename=0x144410
/home/src/php4-STABLE-200307151730/ext/session/session.c,
__zend_lineno=640, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /home/src/php4-STABLE-200307151730/Zend/zend_alloc.c:243
#4  0x243f8 in migrate_global (ht=0x1bce50, pos=0xffbfefe4)
at /home/src/php4-STABLE-200307151730/ext/session/session.c:640
#5  0x245bc in php_session_save_current_state ()
at /home/src/php4-STABLE-200307151730/ext/session/session.c:670
#6  0x28494 in php_session_flush ()
at /home/src/php4-STABLE-200307151730/ext/session/session.c:1593
#7  0x284e4 in zm_deactivate_session (type=1, module_number=2)
at /home/src/php4-STABLE-200307151730/ext/session/session.c:1607
#8  0x12660c

#24592 [Com]: exit signal Segmentation fault (11)

2003-07-20 Thread jullrich at euclidian dot com
 ID:   24592
 Comment by:   jullrich at euclidian dot com
 Reported By:  jhuston at cs dot umn dot edu
 Status:   Open
 Bug Type: Session related
 Operating System: Sparc Solaris 9
 PHP Version:  4.3.3RC2-dev
 New Comment:

add on to my prior comment: I get a partial page, not an empty page.
configure:
'--with-apxs=/usr/local/apache/bin/apxs' \
'--sysconfdir=/etc' \
'--with-config-file-path=/etc' \
'--with-openssl' \
'--with-zlib' \
'--with-curl=../curl-7.10.2' \
'--with-gd' \
'--with-ttf' \
'--with-gettext' \
'--with-mysql' \
'--enable-trans-sid' \
'--enable-sockets' \
'--enable-wddx' \
'--with-pspell' \


I am not using the RedHat supplied apache/php rpms but compile them
myself with MySQL 4.0 rpms.


Previous Comments:


[2003-07-20 23:26:30] jullrich at euclidian dot com

Interestingly, I am getting the same (similar?) bug on a Linux system
(RedHat 7.3) with apache 1.3 and php 4.3.2. My stack trace from gdb:

#0  0x403271a1 in _efree (ptr=0x403d01e4)
at /usr/local/src/php-4.3.2/Zend/zend_alloc.c:259
#1  0x40294b7a in migrate_global (ht=0x81cbe5c, pos=0xb028)
at /usr/local/src/php-4.3.2/ext/session/session.c:640
#2  0x40294c69 in php_session_save_current_state ()
at /usr/local/src/php-4.3.2/ext/session/session.c:670
#3  0x40297192 in php_session_flush ()
at /usr/local/src/php-4.3.2/ext/session/session.c:1591
#4  0x402971b7 in zm_deactivate_session (type=1, module_number=26)
at /usr/local/src/php-4.3.2/ext/session/session.c:1605
#5  0x40338681 in module_registry_cleanup (module=0x80bb0a0)
at /usr/local/src/php-4.3.2/Zend/zend_API.c:1167
#6  0x4033a410 in zend_hash_apply (ht=0x403d0560,
apply_func=0x40338654 module_registry_cleanup)
at /usr/local/src/php-4.3.2/Zend/zend_hash.c:688
#7  0x403358d6 in zend_deactivate_modules ()
at /usr/local/src/php-4.3.2/Zend/zend.c:634
#8  0x4030da19 in php_request_shutdown (dummy=0x0)
at /usr/local/src/php-4.3.2/main/main.c:971
#9  0x4034fa91 in apache_php_module_main (r=0x811365c,
display_source_mode=0)
at /usr/local/src/php-4.3.2/sapi/apache/sapi_apache.c:60
#10 0x4035060e in send_php (r=0x811365c, display_source_mode=0,
filename=0x0)
at /usr/local/src/php-4.3.2/sapi/apache/mod_php4.c:617
#11 0x40350662 in send_parsed_php (r=0x811365c)
at /usr/local/src/php-4.3.2/sapi/apache/mod_php4.c:632
#12 0x08054813 in ap_invoke_handler ()
#13 0x08069c6b in process_request_internal ()
#14 0x08069ccc in ap_process_request ()
#15 0x08060a69 in child_main ()
#16 0x08060c38 in make_child ()
#17 0x08060dac in startup_children ()
#18 0x08061424 in standalone_main ()
#19 0x08061ca3 in main ()
#20 0x400ab657 in __libc_start_main (main=0x80618e0 main, argc=2,
ubp_av=0xbb64, init=0x804ec74 _init, fini=0x80814e0 _fini,
rtld_fini=0x4000dcd4 _dl_fini, stack_end=0xbb5c)
at ../sysdeps/generic/libc-start.c:129
(gdb) quit



[2003-07-15 12:49:17] jhuston at cs dot umn dot edu

I did the following configure line with fresh snapshot with debug
enabled.  Hopefully, this will pinpoint the problem even better.

./configure --disable-all --disable-cgi --enable-debug
--enable-session

Running php on test.php:

[EMAIL PROTECTED] php4-STABLE-200307151730]# sapi/cli/php -n test.php
It didn't crash at all yet.
[Tue Jul 15 12:45:46 2003]  Script:  'test.php'
---
/home/src/php4-STABLE-200307151730/ext/session/session.c(640) : Block
0x0018A5E8 status:
Beginning:  Overrun (magic=0x00B4, expected=0x7312F8DC)
Segmentation fault

backtrace on gdb:

(gdb) run -n test.php
Starting program: /home/src/php4-STABLE-200307151730/sapi/cli/php -n
test.php
It didn't crash at all yet.
[Tue Jul 15 12:46:47 2003]  Script:  'test.php'
---
/home/src/php4-STABLE-200307151730/ext/session/session.c(640) : Block
0x0018A5E8 status:
Beginning:  Overrun (magic=0x00B4, expected=0x7312F8DC)

Program received signal SIGSEGV, Segmentation fault.
0xff1f04f8 in memcpy () from
/usr/platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1
(gdb) bt
#0  0xff1f04f8 in memcpy ()
   from /usr/platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1
#1  0x10813c in _mem_block_check (ptr=0x18a610, silent=0, 
__zend_filename=0x144410
/home/src/php4-STABLE-200307151730/ext/session/session.c,
__zend_lineno=640, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /home/src/php4-STABLE-200307151730/Zend/zend_alloc.c:675
#2  0x1080f4 in _mem_block_check (ptr=0x18a610, silent=1, 
__zend_filename=0x144410
/home/src/php4-STABLE-200307151730/ext/session/session.c,
__zend_lineno=640, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at /home/src/php4-STABLE-200307151730/Zend/zend_alloc.c:667
#3  0x106c88 in _efree (ptr=0x18a610, 
__zend_filename=0x144410
/home/src/php4-STABLE-200307151730/ext/session/session.c,
__zend_lineno

#23401 [Com]: $_POST, $_GET empty

2003-06-02 Thread jullrich at euclidian dot com
 ID:   23401
 Comment by:   jullrich at euclidian dot com
 Reported By:  marten dot wibom at seb dot se
 Status:   Bogus
 Bug Type: Variables related
 Operating System: sun solaris 7
 PHP Version:  4.3.2RC2
 New Comment:

I am experiencing the same problem, and don't think this should be
marked 'bogus'. In my case, while I use php_mod
for apache, I do use the cgi version for shell script. Due to old
pre-cli code, I can't easily switch to cli.

Simple sample:
 export QUERY_STRING='x=1'
 php
? 
echo x $x\n;
echo request[x] $_REQUEST[x]\n;
echo query string $_ENV[QUERY_STRING]\n;
?

returns:

Content-type: text/html
X-Powered-By: PHP/4.3.2
 
x
request[x]
query string x=1

---

just to confirm that I am using cgi:

php -v
PHP 4.3.2 (cgi), Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
with Zend Optimizer v2.1.0, Copyright (c) 1998-2003, by Zend
Technologies


Previous Comments:


[2003-05-06 05:48:05] marten dot wibom at seb dot se

i had CGI for testing, which turned out not to work either. it's now
removed again with no difference.

yes, the testscript runs fine elsewhere, for example on the webhotel
i'm using.

i've seen discussions about solaris7 and apache1.3 having problems with
libexpat. my apache comes from www.sunfreeware.com, a cannot compile it
myself since it's complaining about libexpat. but i haven't seen a
solution for it somewhere..

could libexpat create this type of problems?



[2003-04-29 10:37:14] [EMAIL PROTECTED]

Either use CGI or use the module, but don't combine them.
And you're propably doing something else wrong too, as
this works just fine here.




[2003-04-29 03:47:00] marten dot wibom at seb dot se

i'm having trouble with $_POST, $_GET superglobals...as well with
$HTTP_POST_VARS and $HTTP_GET_VARS. they're empty, not even
initialized. from what i can see is that $_SERVER is the only
superglobal working, for example GET information is stored in
$_SERVER[QUERY_STRING].

i've tested 4.3.2-RC2, 4.3.2-RC1, 4.3.1 and 4.2.2 with no difference.
configured with --with-oracle=... --with-oci8=... --with-apxs=

i use apache 1.3.27 on sun solaris 7.

i use a testscript last in this mail that get theese results:
http://www.teamless.com/seb/result-post.txt
http://www.teamless.com/seb/result-get.txt

with theese configurations:
http://www.teamless.com/seb/httpd.conf
http://www.teamless.com/seb/php.ini


thank you for your help!


---testscript---
#!/usr/local/bin/php
?php

html_header(); /* Content-type: plain/html */
html_start(); /* html header */

phpinfo();

$new_action = $_GET[action];
$new_test = $_POST[test];
$new_srv = $_SERVER['SERVER_NAME'];
$old_test = $HTTP_POST_VARS[test];
$old_action = $HTTP_GET_VARS[action];
$req_action = $_REQUEST[action];
$req_test = $_REQUEST[test];

$dir_test = $test;

$meth = $_SERVER['REQUEST_METHOD'];

import_request_variables( gP, imp_ );


print( new_action=$new_actionBR\n );
print( new_test=$new_testBR\n );
print( new_srv=$new_srvBR\n );
print( old_action=$old_actionBR\n );
print( old_text=$old_testBR\n );
print( req_action=$req_actionBR\n );
print( req_test=$req_testBR\n );
print( action=$actionBR\n );
print( dir_test=$testBR\n );
print( imp_action=$imp_actionBR\n );
print( imp_text=$imp_testBR\n );
print( method=$methBR\n );
print( raw=$HTTP_RAW_POST_VARSBR );

print( argc=$_SERVER[QUERY_STRING]BR );
print( argc=$_SERVER[DOCUMENT_ROOT]BR );
print( argc=$_SERVER[SERVER_NAME]BR );

print_r( $_POST );
print( BR );

?
FORM METHOD=post ACTION=www_resources.php
test:INPUT TYPE=text NAME=test VALUE=testtext SIZE=60
INPUT TYPE=submit NAME=go VALUE=Test it!
/FORM
FORM METHOD=get ACTION=www_resources.php
test:INPUT TYPE=text NAME=test VALUE=testtext SIZE=60
INPUT TYPE=submit NAME=go VALUE=Test it!
/FORM
?php

print( A HREF=\www_resources.php?action=mupptest=blupp\Link/A
);

html_stop(); /* html footer */
?





-- 
Edit this bug report at http://bugs.php.net/?id=23401edit=1