On Thu, May 21, 2009 at 10:15, Richard W <rw180...@gmail.com> wrote:
> Any help will be greatly appreciated, especially answering 2) as to why I
> can't read the data.

    Are you certain that the problem lies within the shmop reading?
Check to see if the file is actually being accessed properly, the key
is good from your ftok(), etc.  You may also want to make sure that
things as basic as permissions and 'who created' vs. 'who can read'
(since you're trying to run it from the web server) match up

    With just a cursory glance, the shmop_read() piece itself looks
fine, which suggests to me that there may be other problems.  See if
the logs spit anything out, or try to debug the things with an `or
die("Here's the error.\n");` tacked onto the end of the suspected
lines.  If it's crashing out, consider a cachegrind or
debug_backtrace() run.

    As for the memory being read, I'd agree that it does seem that it
is, since shm_open() is returning something other than FALSE, but that
doesn't mean that it's `=== TRUE` either.  It may instead be returning
a message or another unexpected result that, in empty(), may evaluate
to TRUE and allow it to echo out the message in your test condition.

</Daniel P. Brown>
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW10000

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to