After installation, all seems OK.
Komodo editor tells me my php installation is OK.
When I try to run a simple php file, I get the "file download" dialog which asks LOAD, SAVE, CANCEL.
Any suggestion?
problem after xampp installation
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: problem after xampp installation
Does is server HTML files, but not PHP files? If so check that the PHP is associated with .php files in the Apache conf.
(#10850)
Re: problem after xampp installation
Yes, I have the assocoation as follows -
in httpd.conf I have the lines:
AddType application/x-httpd-php .php .phtml .html
AddType application/x-httpd-php-source .phps
An interesting fact is that when I put the http://localhost URL in my browser, I get the
"Welcome to XAMPP for Windows Version 1.7.1 !" page.
When I click phpinfo() field, I get the php info table.
The problem occurs only while I run ( or call from browser) a test (or any other) php file.
in httpd.conf I have the lines:
AddType application/x-httpd-php .php .phtml .html
AddType application/x-httpd-php-source .phps
An interesting fact is that when I put the http://localhost URL in my browser, I get the
"Welcome to XAMPP for Windows Version 1.7.1 !" page.
When I click phpinfo() field, I get the php info table.
The problem occurs only while I run ( or call from browser) a test (or any other) php file.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: problem after xampp installation
Are your scripts using short tags? You should use the <?php ?> tags.
Also, you should not server .html files as PHP scripts (as specified in the AddType line).
Also, you should not server .html files as PHP scripts (as specified in the AddType line).
(#10850)
Re: problem after xampp installation
Thanks Arborint
Yes I use full tags.
I removed the .html but it did not help.
Yes I use full tags.
I removed the .html but it did not help.
Re: problem after xampp installation
Thanks all kind souls.
The problem was solved when I understood that:
1. The file has to reside in the htdocs folder.
2. The way to invoke a php file is via a URL in the browser, like this:
http://localhost/MyFileName.php
whereas I was invoking it by clicking its name.
THE PROBLEM IS SOLVED.
The problem was solved when I understood that:
1. The file has to reside in the htdocs folder.
2. The way to invoke a php file is via a URL in the browser, like this:
http://localhost/MyFileName.php
whereas I was invoking it by clicking its name.
THE PROBLEM IS SOLVED.