LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 06-27-2011, 12:10 PM   #1
waerfwe
LQ Newbie
 
Registered: Dec 2010
Posts: 4

Rep: Reputation: 0
Unhappy Open edit Php file problem (PhP apache installed)


Hello Guys,
My problem is that everytime i create a php file with gedit or with open office,when i try to open it ..it will open with the editor by default and if i drag and drop it to firefox it won't show as a web page..it will prompt me to download my own file..what should i do ??
(The apache is running while i m doing all this.)
 
Old 06-27-2011, 12:47 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi, waerfwe -

1. Edit the PHP source file (EX: /var/www/myfile.php) with gedit
2. Make your changes and SAVE with gedit
3. VIEW with your web browser (EX: firefox, http://localhost/myfile.php)

Reason for step 3) being separate from steps 1) and 2):

The apache server needs to INTERPRET your PHP file (in order for you to see what you expect to see). Using a browser is the most practical way to request the server to process the file. Dragging and dropping the file to Firefox, on the other hand, completely bypasses the server.

Make sense ?

Last edited by paulsm4; 06-27-2011 at 12:50 PM.
 
Old 06-30-2011, 05:07 AM   #3
waerfwe
LQ Newbie
 
Registered: Dec 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Man thanks so much! my only problem now is to give permission to my www folder so i cn copy the file there... can you help me ?
 
Old 06-30-2011, 09:29 AM   #4
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,884

Rep: Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773Reputation: 773
On most distributions the www directory is owner:group = apache:apache and has 755 permissions. Any user you want to have access should be in the apache group. Some distributions use a different user:group name wwwrun?? You'll need to check on whichever distribution you are using.
 
  


Reply

Tags
apache, 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
[PHP] connection to remote server to edit file jonaskellens Programming 12 03-19-2010 10:52 AM
Is it possible to allow just one PHP script to edit a file? fuzzyworm Programming 4 08-25-2008 06:47 AM
installed php and apache yet my php pages dont load ?? jessica_lilly Linux - Software 1 11-13-2007 01:57 AM
i installed fc4 wnad my apache should have been configured to handle php file but it' amolgupta Linux - Software 2 04-02-2006 11:22 AM
Apache php index.php problem neurotic Linux - Software 3 11-18-2003 06:02 PM


All times are GMT -5. The time now is 09:40 PM.

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