Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #7521
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: Message queues not working properly PHP -> C |
| Date | 2012-11-11 14:01 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <k7osnd$ipv$1@dont-email.me> (permalink) |
| References | <509d702d$0$773$58c7af7e@news.kabelfoon.nl> <509fbce2$0$835$58c7af7e@news.kabelfoon.nl> |
On 11/11/2012 9:57 AM, Muffinman wrote:
> On 09-11-12 22:05, Muffinman wrote:
>> Hello all,
>>
>> I've got a php script that needs to send out some info to a c script
>> (already running). Somehow when php sends out through a message queue it
>> looks like it copies the previous message (send by php or c) and copies
>> it's own message over it with the previous message still visible if it
>> is longer than the next php message. No messages are lost though, only
>> copied and overwritten.
>
> Actually when I set 'serialize' to 'true' it doesn't include the
> previous message send. However, in c the messages comes with an addition
> at the beginning and end of the string which is why I turned it off in
> the first place ("s:2:" and ";"):
>
> spock: "s:2:"Hi";"
>
> This is preferable than some 'random' data, but ugly nonetheless.
>
> Maarten
>
Yes, that would be correct. When you enable serialize, PHP processes
the data through the serialize() function before sending it.
Now I've never tried sending between PHP and C, so I haven't seen your
problem. However, some questions:
1). What OS are you using (including version)?
2). Do you have all errors being displayed? Your php.ini file in your
test system should have:
error_reporting=E_ALL
display_errors=on
3). What does the code in you C program look like?
4). What compiler did you use for the C program?
I'm sure I can come up with more :) but this is a start.
Actually - I just thought of something else. PHP may not be adding the
ending null character. What happens if you send "Hi\0"?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
Message queues not working properly PHP -> C Muffinman <news**REMOVETHIS**@koster.tk> - 2012-11-09 22:05 +0100
Re: Message queues not working properly PHP -> C "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-11-10 17:57 +0100
Re: Message queues not working properly PHP -> C Muffinman <news**REMOVETHIS**@koster.tk> - 2012-11-11 15:41 +0100
Re: Message queues not working properly PHP -> C Muffinman <news**REMOVETHIS**@koster.tk> - 2012-11-11 15:57 +0100
Re: Message queues not working properly PHP -> C Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-11 14:01 -0500
csiph-web