LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-15-2011, 02:40 AM   #1
vinaypreet
LQ Newbie
 
Registered: Aug 2010
Posts: 7

Rep: Reputation: 0
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....
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 11-15-2011, 02:50 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,386

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
this is not "URGENT" for us in any way. please do not demand priority attention from a voluntary community.
 
3 members found this post helpful.
Old 11-15-2011, 03:34 AM   #3
rahulkya
Member
 
Registered: Feb 2009
Location: New Delhi
Distribution: Linux mint,Ubuntu,Debian,RHEL 5,slackware 13.1, free BSD,solaris.
Posts: 186
Blog Entries: 3

Rep: Reputation: 33
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....
 
Old 11-16-2011, 01:38 AM   #4
vinaypreet
LQ Newbie
 
Registered: Aug 2010
Posts: 7

Original Poster
Rep: Reputation: 0
Question PHP help

so how can i edit my squid.conf file through PHP interface.....
it's present at /etc/squid/squid.conf
 
Old 11-16-2011, 01:43 AM   #5
corp769
Guru
 
Registered: Apr 2005
Posts: 5,807

Rep: Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996
Wait, what exactly are you trying to accomplish?
 
Old 11-16-2011, 02:41 AM   #6
John VV
Guru
 
Registered: Aug 2005
Posts: 12,840

Rep: Reputation: 1710Reputation: 1710Reputation: 1710Reputation: 1710Reputation: 1710Reputation: 1710Reputation: 1710Reputation: 1710Reputation: 1710Reputation: 1710Reputation: 1710
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
 
Old 11-16-2011, 03:38 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,386

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
Quote:
Originally Posted by John VV View Post
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.
 
Old 11-16-2011, 03:43 AM   #8
corp769
Guru
 
Registered: Apr 2005
Posts: 5,807

Rep: Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996Reputation: 996
Quote:
Originally Posted by acid_kewpie View Post
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

Last edited by corp769; 11-16-2011 at 03:45 AM.
 
  


Reply

Tags
php


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
URGENT:- PHP file handling help vinaypreet Programming 1 11-15-2011 02:50 AM
php file handling fmcgenesis Linux - Newbie 1 02-09-2007 07:20 PM
LXer: Yrch! "path" Parameter Handling Remote PHP File Inclusion ... LXer Syndicated Linux News 0 12-29-2006 11:33 PM
php: handling the objectGUID eantoranz Programming 0 05-03-2006 12:29 PM
PHP error handling paddyjoy Programming 6 02-12-2006 06:29 AM


All times are GMT -5. The time now is 05:56 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration