ftok() not returning a valid SysV shared memory index?

From: Date: Mon, 08 Sep 2003 02:11:35 +0000
Subject: ftok() not returning a valid SysV shared memory index?
Groups: php.general 
Request: Send a blank email to php-general+get-161945@lists.php.net to get a copy of this message
I'm running 4.3.3, and have made sure to compile it with --enable-sysvshm. The code works on PHP5, so I think it might be a problem with PHP4. #! /usr/bin/php -q <?php
$key    = ftok("/etc/passwd", 'c');
$shmid = shm_attach($key); $shm_var = "Shared Memory Data"; shm_put_var($key, 25, $shm_var); $shm_data = shm_get_var($key, 25); echo "$key, $shmid, $shm_var, $shm_data\n"; shm_detach($shmid); ?> When I try and run it, I get these errors: Warning: 1661167266 is not a SysV shared memory index in /home/jason/dev/php/ipc/shm1.php on line 9 Warning: 1661167266 is not a SysV shared memory index in /home/jason/dev/php/ipc/shm1.php on line 10 Am I doing something wrong, or is this a problem with PHP? Jason

« previous php.general (#161945) next »