php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20604 PHP CLI exists always with Segmantation Fault
Submitted: 2002-11-24 01:17 UTC Modified: 2002-12-21 01:00 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: binary_digit at web dot de Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 4CVS-2002-11-24 (dev) OS: Linux Debian Sarge
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: binary_digit at web dot de
New email:
PHP Version: OS:

 

 [2002-11-24 01:17 UTC] binary_digit at web dot de
when i call a php script on bash with the #!/usr/local/bin/php header i always get the error segmantation fault but the script executes normal even with a normal <? echo "test"; exit(); ?> i get this error message
with cvs up i see that i have the newest php source code

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-24 03:01 UTC] jan@php.net
this is most likely a dupe of #20539. can you please provide a backtrace along with some more information about your build environment?
 [2002-11-24 03:32 UTC] binary_digit at web dot de
oh sorry for duplication i searched for open bugs with this topic but didn't find one so you can close this if you want =)
 [2002-11-24 03:35 UTC] jan@php.net
since this one is a bit nasty (for I, e.g., can't reproduce it), it would help a lot if you can provide more information about your system and build environment. Thank You.
 [2002-11-24 03:43 UTC] binary_digit at web dot de
php configured with
'./configure' '--quiet' '--with-mysql=/usr/local/mysql' '--enable-inline-optimization' '--enable-trans-sid' '--with-mhash' '--with-bz2' '--with-zlib' '--enable-ftp' '--with-openssl' '--enable-sockets' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-iconv' '--with-pcre-regex=/usr' '--enable-sigchild' '--with-expat-dir=/usr' '--disable-cli' '--disable-cgi' '--disable-ipv6'

taken from phpinfo():

mysql 4.0.5-beta self compiled
PCRE Library Version 3.9 02-Jan-2002
OpenSSL 0.9.6g 9 Aug 2002
MHASH API Version 20020524
iconv library version 2.2.5 
BZip2 Version 1.0.2, 30-Dec-2001

glibc version 2.2.5
php,mysql, apache compiled with gcc 3.2.1
kernel version 2.5.47
apache 2.0.43
 [2002-11-24 03:53 UTC] binary_digigit at web dot de
interesting when i just configure with ./configure there is no segmantation fault
 [2002-11-24 03:57 UTC] jan@php.net
when you disable cgi and cli how can you use #!/usr/local/bin/php ?
 [2002-11-24 04:04 UTC] binary_digit at web dot de
with just ./configure it compiles the cli and installs it because php -m doestn't list the bzip2m, zlib etc. modules

that's the output of php -m with my normal configure flags

[PHP Modules]
bz2
ctype
ftp
iconv
mhash
mysql
openssl
overload
pcre
posix
session
sockets
standard
tokenizer
xml
zlib

[Zend Modules]

that's the output with no configure flags 

[PHP Modules]
ctype
mysql
overload
pcre
posix
session
standard
tokenizer
xml

[Zend Modules]
 [2002-11-24 04:10 UTC] jan@php.net
your original ./configure line included '--disable-cli' '--disable-cgi', thus not php binary was built that you were able to use with #!/usr/local/bin/php. So what was your ./configure line for that standalone executable php file? :)
 [2002-11-24 04:17 UTC] binary_digit at web dot de
interesting in my config-php script where i have the configure line just to not type it evrytime i have it not there but my apache2 module is a bit older where i have compiled it with --disable-cli =)

current testing status :
 ./configure --with-mysql=/usr/local/mysql --enable-trans-sid --enable-inline-optimization --enable-ftp --enable-sockets
works without problems
 [2002-11-24 04:20 UTC] jan@php.net
so no error === no bugreport? :)
can you add your ./configure lines cept for --disable-cli and see if that segfault reappears?
 [2002-11-24 04:29 UTC] binary_digit at web dot de
i add evrything one at a time and recompile and rerun my script i recompiled evry time with make -s clean all install

