LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-31-2007, 09:14 AM   #1
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, CentOS, RedHat
Posts: 416

Rep: Reputation: 31
Question You have chosen to open which is a: application/x-httpd-php


I know I posted a similar thread the other day, but there is something diff. about this one. In my LAMP server at home when I try to open localhost to see my index.php I get:

You have chosen to open
which is a: application/x-httpd-php
from: http://localhost
what should firefox do with this file?

I'm able to see the defaul apache folder: localhost/apache2-default and also: localhost/index.html But no index.php. I installed this at work and everything worked perfectly. I read somewhere that I needed to clean the cache (SHIFT + RELOAD) in order to make it work. I will try that at home. The other problem is I have no Internet connection at home in case in need to download any packages or modules.

Thanks
 
Old 02-01-2007, 01:10 AM   #2
jantman
Member
 
Registered: Nov 2005
Location: New Jersey, USA
Distribution: SuSE
Posts: 492

Rep: Reputation: 31
For the PHP problem, Apache isn't configured to parse PHP files, it's trying to just serve them. Please read the docs on httpd.apache.org and www.php.net about ising PHP with Apache. You will need to modify httpd.conf.

Quote:
Originally Posted by cucolin@
The other problem is I have no Internet connection at home in case in need to download any packages or modules.
Um... can you be more specific? Do you mean that you don't have a connection i.e. you don't have an ISP, or that it doesn't work? If the latter, how is it configured? Router? Switch? Ethernet cable? Please post specifics... what doesn't work and what does.
 
Old 02-01-2007, 10:01 AM   #3
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, CentOS, RedHat
Posts: 416

Original Poster
Rep: Reputation: 31
It means I don't have internet connection (no ISP yet). For the first issue I thought that when I installed a LAMP server everything was suppossed to be ready to go including Apache configuration to parse PHP files. At work I installed the a LAMP server using the same CD I installed it at home. At work everything worked just fine and we were able to install mediawiki for our Intranet users. I'm confused! Thanks...
 
Old 02-01-2007, 02:20 PM   #4
jantman
Member
 
Registered: Nov 2005
Location: New Jersey, USA
Distribution: SuSE
Posts: 492

Rep: Reputation: 31
Quote:
Originally Posted by cucolin@
The other problem is I have no Internet connection at home in case in need to download any packages or modules.
So... are you asking for a solution? The things that I can think of are:
1) get an internet connection. They're pretty inexpensive now (depending on where you are).
2) Download the full CD images for the distribution you're using and burn them to CD at work
3) Download a whole bunch of packages that you might need at work, and burn them to CD.

For the PHP problem, look through the docs at the PHP and Apache web sites for Apache/PHP configuration and make sure everything's right. What Apache and PHP versions are you running? At a bare minimum (what I remember offhand), you need to have mod_php turned on, and (this is probably the problem) need to have the following in mime.types:
application/x-httpd-php phtml pht php
application/x-httpd-php-source .phps
 
Old 02-02-2007, 10:38 AM   #5
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, CentOS, RedHat
Posts: 416

Original Poster
Rep: Reputation: 31
jantman the problem was solve by a simple SHIFT + REFRESH page. The cache was clear and now I'm able to view index.php files.

Thanks
 
  


Reply



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
phpMyAdmin: you have chosen to open PHTML joseph_k Linux - Software 2 05-27-2010 03:08 PM
You have chosen to open index.php which is a : PHP Script from: http://localhost cucolin@ Linux - Software 3 01-30-2007 03:58 PM
couldn't open fontconfigs chosen font with Xft!!! STARHARVEST Slackware 5 01-16-2007 04:01 PM
LXer: Open Source Storage’s OSFiler Chosen For NAB-HD Pavilion’s ... LXer Syndicated Linux News 0 04-26-2006 05:21 AM
Couldn't open stream {localhost/imap : 143} in /usr/local/httpd/htdocs/view.php nshoboul Linux - Newbie 12 10-24-2003 02:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:17 AM.

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
Open Source Consulting | Domain Registration