Can't open PHP file, error message.

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Can't open PHP file, error message.

Postby billbeee » 23. November 2008 05:20

Hi All,
I have installed xampp on my FC8 system.
I can access the control panel http://localhost/xampp/index.php OK.
Everything seems to be working fine. The demo scrips work fine.

I have a couple of test scripts in my /opt/lampp/lampp/htdocs/test-docs/
folder where I have permissions.

When I open one of my .html files in a browser, no problems, but when I try to open one of my .php files I get and error message from Firefox.

"You have chosen to open
info.php
which is a: php script
What should Firefox do with this file?..............etc.

I have searched long and hard for the answer, and I am sure to be missing something obvious, but can anyone help?

Cheers
Bill
billbeee
 
Posts: 3
Joined: 23. November 2008 04:42

Re: Can't open PHP file, error message.

Postby glitzi85 » 23. November 2008 17:11

billbeee wrote:I have a couple of test scripts in my /opt/lampp/lampp/htdocs/test-docs/

How did you install XAMPP?

glitzi
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Postby billbeee » 23. November 2008 22:31

Hi Glitzi, Thanks for looking.

I installed it following instructions here,

http://www.apachefriends.org/en/xampp-linux.html

I copied XAMPP Linux 1.6.8a

* Step 2: Installation
After downloading simply type in the following commands:

1. Go to a Linux shell and login as the system administrator root:

su

2. Extract the downloaded archive file to /opt:

tar xvfz xampp-linux-1.6.8a.tar.gz -C /opt

I started it OK, the orange and yellow http://localhost/xampp/index.php
comes up and I can access all the menu items.

When I try to open up say the /opt/lampp/htdocs/xampp/phpinfo.php directly in my browser I get the same error message. This is the same file script that I can read easily through the http://localhost/xampp/index.php index page.

Surely I don't have to set up something like this? How do I see the results of a simple script like <?phpinfo();?> in a file called "info.php" ?

Cheers
Bill
billbeee
 
Posts: 3
Joined: 23. November 2008 04:42

Postby Wiedmann » 23. November 2008 23:04

When I try to open up say the /opt/lampp/htdocs/xampp/phpinfo.php directly in my browser

You can't open PHP files directly from the filesystem in your browser.

This is the same file script that I can read easily through the http://localhost/xampp/index.php index page.

Because the PHP part in such files is parsed from the webserver and not from your browser, you must use this way.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby billbeee » 24. November 2008 20:34

Thanks Wiedman,
Such a basic concept and I missed it, I am happy now and looking forward to the learning.
Cheers
Bill.
billbeee
 
Posts: 3
Joined: 23. November 2008 04:42


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 17 guests