LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   URGENT:- PHP file handling help (http://www.linuxquestions.org/questions/linux-software-2/urgent-php-file-handling-help-913605/)

vinaypreet 11-15-2011 02:40 AM

URGENT:- PHP file handling help
 
i have to design a PHP interface on my fedora 13 using LAMP
i need to edit my SQUID.CONF file using PHP for my bandwidth manager project.

i'm unable to open or handle any file outside the HTML folder

<?php
$File = "/root/Desktop/YourFile.txt";
$Handle = fopen($File, 'w');
$Data = "Jane Doe\n";
fwrite($Handle, $Data);
$Data = "Bilbo Jones\n";
fwrite($Handle, $Data);
print "Data Written";
fclose($Handle);
?>



This simple code runs in HTML location but not on desktop....:(

acid_kewpie 11-15-2011 02:50 AM

this is not "URGENT" for us in any way. please do not demand priority attention from a voluntary community.

rahulkya 11-15-2011 03:34 AM

The thing{fact} is a web server runs only on a single folder and outside that folder it will not allow to do so..
Like simple apache use /var/www/ as it default folder ..
So you can access any folder inside /var/www/ but not outside this folder.
As default LAMP uses html as a default folder. So you can go through any folder inside that HTML folder

Only HTML can be rendered through browser outside any server's directory....

vinaypreet 11-16-2011 01:38 AM

PHP help
 
so how can i edit my squid.conf file through PHP interface.....
it's present at /etc/squid/squid.conf

corp769 11-16-2011 01:43 AM

Wait, what exactly are you trying to accomplish?

John VV 11-16-2011 02:41 AM

Fedora 13 has also been End Of Life for the last 6 months
there have been NO updates for that time and never will

please install a CURRENT and SUPPORTED version fedora 16 or fedora 15

then install Apache and Squid

acid_kewpie 11-16-2011 03:38 AM

Quote:

Originally Posted by John VV (Post 4525306)
Fedora 13 has also been End Of Life for the last 6 months
there have been NO updates for that time and never will

please install a CURRENT and SUPPORTED version fedora 16 or fedora 15

then install Apache and Squid

Better still, install a server grade operating system, e.g. CentOS. Fedora is NOT a suitable platform for this, for the very reason described above.

corp769 11-16-2011 03:43 AM

Quote:

Originally Posted by acid_kewpie (Post 4525345)
Better still, install a server grade operating system, e.g. CentOS. Fedora is NOT a suitable platform for this, for the very reason described above.

+1 to that. I use Slackware on my server, and never ran into any problems like this ;)


All times are GMT -5. The time now is 12:44 PM.