User Profile
Collapse
-
i found the solution. Instead of doing in such a complex way i went for a nonblocking message receive call.In this way i could solve the problem easily -
-
i got the ans change the serialise option to false
[code=php]if ($res=msg_recei ve ($msg_id,2,$msg _type,100 , $msg,false, MSG_IPC_NOWAIT, $msg_err)){
echo "</br>".($msg)."</br>";
}[/code]Leave a comment:
-
Warning: msg_receive(): message corrupted in
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.... -
can i do something like fork a process, let the child process try to receive the process. now since no message is there in the message queue it will go into block state n return control to parent process. As soon as control comes back to the parent process it sends the time out messsage.
Is somethng like this is feasible?Leave a comment:
-
-
i checked out , its 30 sec. but i guess when the php script comes to the code of receiving message it goes into wait state. how to take control at that time?
i used it so that i could set my own timeLeave a comment:
-
time out if exceeded the time limit
Is there any way to monitor the message queue through php script?
Suppose my php script is receiving message from message queue. i wanted my php scipt to time out if certain sec say 30 sec are exceeded while receiving message from message queue. Is it possible?
i tried with set_time_limit( ) function but still the script doesnot time out. It waits till it receives the message.
want urgent help. thanks... -
let me elaborate a bit
i have to collect the message in php on the other side. what i designed follows like this
1)sent the message from php script to C prog
2)if C prog receives , then sends a ack to php script
3)php script receives the ack from php.meanwhile C prog monitors the message queue for in coming messages. if there is no message the for atleast say some sec, then sends a nack
4)the php script...Leave a comment:
-
if the php script finds no message in the message queue ,then it should stop and show a time out error( i.e i guess i have to stop the php script).it is the scipt runnin in client sideLeave a comment:
-
thnks for the quick reply
i have to collect the message in php on the other side. what i designed follows like this
1)sent the message from php script to C prog
2)if C prog receives , then sends a ack to php script
3)php script receives the ack from php.meanwhile C prog monitors the message queue for in coming messages. if there is no message the for atleast say some sec, then sends a nack
4)the php script on receiving...Leave a comment:
-
creating a time out feature
hi
i wanted to incorporate a time out feature in while reading message queues in my program. i think i have to use threads but i m not able to visualise the logic.
can anyone help? im in urgent need -
time out in php
hi everyone
i m trying to write a script where i m communicating between C program and a php program through message queue. i want to add a time out feature in both sides, so that when the php script is looking for message it should not stay blocked ,rather wait for sometime and if there is no message available then come back.
can anyone help please? im in urgent need.. -
Progress bar in php
I have designed a script in php where i had a page for uploading single and mulitple files. i wanted to show progress bar while uploading.
i m using php 4.4.3
apache 1.3.37
Can it be done in php? or do i need to use something else?
No activity results to display
Show More
Leave a comment: