LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   You have chosen to open which is a: application/x-httpd-php (https://www.linuxquestions.org/questions/linux-server-73/you-have-chosen-to-open-which-is-a-application-x-httpd-php-524356/)

cucolin@ 01-31-2007 09:14 AM

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

jantman 02-01-2007 01:10 AM

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.

cucolin@ 02-01-2007 10:01 AM

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...

jantman 02-01-2007 02:20 PM

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

cucolin@ 02-02-2007 10:38 AM

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


All times are GMT -5. The time now is 11:45 AM.