the problem seems to be in --with-apxs2=/usr/local/apache2/bin/apxs so there is a bug and a bug report =)
 [2002-11-24 04:31 UTC] jan@php.net
cool, so all we need is a backtrace ;) http://bugs.php.net/bugs-generating-backtrace.php
 [2002-11-24 04:32 UTC] binary_digit at web dot de
it worked befor with exactly this configure line ./configure --disable-cgi --silent --with-mysql=/usr/local/mysql --enable-trans-sid --enable-inline-optimization --enable-ftp --enable-sockets --without-pear --with-mhash --with-bz2 --with-zlib

but when i added the --with-apxs2=/usr/local/apache2/bin/apxs it has the segmantation fault

sorry for double post
 [2002-11-24 04:37 UTC] binar_digit at web dot de
ok i just compiled now with my whole "standard" configure line but without the --with-apxs2 and it had no segmantation fault on the other bug report i can see the problem seems to be also with apache 1.3 --with-apxs line
 [2002-11-24 04:45 UTC] binary_digit at web dot de
here it is

(gdb) run ddns-update.php
Starting program: /usr/local/bin/php ddns-update.php
[New Thread 1024 (LWP 24022)]
nothing to do

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 24022)]
0x403357d0 in __morecore () from /lib/libc.so.6
(gdb) bt
#0  0x403357d0 in __morecore () from /lib/libc.so.6
#1  0x403357c0 in __morecore () from /lib/libc.so.6
#2  0x403357c0 in __morecore () from /lib/libc.so.6
#3  0x403357c8 in __morecore () from /lib/libc.so.6
#4  0x403357b0 in __morecore () from /lib/libc.so.6
#5  0x403357a8 in __morecore () from /lib/libc.so.6
#6  0x403357a0 in __morecore () from /lib/libc.so.6
#7  0x40335798 in __morecore () from /lib/libc.so.6
#8  0x40335790 in __morecore () from /lib/libc.so.6
#9  0x081a5560 in ?? ()
 [2002-11-24 04:49 UTC] binary_digit at web dot de
argh forget the relevant part of this script

#!/usr/local/bin/php
<?
if ($argc < 2) die("nothing to do\n");
 [2002-11-24 05:11 UTC] binary_digit at web dot de
i installed now the libc6-dbg package and put /usr/lib/debug in LD_LIBRARY_PATH and now is the error in another function of libc

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 26000)]
0x403367d0 in main_arena () from /usr/lib/debug/libc.so.6
(gdb) bt
#0  0x403367d0 in main_arena () from /usr/lib/debug/libc.so.6
#1  0x403367c0 in main_arena () from /usr/lib/debug/libc.so.6
#2  0x403367c0 in main_arena () from /usr/lib/debug/libc.so.6
#3  0x403367c8 in main_arena () from /usr/lib/debug/libc.so.6
#4  0x403367b0 in main_arena () from /usr/lib/debug/libc.so.6
#5  0x403367a8 in main_arena () from /usr/lib/debug/libc.so.6
#6  0x403367a0 in main_arena () from /usr/lib/debug/libc.so.6
#7  0x40336798 in main_arena () from /usr/lib/debug/libc.so.6
#8  0x40336790 in main_arena () from /usr/lib/debug/libc.so.6
#9  0x081a4560 in ?? ()
 [2002-12-04 18:18 UTC] sniper@php.net
Please try using this CVS snapshot:

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


 [2002-12-05 00:26 UTC] binary_digit at web dot de
still have this error with same backtrace =(
 [2002-12-05 09:58 UTC] sniper@php.net
Do you have 'session.auto_start=1' in your php.ini ? (or php-cli.ini) Does this happen with PHP 4.2.3?
 [2002-12-06 00:44 UTC] binary_digit at web dot de
argh the error is on php 4.2.3 too but i don't have session.auto_start=1 =(
 [2002-12-21 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC