[asterisk-users] What is equivalent function to mv command in php for Asterisk Spool directory usage?

2010-12-21 Thread Bruce B
Hi Everyone,

I understand that there are a few warnings about using cp to move .call
files to /var/spool/asterisk/outgoing as they might acted upon before copy
is done. So, using PHP, What is the equivalent of mv command? Would it be
rename() in php or is there a better method?

Thanks,
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] What is equivalent function to mv command in php for Asterisk Spool directory usage?

2010-12-21 Thread Danny Nicholas
PERL has a move() command; I wouldn't expect less out of PHP.

 

  _  

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bruce B
Sent: Tuesday, December 21, 2010 2:20 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] What is equivalent function to mv command in php
for Asterisk Spool directory usage?

 

Hi Everyone,

 

I understand that there are a few warnings about using cp to move .call
files to /var/spool/asterisk/outgoing as they might acted upon before copy
is done. So, using PHP, What is the equivalent of mv command? Would it be
rename() in php or is there a better method?

 

Thanks,

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] What is equivalent function to mv command in php for Asterisk Spool directory usage?

2010-12-21 Thread MrHanMan
I think rename() is what you're looking for

http://php.net/manual/en/function.rename.php

On Tue, Dec 21, 2010 at 2:23 PM, Danny Nicholas da...@debsinc.com wrote:
 PERL has a move() command; I wouldn’t expect less out of PHP.



 

 From: asterisk-users-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bruce B
 Sent: Tuesday, December 21, 2010 2:20 PM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: [asterisk-users] What is equivalent function to mv command in php
 for Asterisk Spool directory usage?



 Hi Everyone,



 I understand that there are a few warnings about using cp to move .call
 files to /var/spool/asterisk/outgoing as they might acted upon before copy
 is done. So, using PHP, What is the equivalent of mv command? Would it be
 rename() in php or is there a better method?



 Thanks,

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] What is equivalent function to mv command in php for Asterisk Spool directory usage?

2010-12-21 Thread Zeeshan Zakaria
I have been using:
exec ('mv *.call /var/spool/asterisk/outgoing')

and for a long time it has been working just fine for me on more than one
websites. Just make sure the folder where you create the call files has
correct permissions and ownerships so that the file is successfully moved by
the apache user to its destination.

Zeeshan A Zakaria

--
www.ilovetovoip.com
www.pbxforall.com

On 2010-12-21 3:29 PM, Danny Nicholas da...@debsinc.com wrote:

 PERL has a move() command; I wouldn’t expect less out of PHP.


 --

*From:* asterisk-users-boun...@lists.digium.com [mailto:
asterisk-users-boun...@lists.digium.com] *On Behalf Of *Bruce B
*Sent:* Tuesday, December 21, 2010 2:20 PM
*To:* Asterisk Users Mailing List - Non-Commercial Discussion
*Subject:* [asterisk-users] What is equivalent function to mv command in
php for Asterisk Spool directory usage?





Hi Everyone,



I understand that there are a few warnings about using cp to move .call
file...

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] What is equivalent function to mv command in php for Asterisk Spool directory usage?

2010-12-21 Thread Steve Edwards

On Tue, 21 Dec 2010, Bruce B wrote:

So, using PHP, What is the equivalent of mv command? Would it be 
rename() in php or is there a better method?


Not really an Asterisk question...

On Tue, 21 Dec 2010, MrHanMan wrote:


I think rename() is what you're looking for


+1

On Tue, 21 Dec 2010, Zeeshan Zakaria wrote:


exec ('mv *.call /var/spool/asterisk/outgoing')


This will create a new process -- a relatively expensive activity.

Also, this assumes the path to mv is in the PATH environment variable 
which it usually is, but if not can lead to a lot of confusion.


--
Thanks in advance,
-
Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
Newline  Fax: +1-760-731-3000--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users