php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #503 PHP crashes when php3.ini file is present in "." and called from command line
Submitted: 1998-07-02 12:21 UTC Modified: 1998-08-13 17:34 UTC
From: kk at shonline dot de Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0 Final Release OS: Linux 2.0.34 and Solaris 2.5.1
Private report: No CVE-ID: None
 [1998-07-02 12:21 UTC] kk at shonline dot de
kris@valiant:/home/kris/Source/php-3.0 > gdb php
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (i486-unknown-linux --target i486-linux),
Copyright 1996 Free Software Foundation, Inc...
(gdb) run
Starting program: /home/kris/Source/php-3.0/php

Program received signal SIGSEGV, Segmentation fault.
0x8055f25 in lex_scan (phplval=0xbfffe868) at language-scanner.c:3750
3750                    if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
(gdb) bt
#0  0x8055f25 in lex_scan (phplval=0xbfffe868) at language-scanner.c:3750
#1  0x805cf46 in read_next_token (tcm=0x80dd434, token=0xbfffe704,
    phplval=0xbfffe868) at token_cache.c:139
#2  0x8056d55 in phplex (phplval=0xbfffe868) at main.c:417
#3  0x804abf7 in phpparse () at /usr/local/share/bison.simple:387
#4  0x805823d in php3_parse (yyin=0x80b56d8) at main.c:1402
#5  0x8058a2d in main (argc=1, argv=0xbffff718) at main.c:1731
#6  0x804a90e in _start ()
(gdb)

The php3.ini is here:

[PHP_3]
engine          =       On      ; enable PHP 3.0 parser
short_open_tag  =       Off     ; allow the <? tag.  otherwise, only <?php and <
script> tags are recognized.
precision       =       14      ; number of significant digits displayed in floa
ting point numbers
y2k_compliance  =       Off     ; whether to be year 2000 compliant (will cause
problems with non y2k compliant browsers)
; Safe Mode
safe_mode       =       Off
safe_mode_exec_dir      =
; Colors for Syntax Highlighting mode.  Anything that's acceptable in <font colo
r=???> would work.
highlight.string        =       #DD0000
highlight.comment       =       #FF8000
highlight.keyword       =       #007700
highlight.bg            =       #000000
highlight.default       =       #0000BB
highlight.html          =       #000000

max_execution_time      = 30      ; Maximum execution time of each script, in se
conds
memory_limit            = 8388608 ; Maximum amount of memory a script may consum
e (8MB)

error_reporting         = 7
display_errors          = On    ; Print out errors (as a part of the HTML script
)
log_errors              = Off   ; Log errors into a log file (server-specific lo
g, stderr, or error_log (below))
track_errors            = Off   ; Store the last error/warning message in $php_e
rrormsg (boolean)
;error_log              = syslog        ; log errors to syslog (Event Log on NT,
 not valid in Windows 95)
warn_plus_overloading   = On    ; warn if the + operator is used with strings

