#29816 [Opn->Fbk]: use shmop_open 3 times make apache2 error

From: Date: Tue, 24 Aug 2004 14:06:03 +0000
Subject: #29816 [Opn->Fbk]: use shmop_open 3 times make apache2 error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-65174@lists.php.net to get a copy of this message
ID: 29816 Updated by: tony2001@php.net Reported By: cedric_cefc2002 at yahoo dot com dot tw -Status: Open +Status: Feedback Bug Type: Apache2 related Operating System: win2000 PHP Version: 5.0.1 New Comment: 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. And please, don't forget to provide the text of your "error". Previous Comments: ------------------------------------------------------------------------ [2004-08-24 16:01:07] cedric_cefc2002 at yahoo dot com dot tw Description: ------------ <?php /*$shm_id = shmop_open(0xff3,"c",0,0); if ($shm_id) { $shm_size = shmop_size($shm_id); $my_string = shmop_read($shm_id, 0, $shm_size); $cache=serialize($my_string); shmop_close($shm_id); }*/ make error //print_r($cache); $name="shm1.php"; $time1=filectime($name); if(isset($cache[$name])){ if($cache[$name]['time']==$time1){ $shm_id = shmop_open($cache[$name]['key'],"c",0,0); $shm_size = shmop_size($shm_id); $my_string = shmop_read($shm_id, 0, $shm_size); echo $my_string; shmop_close($shm_id); clearstatcache ( void ); exit; } } $d=file_get_contents($name); $i=strlen($d); $c=count($cache); echo $d; $shm_id = shmop_open((int)$c,"c",0644,$i); $shm_bytes_written = shmop_write($shm_id, $d,0); shmop_close($shm_id); //echo "<pre>".$d."</pre>"; $a['time']=filectime($name); $a['key']=$c; $cache[$name]=$a; print_r($cache); //echo $cache[$name]['time']; //echo filectime($name); //$cache $d=serialize($cache); // echo "<pre>".$d."</pre>"; $i=strlen($d); $shm_id = shmop_open(0xff3,"c",0644,$i); $shm_bytes_written = shmop_write($shm_id, $d,0); shmop_close($shm_id); clearstatcache(); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29816&edit=1

« previous php.bugs (#65174) next »