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

2006-12-08 Thread mike xu
Its so strange, when I runing /etc/rc.d/rc3.d/S85httpd restart, the php script couldn't fopen pipe file. But if I copy /etc/rc.d/rc3.d/S85httpd to some other place (for example /root), and execute `/root/S85httpd restart`, the php script could fopen file successfully! Its so confusing ... On 12/

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

2006-12-08 Thread mike xu
Hi Ryan, I just did another test, if I start the httpd by root user manually (the httpd daemon program still owns apache user by the result of `ps -aux`), the php script works fine. So, it seems the httpd start script (/etc/rc.d/init.d/httpd) did something specially which cause the permission pro

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

2006-12-08 Thread Ryan Creaser
mike xu wrote: Thanks a lot forr your reply. Here is the error msg: *Warning*: fopen(/dev/pmsg) [function.fopen]: failed to open stream: Permission denied in * /var/www/html/Source/test/register_user.php* on line *31 It still doesn't work even if I m

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

2006-12-07 Thread mike xu
Thanks a lot forr your reply. Here is the error msg: *Warning*: fopen(/dev/pmsg) [function.fopen]: failed to open stream: Permission denied in * /var/www/html/Source/test/register_user.php* on line *31 It still doesn't work even if I move pmsg to /tmp

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

2006-12-07 Thread Ryan Creaser
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 = "ttt"; fwrite($fp, $msg_cmd, strlen($msg_cmd)); fclose(

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

2006-12-07 Thread Chris
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'); It's wb+ not w+b -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscr

[PHP] fopen failed to open pipe file in Linux+Apache environment

2006-12-07 Thread mike xu
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 = "ttt"; fwrite($fp, $msg_cmd, strlen($msg_cmd)); fclose($fp); } There i