Page 1 of 1

how to config to let my XAMPP to recognize php code?

PostPosted: 09. March 2014 03:14
by tuoqiong
while my Xampp had been successfully installed on my win7 system. all the components could been started service.
i started adjust my index.html in localhost. it submit form to reg.php.
the problem is when the main page linked to reg.php. the php page showed txt code on the page instead of html page.
(some one said should config the httpd.conf document. but don't know how?)
could anyone help on this? :?:

1. Apache 2.4.4;
2. MySQL 5.6.11;
3. PHP 5.5.1;
4. phpMyAdmin 4.0.4;
5. FileZilla FTP Server 0.9.41;
6. Tomcat 7.0.41 (with mod_proxy_ajp as connector);
7. Strawberry Perl 5.16.3.1 Portable;
8. XAMPP Control Panel 3.2.1 (from hackattack142);
9. XAMPP 1.8.3;

Re: how to config to let my XAMPP to recognize php code?

PostPosted: 09. March 2014 04:33
by JJ_Tagy
Sounds like reg.php might actually be reg.php.html or reg.php.txt. You may want to check extensions.

Re: how to config to let my XAMPP to recognize php code?

PostPosted: 09. March 2014 06:27
by tuoqiong
JJ_Tagy wrote:Sounds like reg.php might actually be reg.php.html or reg.php.txt. You may want to check extensions.



it's not extension issue surely about that.
should be config issue. due to i haven't config after install.

Re: how to config to let my XAMPP to recognize php code?

PostPosted: 09. March 2014 09:55
by JJ_Tagy
By default, XAMPP comes prepared to parse PHP. No need to change httpd.conf or php.ini settings. To verify, simply create a test file (let's call it htdocs/test.php) and use some simple code:
Code: Select all
<?php
echo "This is a test for php.";
?>

In your browser, open http://localhost/test.php

Re: how to config to let my XAMPP to recognize php code?

PostPosted: 09. March 2014 12:51
by Altrea
=> [FGA] Apache won't parse php code (Section "protocol or request issue")