LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-23-2008, 11:34 AM   #1
digital_citizen
LQ Newbie
 
Registered: Mar 2008
Distribution: Slackware 12.1
Posts: 18

Rep: Reputation: 0
Question web browsers try to open PHP files in gedit


Have recently got my Ubuntu edgy system up & online, connected serially to an XP box connected to a modem.

On the XP box, php works fine but using both epiphany and firefox some php sites (asobrain.com, etc.) just ask if I want to open php script in gedit, or save to disk.
Have checked firewall and updated/re-installed php5-cli. Would the connection type have any effect?
 
Old 05-24-2008, 04:10 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Maybe configure your browser to open files of type php with program php5-cli?

If a web server has php pages, they should usually execute in the server, and the client should only get "the results". Though if you insist on grabbing a php file and executing it yourself, you can do so but you then have to tell the program that opens the php file which program it should use to execute it. If your browser doesn't know about php files, it just "sees" it's a plaintext file and the two usual things to do with such files are to view them, or save the file to disk.

Last edited by b0uncer; 05-24-2008 at 04:12 AM.
 
Old 07-06-2008, 01:50 PM   #3
fbianconi
Member
 
Registered: Apr 2008
Location: argentina
Distribution: Arch
Posts: 86

Rep: Reputation: 22
Have you modified gnome 'open with' option for php files? (asuming you use gnome)
Try to set php 'open with' file property to launch either of those (Ephy or FF) if this is some kind of workaround, report it as a bug (I think that in desktop-integration thread). It shouldn't happen.
What I think is happening is this:
php and html files are ascii files both, so the way to differenciate those is by their content. If a mime-type is looked up by extension only, it could be wrong (actually if you look inside a *.php given by a php capable server it's really an html file). So when you try to visit a url ending in .php they think that it is a file to download and try to open (with a system linked app like gedit).
 
  


Reply


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
mmap cache can't open foo.php - Too many open files guarriman Linux - Software 3 12-16-2013 02:03 PM
LXer: Comparison Between Linux Web Browsers - Review of 5 Linux Browsers LXer Syndicated Linux News 0 05-17-2008 02:21 PM
Nautilus and Gedit fail to open text files zarkon Linux - Software 3 04-06-2005 11:00 AM
open hidden files gedit 2.6 buldir Linux - Software 5 06-20-2004 03:46 AM


All times are GMT -5. The time now is 02:43 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration