#23669 [Opn]: Segmentation fault occurs when calling PHP CGI as directory index

From: Date: Sat, 17 May 2003 08:47:57 +0000
Subject: #23669 [Opn]: Segmentation fault occurs when calling PHP CGI as directory index
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39831@lists.php.net to get a copy of this message
ID: 23669 Updated by: moriyoshi@php.net -Summary: Segment fault occurres when calling PHP CGI as direcotry index Reported By: m5issige at mr dot hitachi-medical dot co dot jp Status: Open Bug Type: CGI related Operating System: SunOS 5.6 PHP Version: 4.3.2RC3 New Comment: I can replicate the problem with the following shell script: #!/bin/sh REDIRECT_STATUS=200 REDIRECT_URL=/ REQUEST_METHOD=GET REQUEST_URI=/ SCRIPT_FILENAME=blah SCRIPT_NAME=/index.cgi QUERY_STRING= export REDIRECT_STATUS REDIRECT_URL REQUEST_METHOD REQUEST_URI PATH_TRANSLATED PATH_INFO SCRIPT_FILENAME SCRIPT_NAME QUERY_STRING gdb sapi/cgi/php Previous Comments: ------------------------------------------------------------------------ [2003-05-17 00:31:21] m5issige at mr dot hitachi-medical dot co dot jp When calling PHP script as directory index, it will be terminated with segment fault in file cgi_main.c at line 709. sapi/cgi/cgi_main.c: 708 if (stat( script_path_translated, &st ) == -1 ) { 709 char *pt = estrdup(script_path_translated); 710 int len = strlen(pt); 711 char *ptr; Test script: <?php phpinfo(); ?> Apatch setting (in .htaccess): DirectoryIndex index.cgi index.html Then, access to http://myhost.example.com/path/to/parent/directory/of/the/script/ Environment: SunOS 5.6 with Apache 1.2.4 (yep, very old...) Configure: --prefix=$HOME --disable-cli --disable-all --without-mysql --enable-safe-mode --with-pcre-regex --with-regex=php --enable-mbstring --enable-mbregex --enable-zend-multibyte --enable-fastcgi --enable-session (I can not swith to root, so I install PHP into my own directory) Osamu Shigematsu ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23669&edit=1

« previous php.bugs (#39831) next »