|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| PHP 7.2.30 MqSeries 0.15 Segmentation fault. | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | ROMAN | 
			  
				|  Posted: Fri Jul 03, 2020 1:36 pm    Post subject: PHP 7.2.30 MqSeries 0.15 Segmentation fault. |   |  |  
		  | Newbie
 
 
 Joined: 03 Jul 2020Posts: 1
 
 
 | 
			  
				| Hello, i am getting messages from queue with mqseries_get procedure. And when queue is empty im getting COMPCODE = MQSERIES_MQCC_OK and REASON = MQSERIES_MQRC_NO_MSG_AVAILABLE, closing connection and all goes fine.
 But when there is a message in a queue i'm getting Segmentation fault error.
 
 Please advice me where to look for the root of this issue. I found some error files in /var/mqm/errors, but i dont know what to look at. There are only messages about long user name that exceeds 13 characters.
 
 
 
 
 
   
	| Code: |  
	| $mdg = []; $gmo = ['Options' => MQSERIES_MQGMO_FAIL_IF_QUIESCING | MQSERIES_MQGMO_WAIT, 'WaitInterval' => 3000];
 $bufferLength = 2000000;
 $dataLength = 0;
 $this->message = null;
 
 mqseries_get($this->hConn, $this->hObj, $mdg, $gmo, $bufferLength, $this->message, $dataLength, $this->compCode, $this->reason);
 
 |  
 The message body less than 2000000 bytes.
 
 Thanks in advance.
 |  |  
		  | Back to top |  |  
		  |  |  
		  | gbaddeley | 
			  
				|  Posted: Sun Jul 05, 2020 3:52 pm    Post subject: |   |  |  
		  |  Jedi Knight
 
 
 Joined: 25 Mar 2003Posts: 2538
 Location: Melbourne, Australia
 
 | 
			  
				| If mqseries_get is like the MQ API function MQGET, it assumes that the message buffer is pre-allocated. _________________
 Glenn
 |  |  
		  | Back to top |  |  
		  |  |  
		  | hughson | 
			  
				|  Posted: Sun Jul 05, 2020 8:47 pm    Post subject: Re: PHP 7.2.30 MqSeries 0.15 Segmentation fault. |   |  |  
		  |  Padawan
 
 
 Joined: 09 May 2013Posts: 1967
 Location: Bay of Plenty, New Zealand
 
 | 
			  
				| 
   
	| ROMAN wrote: |  
	| 
   
	| Code: |  
	| $bufferLength = 2000000; $this->message = null;
 |  |  
 These two things seems contradictory.
 
 Have you viewed the example here.
 
 Cheers,
 Morag
 _________________
 Morag Hughson @MoragHughson
 IBM MQ Technical Education Specialist
 Get your IBM MQ training here!
 MQGem Software
 |  |  
		  | Back to top |  |  
		  |  |  
		  | vasilev | 
			  
				|  Posted: Fri Sep 27, 2024 12:24 am    Post subject: |   |  |  
		  |  Acolyte
 
 
 Joined: 31 Oct 2014Posts: 71
 Location: Germany
 
 | 
			  
				| if somebody wants to read all the messages: 
 
 
   
	| Code: |  
	| while (true) { $MQMD = array();
 $gmo = array('Options' => MQSERIES_MQGMO_FAIL_IF_QUIESCING | MQSERIES_MQGMO_WAIT | MQSERIES_MQGMO_BROWSE_NEXT, 'WaitInterval' => 3000);
 mqseries_get...
 
 if ($comp_code == MQSERIES_MQCC_OK) {
 echo $msg;
 } else {
 break;
 }
 }
 
 |  _________________
 Regards
 V.Vasilev
 |  |  
		  | Back to top |  |  
		  |  |  
		  |  |  |  
  
	|    |  | Page 1 of 1 |  
 
 
  
  	| 
		
		  | 
 
 | You cannot post new topics in this forum You cannot reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 
 |  |  |  |