ID: 45079 Comment by: m dot kurzyna at crystalpoint dot pl Reported By: m dot kurzyna at crystalpoint dot pl Status: Feedback Bug Type: Reproducible crash Operating System: Linux PHP Version: 5.3CVS-2008-05-23 (snap) Assigned To: fb-req-jani New Comment:
Just tried with 2008.07.08 08:30 snap - seems to work fine with values both quoted and not. Thanks for the fix. Previous Comments: ------------------------------------------------------------------------ [2008-07-06 11:46:32] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.3-latest.tar.gz And provide new backtrace generated with that snapshot. ------------------------------------------------------------------------ [2008-05-26 20:43:31] m dot kurzyna at crystalpoint dot pl As for the location - it seems convenient. Dunno if loading it with the rest of .ini is a good or bad thing - personally I don't see disadvantages of this except for having to parse one more file and thus startup performance loss. This however is irrelevant. I moved browsecap.ini to /tmp and set browsecap option to new location - it still crashes. However when it can't find the file it doesn't so it's something specific to this file that causes the crash. I've managed to isolate basic test case: it's using quotation for values: option="value" crashes, where option=value doesn't. This isn't true for configuration ini file - using quotations has no crash effect as far as I tested. ------------------------------------------------------------------------ [2008-05-26 20:11:44] [EMAIL PROTECTED] Why do you actually have browscap.ini in that directory anyway..? That sounds like a very bad idea to me, considering it will get loaded as "normal" partial php.ini file. Of course it shouldn't cause a crash though. :) ------------------------------------------------------------------------ [2008-05-25 21:58:35] m dot kurzyna at crystalpoint dot pl Core was generated by `./sapi/cli/php'. Program terminated with signal 11, Segmentation fault. [New process 20491] #0 0x00000000006f76f4 in ini_lex (ini_lval=0x7fffe7d51180) at /home/users/builder/src/php/n2/Zend/zend_ini_scanner.c:1673 1673 yytext[yyleng] = 0; (gdb) bt #0 0x00000000006f76f4 in ini_lex (ini_lval=0x7fffe7d51180) at /home/users/builder/src/php/n2/Zend/zend_ini_scanner.c:1673 #1 0x00000000006f43be in ini_parse () at /home/users/builder/src/php/n2/Zend/zend_ini_parser.c:1557 #2 0x00000000006f3c36 in zend_parse_ini_file (fh=0x7fffe7d512c0, unbuffered_errors=1 '\001', scanner_mode=1, ini_parser_cb=0x620458 <php_browscap_parser_cb>, arg=0xb2cec0) at /home/users/builder/src/php/n2/Zend/zend_ini_parser.c:319 #3 0x0000000000620aba in zm_startup_browscap (type=1, module_number=7) at /home/users/builder/src/php/n2/ext/standard/browscap.c:198 #4 0x0000000000618005 in zm_startup_basic (type=1, module_number=7) at /home/users/builder/src/php/n2/ext/standard/basic_functions.c:4003 #5 0x000000000072b711 in zend_startup_module_ex (module=0xb55eb0) at /home/users/builder/src/php/n2/Zend/zend_API.c:1585 #6 0x0000000000733d00 in zend_hash_apply (ht=0xb335a0, apply_func=0x72b568 <zend_startup_module_ex>) at /home/users/builder/src/php/n2/Zend/zend_hash.c:673 #7 0x000000000072b8f2 in zend_startup_modules () at /home/users/builder/src/php/n2/Zend/zend_API.c:1634 #8 0x00000000006b1739 in php_module_startup (sf=0xb2b480, additional_modules=0x0, num_additional_modules=0) at /home/users/builder/src/php/n2/main/main.c:1898 #9 0x00000000007c326e in php_cli_startup (sapi_module=0xb2b480) at /home/users/builder/src/php/n2/sapi/cli/php_cli.c:358 #10 0x00000000007c3ffb in main (argc=1, argv=0x7fffe7d51938) at /home/users/builder/src/php/n2/sapi/cli/php_cli.c:716 ------------------------------------------------------------------------ [2008-05-23 12:40:17] m dot kurzyna at crystalpoint dot pl Description: ------------ Configuring build --with-config-file-path=/etc/php causes segmentation fault when invoking binary (both CLI and CGI). Reproduce code: --------------- ./configure --with-config-file-path=/etc/php make ./sapi/cli/php Actual result: -------------- [EMAIL PROTECTED] n1]$ ./sapi/cgi/php-cgi Segmentation fault A strace follows: [...] open("/etc/php/php.ini", O_RDONLY) = 3 lstat("/etc", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/etc/php", {st_mode=S_IFDIR|0755, st_size=52, ...}) = 0 lstat("/etc/php/php.ini", {st_mode=S_IFREG|0644, st_size=42387, ...}) = 0 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffe8ff0d60) = -1 ENOTTY (Inappropriate ioctl for device) fstat(3, {st_mode=S_IFREG|0644, st_size=42387, ...}) = 0 mmap(NULL, 42403, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b4dc1b13000 munmap(0x2b4dc1b13000, 42387) = 0 close(3) = 0 mmap(NULL, 323584, PROT_READ|PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x2b4dc1b13000 brk(0xa42000) = 0xa42000 brk(0xa63000) = 0xa63000 brk(0xa84000) = 0xa84000 futex(0x2b4dc2d11ae0, FUTEX_WAKE_PRIVATE, 2147483647) = 0 brk(0xaa5000) = 0xaa5000 brk(0xac6000) = 0xac6000 brk(0xae7000) = 0xae7000 brk(0xb08000) = 0xb08000 brk(0xb29000) = 0xb29000 open("/etc/php/browscap.ini", O_RDONLY) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fffe8ff1da0) = -1 ENOTTY (Inappropriate ioctl for device) fstat(3, {st_mode=S_IFREG|0644, st_size=319838, ...}) = 0 mmap(NULL, 319854, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b4dc1b62000 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45079&edit=1