magic_quotes_gpc        = On ; magic quotes for incoming GET/POST/Cookie data
magic_quotes_runtime    = Off ; magic quotes for runtime-generated data, e.g. da
ta from SQL, from exec(), etc.
magic_quotes_sybase     = Off ; Use Sybase-style magic quotes (escape ' with ''
instead of \')
track_vars                      =       On              ; enable $PHP_GET_VARS[]
, $PHP_POST_VARS[] and $PHP_COOKIE_VARS[] arrays

auto_prepend_file       = /home/kris/www/todo/php-lib/prepend.php3
auto_append_file        =
include_path            = /home/kris/www/todo/php-lib
doc_root                =                                       ; the root of th
e php pages, used only if nonempty
user_dir                =                                       ; the directory
under which php opens the script using /~username, used only if nonempty
upload_tmp_dir          = /tmp/ ; temporary directory for HTTP uploaded files
extension_dir           = ./    ; directory in which the loadable extensions (mo
dules) reside

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; File Extensions (meaningless in UNIX) ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
cgi_ext         =       php3
isapi_ext       =       php3
nsapi_ext       =       php3

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
; if you wish to have an extension loaded automaticly, use the
; following syntax:  extension=modulename.extension
; for example, on windows,
; extension=msql.dll
; or under UNIX,
; extension=msql.so


;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

[Syslog]
define_syslog_variables = Off   ; Whether or not to define the various syslog va
riables,

[mail function]
SMTP            =       localhost       ;for win32 only
sendmail_from   =       me@localhost.com;for win32 only
sendmail_path   =                       ;for unix only, may supply arguments as
well (default is sendmail -t)

[Debugger]
debugger.host    = localhost
debugger.port    = 7869
debugger.enabled = False

[Logging]
; These configuration directives are used by the example logging mechanism.
; See examples/README.logging for more explanation.
;logging.method    = db
;logging.directory = /path/to/log/directory

[SQL]
sql.safe_mode   =       Off

[ODBC]
;uodbc.default_db               =       Not yet implemented
;uodbc.default_user             =       Not yet implemented
;uodbc.default_pw               =       Not yet implemented
uodbc.allow_persistent  =       On      ; allow or prevent persistent links
uodbc.max_persistent    =       -1      ; maximum number of persistent links. -1
 means no limit
uodbc.max_links                 =       -1      ; maximum number of links (persi
stent+non persistent). -1 means no limit
uodbc.defaultlrl                =       0       ; Handling of LONG fields. Retur
ns number of bytes to variables, 0 means passthru
uodbc.defaultbinmode    =       0       ; Handling of binary data. 0 means passt
hru, 1 return as is, 2 convert to char
; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
of uodbc.defaultlrl
; and uodbc.defaultbinmode

[MySQL]
mysql.allow_persistent  =On     ; allow or prevent persistent link
mysql.max_persistent    =-1     ; maximum number of persistent links. -1 means n
o limit
mysql.max_links         =-1     ; maximum number of links (persistent+non persis
tent).  -1 means no limit
mysql.default_port      =       ; default port number for mysql_connect().  If u
nset,
mysql.default_host      =       ; default host for mysql_connect() (doesn't appl
y in safe mode)
mysql.default_user      =       ; default user for mysql_connect() (doesn't appl
y in safe mode)
mysql.default_password  =       ; default password for mysql_connect() (doesn't
apply in safe mode)

[mSQL]
msql.allow_persistent   =       On      ; allow or prevent persistent link
msql.max_persistent             =       -1      ; maximum number of persistent l
inks. -1 means no limit
msql.max_links                  =       -1      ; maximum number of links (persi
stent+non persistent).  -1 means no limit

[PostgresSQL]
pgsql.allow_persistent  =       On      ; allow or prevent persistent link
pgsql.max_persistent    =       -1      ; maximum number of persistent links. -1
 means no limit
pgsql.max_links                 =       -1      ; maximum number of links (persi
stent+non persistent).  -1 means no limit

[Sybase]
sybase.allow_persistent =       On      ; allow or prevent persistent link
sybase.max_persistent   =       -1      ; maximum number of persistent links. -1
 means no limit
sybase.max_links                =       -1      ; maximum number of links (persi
stent+non persistent).  -1 means no limit
;sybase.interface_file  =       "/usr/sybase/interfaces"
sybase.min_error_severity       =       10      ; minimum error severity to disp
lay
sybase.min_message_severity     =       10      ; minimum message severity to di
splay
sybase.compatability_mode       = Off   ; compatability mode with earlier versio
ns of PHP 3.0.
                                                                        ; If on,
 this will cause PHP to automatically assign types to results
                                                                        ; accord
ing to their Sybase type, instead of treating them all as
                                                                        ; string
s.  This compatability mode will probably not stay around
                                                                        ; foreve
r, so try applying whatever necessary changes to your code,
                                                                        ; and tu
rn it off.

[Sybase-CT]
sybct.allow_persistent  =       On              ; allow or prevent persistent li
nk
sybct.max_persistent    =       -1              ; maximum number of persistent l
inks. -1 means no limit
sybct.max_links                 =       -1              ; maximum number of link
s (persistent+non persistent).  -1 means no limit
sybct.min_server_severity       =       10      ; minimum server message severit
y to display
sybct.min_client_severity       =       10      ; minimum client message severit
y to display

[bcmath]
bcmath.scale    =       0       ; number of decimal digits for all bcmath functi
ons

[browscap]
;browscap       =       extra/browscap.ini


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-08-13 17:34 UTC] zeev
Does not crash when auto_prepend_file is commented out.
Looks like one for Zeev.

Fixed
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu May 23 23:01:26 2019 UTC