Re: fopen failed to open pipe file in Linux+Apache environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




mike xu wrote:
Hi, I have problem of open named pipe file in linux.

Here is my sample code:

 $fifo_file = "/dev/pmsg";
 @ $fp = fopen($fifo_file, 'w+b');
 if(!$fp) {
   echo "open ".$fifo_file." failed";
 }
 else {
   $msg_cmd = "ttttttt";
   fwrite($fp, $msg_cmd, strlen($msg_cmd));
   fclose($fp);
 }

There is an other program which is waiting for messages from /dev/pmsg
forever. You could also test it by running `cat /dev/pmsg` in shell console.
Every one have permissions of read and write for /dev/pmsg
prw-rw-rw- 1 root root 0 12-08 10:13 /dev/pmsg

Environment info: php-5.1.2-5, httpd-2.2.0-5.1.2, OS: Redhat FC5

Thanks in advance,
Mike

Are you getting any errors? What if you remove the @ from the start of line 2, any errors now?

- rjc

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux