PHP rename() on FDC4

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
dchildress
Forum Newbie
Posts: 2
Joined: Tue Apr 11, 2006 7:06 pm

PHP rename() on FDC4

Post 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
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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, ...)
dchildress
Forum Newbie
Posts: 2
Joined: Tue Apr 11, 2006 7:06 pm

Tried that already

Post 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
Post Reply