473,508 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Warning: msg_receive(): message corrupted in

14 New Member
hi
im trying to receive message from a C program to a php script. while receiving i have used non blocking flag in php. But when i try to read the message

"Warning: msg_receive(): message corrupted " is displayed.

i can see that the message from C prog is reaching the queue n its is picked up by
php script.
if i dont use the non blocking flag then i can view the message properly.

This is the receiving part of my code

Expand|Select|Wrap|Line Numbers
  1. if ($res=msg_receive ($msg_id,2,$msg_type,100 , $msg,true, MSG_IPC_NOWAIT, $msg_err)){
  2. echo "</br>".($msg)."</br>";
  3. }
[Please use CODE tags when posting source code. Thanks! --pbmods]
Jul 9 '07 #1
2 3250
carobee
14 New Member
i got the ans change the serialise option to false

Expand|Select|Wrap|Line Numbers
  1. if ($res=msg_receive ($msg_id,2,$msg_type,100 , $msg,false, MSG_IPC_NOWAIT, $msg_err)){
  2. echo "</br>".($msg)."</br>";
  3. }
Jul 9 '07 #2
Motoma
3,237 Recognized Expert Specialist
Glad you were able to find your solution, thank you for posting it back for us to learn from.
Jul 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

35
3172
by: jerrygarciuh | last post by:
Hi all, I was just wondering what popular opinion is on PHP giving this warning: Warning: Invalid argument supplied for foreach() in /home/boogerpic/public_html/my.php on line 6 when...
0
1703
by: AR | last post by:
Hi, Message queue problem. Perl program creates a message queue and send a message to it. PHP program is to receive the message. Simple. But PHP's msg_receive() is getting corrupted message. Can...
4
1545
by: Luna | last post by:
Hi, Can someone tell me how i could close a form if the 'OK' button is clicked in a message box. i have attempted something like the following.... Private Sub Button2_Click_1(ByVal sender As...
28
4017
by: Lee Rouse | last post by:
Hello all, This is going to be a rather lengthy "question". I have an Access 2k database, separated front end/back end. Front end copies are on about 30 workstations and used frequently during...
2
5155
by: Gabest | last post by:
After adding one more lib to my project, I keep getting this warning from the linker (twice): warning LNK4020: a type record in '<snip>\debug\vc70.pdb' is corrupted; some symbols and types may...
10
6210
by: paytam | last post by:
hi all can you tell me what's the wrong with this code? I use gcc compiler,but when I wanted to use gets() function in my code but it takes a dangerous warning(the gets function is dangerous...
6
9569
by: Phil Stanton | last post by:
My Ak2 databas has been running successfully for many years althogh it gets upgraded regularly. I now find on this, and other dbs, when I delete a record I no longer get the message "You are...
3
3543
by: santhanalakshmi | last post by:
Hi, <?php mysql_connect('localhost','root',''); mysql_select_db('test'); $query="select * from phonedirectory"; $result=mysql_query($query); echo "One Way To Print"; echo "<br>";
0
3875
by: DannielHS | last post by:
- Windows created the low disk space warning to alert computer users when their hard drive is running low on available disk space. Then you will see on a fairly regular basis as your hard drive fills...
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7120
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5050
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.