PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sat Oct 19, 2019 11:44 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Oct 30, 2009 1:26 am 
Offline
Forum Newbie

Joined: Fri Oct 30, 2009 1:13 am
Posts: 1
Hi. I have strange problem. I install Ubuntu as my desktop os. Also i install php with CLI support (from apt):

> php -v
PHP 5.2.6-2ubuntu4.3 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 21 2009 20:36:27)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans

I try to run next simple command:

> /usr/bin/php -r 'echo "works";' > test.txt &

Command has to run in background and create file test.txt and write into it string "works", but command only create empty file and when I check status of process:

> > ps ax | grep php
4581 pts/0 T 0:00 /usr/bin/php -r echo "works";
4600 pts/1 S+ 0:00 grep php

I get flag "T" for it. As i understood it means terminated, but I don't understud why.
If run this command with out "&", like this:

> /usr/bin/php -r 'echo "works";' > test.txt

then all works greate. I known that PHP CLI scripts can be run in background, I ran them many times in ALT Linux. May be my php in Ubuntu has some different settings, but I don't known which.

If somebody known the reason please advise.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group