LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   PHP lost its association! (for lack of a better word) (https://www.linuxquestions.org/questions/linux-software-2/php-lost-its-association-for-lack-of-a-better-word-565220/)

ille.pugil42 06-28-2007 06:55 PM

PHP lost its association! (for lack of a better word)
 
I've had my linux box (FC5) running for quite some time with no problems. I decided to install mediawiki to play with wiki software, and part of installing it is via the config/index.php file. I was installing remotely via ssh, and was unable to pull up a browser on the remote machine to configure (permissions and such). I went to the local machine and attempted to pull up that page when I ran into a strange thing: firefox would not open up the page. It was asking if I wanted to save the file. I removed and reinstalled firefox, but got the same results. I tried with mozilla; same thing. I tried with links, same thing.

So, here's my questions:

1.) How/where do I set associations (i.e. php files can be opened by a web browser)

2.) How did these settings get lost???

Any help would be greatly appreciated.

ille.pugil42 06-29-2007 01:26 PM

I am shocked and amazed! Normally I'd have 2-3 decent suggestions overnight, people must be stumped. I did a thorough search of the forums, and found 1 other poor soul that had the same concern as me, about 1 month ago and no one had any advice then either...


Here's what I've tried in the meantime:

1.) Reboot repeatedly
2.) Remove/Reinstall tcp_wrapper


Help! Somebody please! It isn't pertinent enough for me to completely reinstall the OS (this system has other uses that are much more important that don't relate to the internet) but it would be nice to get that functionality back. Anyone have any ideas?

ille.pugil42 07-03-2007 02:16 PM

After a few days of silent contemplation, I chose to reinstall the OS. I grabbed a freshly minted copy of Fedora 7 and proceeded to do the install/update process. Once everything was installed, I pulled up a php page to test out if the original problem was gone - to my shock and amazement it wasn't. Any other computer to can view the pages that my system serves up (php and all) and it works great. If I try to view any PHP page (that is served by that system) it comes up with the error. Any PHP page that isn't on that system works just fine.

The error I'm getting is as follows:

From firefox...
Code:

You have chosen to open
ghosts.php
which is a: PHP script
from: /var/www/html

What should firefox do with this file?
Open with
Save to disk

I get the same from whatever browser I use (even Lynx). What am I missing? Anyone have any ideas?

ille.pugil42 07-03-2007 04:55 PM

update
 
So, instead of using '/var/www/html/whatever.page.php' as the url, I tried using 'http://localhost/whatever.page.php' and it works. So, am I just being stupid or is it impossible to use the actual file path instead of the url?

spamgrind 07-03-2007 04:59 PM

Make sure you have the following directives on your Apache configuration:

LoadModule php4_module /path/to/php/module

and

AddHandler php4_module .php

Restart web server.

spamgrind 07-03-2007 05:01 PM

Sorry, didn't see your last post. You must render your PHP files through the web server if you are viewing them through a web browser. That means using http://localhost ...


All times are GMT -5. The time now is 08:20 PM.