LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-28-2007, 06:55 PM   #1
ille.pugil42
Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 151

Rep: Reputation: 30
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.
 
Old 06-29-2007, 01:26 PM   #2
ille.pugil42
Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 151

Original Poster
Rep: Reputation: 30
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?
 
Old 07-03-2007, 02:16 PM   #3
ille.pugil42
Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 151

Original Poster
Rep: Reputation: 30
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?
 
Old 07-03-2007, 04:55 PM   #4
ille.pugil42
Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 151

Original Poster
Rep: Reputation: 30
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?
 
Old 07-03-2007, 04:59 PM   #5
spamgrind
LQ Newbie
 
Registered: Jul 2007
Posts: 10

Rep: Reputation: 0
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.
 
Old 07-03-2007, 05:01 PM   #6
spamgrind
LQ Newbie
 
Registered: Jul 2007
Posts: 10

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


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
PHP Script to parse Word/RTF Documents saravanan1979 Programming 10 02-18-2010 07:25 AM
Lost root pass word luckyvietman Linux - Newbie 11 06-01-2005 09:13 AM
php: session variables lost while redirecting appas Programming 2 10-13-2004 09:18 AM
Lost with MySql, PHP and Apache here Mega Man X Linux - Software 12 01-28-2004 08:02 AM
Lost association for folders on desktop jax79sg Linux - General 0 01-01-2004 07:33 AM


All times are GMT -5. The time now is 04:54 AM.

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