php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46886 signal segmentation
Submitted: 2008-12-17 03:39 UTC Modified: 2008-12-17 08:54 UTC
From: zhangrui at pay1 dot com dot cn Assigned:
Status: Not a bug Package: Website problem
PHP Version: Irrelevant OS: qnx
Private report: No CVE-ID: None
 [2008-12-17 03:39 UTC] zhangrui at pay1 dot com dot cn
Description:
------------
I was run a php script ,result in apache child pid coredumps.

Reproduce code:
---------------
function startTrans($GET){
			echo PFAXS::PFAXS_startTransaction();
			$GET['RESULT12'] = date("Y")."-".substr($GET['RESULT12'],0,2)."-".substr($GET['RESULT12'],2,2);
			$GET['RESULT13'] = substr($GET['RESULT13'],0,2).":".substr($GET['RESULT13'],2,2).":".substr($GET['RESULT13'],4,2);
			if(!$orderID = TFWUtil::getOrderID()){
				TFWUtil::writeTFWLog(get_class(),$this->FUNCTION_START_TRANS,"getOrderID");
				return $this->doStartCancel($GET);
			}
			$GET['ORDERCODE'] = $orderID;
			$GET['KIOSKID'] =  substr($GET['ORDERCODE'],8,8);
			/*if(!TFWUtil::is_linked(TFW_SERVER_IP,TFW_SERVER_PORT,20)){
				TFWUtil::writeTFWLog(get_class(),$this->FUNCTION_START_TRANS,"is_linked");
				return $this->doStartCancel($GET);
			}*/
			TFWUtil::writeTransData($GET);
			$args = explode(KW_SEPARATOR,urldecode($GET[KW_TARGS]));
			if(!TFWUtil::url_exist($args[5])){
				TFWUtil::writeTFWLog(get_class(),$this->FUNCTION_START_TRANS,"url_exist(1)");
				return $this->doStartCancel($GET);
			}
			$URLArray = parse_url($args[5]);
			parse_str($URLArray['query'],$URLParamArray);
			$GET = array_merge($GET,$URLParamArray);
			require_once(TFW_HTTP_CONTEXT.$URLArray['path']);
			if(!function_exists("TFW_endTransaction")){
				TFWUtil::writeTFWLog(get_class(),$this->FUNCTION_START_TRANS,"function_exists");
				return $this->doStartCancel($GET);
			}
			$GET = TFWUtil::array_sub($GET,KW_TARGS);
			$result = TFW_endTransaction($GET);
			$active = TFWUtil::getActiveData();
			if($result['trans_status']==KW_RESULT_TRUE){
				if(!TFWUtil::url_exist($result['succ_url'])){
					TFWUtil::writeTFWLog(get_class(),$this->FUNCTION_START_TRANS,"url_exist(2)");
					//return $this->doStartCancel($GET);
				}
				if($result['print_status']==KW_RESULT_TRUE){
					$PRN[KW_TFCODE] = KW_TRANS_SUCC_CODE;
					$PRN[KW_SHOW_SUCC] = $result['succ_url'];
					$printURL = $this->getSUCCURL($PRN,ACTION_DO_EJECT_CARD);
					$TFWPrint = new TFWPrint();
					if(!$printMD5 = $TFWPrint->doTFWPrint($printURL,$result['print_config_file'],$result['print_array'],$active)){
						TFWUtil::writeTFWLog(get_class(),$this->FUNCTION_START_TRANS,"doTFWPrint");
						//return $this->doStartCancel($GET);
					}
					$PUT[KW_PRINT_MD5_CODE] = $printMD5;
				}
				$PUT[KW_PRINT_STATUS] = $result['print_status'];
				$PUT[KW_SHOW_SUCC] = $result['succ_url'];
				$PUT[KW_EXCE_SIGN] = $result['exception_status'];
				$this->doPOSLog($result['log_array'],$active);
				$url = $this->getSUCCURL($PUT,ACTION_DO_SUCC_TRANS);
				return TFWUtil::script_forward($url);
			}
			return $this->doStartCancel($GET);
		}

Expected result:
----------------
coninue next page

Actual result:
--------------
apache child pid coredump

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-17 08:54 UTC] bjori@php.net
This is not a problem with one of our websites.

Please file another bug report choosing better category and filling out the version field correctly.

Furthermore, your reproduce script is not a standalone reproduce example.
A gdb backtrace would also help in fixing this bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 21:01:32 2024 UTC