Page 1 of 1

PHP rename() on FDC4

Posted: Tue Apr 11, 2006 7:19 pm
by dchildress
Hello,
I have a new install using FDC4. I am trying to get a php script to move a file that it creates fromt the /tmp directory to another folder on the server.

My code looks something like this:

Code: Select all

<?php

$fromfile = "/tmp/filename.call";
$tofile = "/var/spool/asterisk/outgoing/filename.call";
rename($fromfile,$tofile);
?>
This code works on my windows server and it works on a Debian Linux server but I can not get it to work on my FDC4 server . I have checked the permissions on the folder and even did the evil chmod 777 on the folder I want to copy it to. I also gave the user apache full rights to the folder. I have check safemode and it is off. Any thought you could provide would be much appreciated.

Thanks,
David

Posted: Tue Apr 11, 2006 7:33 pm
by timvw
you would have to give apache x rights to all parent folders of /var/spool/asterisk/outgoing/filename.call too... (/var, /var/spool, ...)

Tried that already

Posted: Wed Apr 12, 2006 10:36 am
by dchildress
Actually I already tried giving apcahe access to all folders :( . I even created a /tmp2 folder and chmod 777 it as well. I still could not write to that folder or move a file into that folder using php. The only folder I can write to is /tmp. Could this be an apache problem? Thansk,
David