ID:               27271
 User updated by:  yury at gorodok dot net
 Reported By:      yury at gorodok dot net
-Status:           Feedback
+Status:           Open
 Bug Type:         *Extensibility Functions
 Operating System: Windows2000 SP2
 PHP Version:      5.0.0b4 (beta4)
 New Comment:

sh.php

<?php $shm_key= 111; $str="I was here."; $shm_id= shmop_open($shm_key,
"c", 0644, strlen($str));

 if ($shm_id== false) echo "I was unable to create shmop!<BR>";

 else { $wrb=shmop_write($shm_id,$str, 0); 

        if($wrb!= strlen($str)) echo $wrb." bytes was written of
".strlen($str)."!<BR>";

        echo "shm_id=".$shm_id."<BR>";  shmop_close($shm_id);} ?>



hh.php

<?php $shm_key= 111; [EMAIL PROTECTED]($shm_key, "a", 0, 0);

 if ($shm_id== false) echo "Couln'd open shm <".$shm_key.">!<BR>";

 else {$A=shmop_read($shm_id, 0, shmop_size($shm_id)); echo $A."<BR>";

       echo "shm_id=".$shm_id; shmop_close($shm_id); } ?>



hs.php

<?php $shm_key= 111; [EMAIL PROTECTED]($shm_key, "a", 0, 0);

 if ($shm_id== false) echo "Couln'd open shm <".$shm_key.">!<BR>";

 else {$A=shmop_read($shm_id, 0, shmop_size($shm_id)); echo $A."<BR>";

        echo "shm_id=".$shm_id;  shmop_delete($shm_id); 
shmop_close($shm_id); } ?>


Previous Comments:
------------------------------------------------------------------------

[2004-02-16 11:23:13] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.



------------------------------------------------------------------------

[2004-02-16 03:42:54] yury at gorodok dot net

Description:
------------
shmop doesn't work properly.

I start sh.php, which creates shmop segment and write a strring there.

After that I start hh.php, which should read string and write it in my
browser.

The hs.php deletes segment.



On FreeBSD with PHP 4.3.4(apache module and command line) this works
just fine.

But on Win2000SP2 with PHP5.0.0b4(commandline and cgi) I can access

shared memory segment only while the first script is running (I' ve
adde sleep(30) in it for test reasons).



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27271&edit=1

Reply via email to