|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-07-11 09:43 UTC] nathan@php.net
Description: ------------ Scripts do not exit after processing code. Reproduce code: --------------- #!/home/php5/bin/php <?php print "test"; ?> chmod 755 it, and execute. Expected result: ---------------- Script should print "test" and exit. Actual result: -------------- Echoes text, with a delay, but then doesnt exit, just sits active with no feedback/errors. Waited 2minutes, script still didnt close gracefully. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 11:00:02 2025 UTC |
notice, that mostly all was using gcc2. Here are some more tests. here are results from debian gcc version 2.95.4 20011002 (Debian prerelease) (gdb) run xxx.php Starting program: /usr/lib/cgi-bin/php xxx.php [New Thread 1024 (LWP 15635)] Content-type: text/html X-Powered-By: PHP/5.0.0b2-dev test Program received signal SIGINT, Interrupt. [Switching to Thread 1024 (LWP 15635)] 0x4023bd2f in free () from /lib/libc.so.6 (gdb) info stack #0 0x4023bd2f in free () from /lib/libc.so.6 #1 0x4023baa3 in free () from /lib/libc.so.6 #2 0x081467b0 in zend_hash_destroy (ht=0x81d0090) at /usr/src/php5-200308131730/Zend/zend_hash.c:518 #3 0x08141cf6 in zend_shutdown () at /usr/src/php5-200308131730/Zend/zend.c:687 #4 0x08118e02 in php_module_shutdown () at /usr/src/php5-200308131730/main/main.c:1459 #5 0x0817d549 in main (argc=2, argv=0xbffffde4) at /usr/src/php5-200308131730/sapi/cgi/cgi_main.c:1654 #2 0x081467b0 in zend_hash_destroy (ht=0x81d0090) at /usr/src/php5-200308131730/Zend/zend_hash.c:518 518 pefree(q, ht->persistent); (gdb) list 513 ht->pDestructor(q->pData); 514 } 515 if (!q->pDataPtr && q->pData) { 516 pefree(q->pData, ht->persistent); 517 } 518 pefree(q, ht->persistent); 519 } 520 pefree(ht->arBuckets, ht->persistent); 521 522 SET_INCONSISTENT(HT_DESTROYED); (gdb) print *q $4 = {h = 1647256011, nKeyLength = 16, pData = 0x81d2c18, pDataPtr = 0x0, pListNext = 0x81d2c90, pListLast = 0x81d2b28, pNext = 0x0, pLast = 0x0, arKey = "d"} (gdb) print *ht $5 = {nTableSize = 1024, nTableMask = 1023, nNumOfElements = 42, nNextFreeElement = 0, pInternalPointer = 0x81d1028, pListHead = 0x81d1028, pListTail = 0x81d2c90, arBuckets = 0x81ff558, pDestructor = 0x813bf40 <destroy_zend_function>, persistent = 1 '\001', nApplyCount = 0 '\0', bApplyProtection = 0 '\0'} (gdb) print *ht->arBuckets $7 = (Bucket *) 0x0 gdb) up #3 0x08141cf6 in zend_shutdown () at /usr/src/php5-200308131730/Zend/zend.c:687 687 zend_hash_destroy(GLOBAL_FUNCTION_TABLE); (gdb) list 682 zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC); 683 #endif 684 zend_hash_graceful_reverse_destroy(&module_registry); 685 zend_destroy_rsrc_list_dtors(); 686 687 zend_hash_destroy(GLOBAL_FUNCTION_TABLE); 688 zend_hash_destroy(GLOBAL_CLASS_TABLE); 689 690 zend_hash_destroy(GLOBAL_AUTO_GLOBALS_TABLE); 691 free(GLOBAL_AUTO_GLOBALS_TABLE); running strace ends up here: write(1, "X-Powered-By: PHP/5.0.0b2-dev", 29X-Powered-By: PHP/5.0.0b2-dev) = 29 write(1, "\r\n", 2 ) = 2 write(1, "\r\n", 2 ) = 2 write(1, "test\n", 5test ) = 5 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0 this have nothing to do with gentoo, php runs fine there. anything else i can test?