Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 06-27-2011, 12:10 PM   #1
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 will open with the editor by default and if i drag and drop it to firefox it won't show as a web 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
LQ 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
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
LQ Guru
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,622

Rep: Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459
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.


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 > Forums > Non-*NIX Forums > Programming

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

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