PHP5 not working with my XAMPP installation

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

PHP5 not working with my XAMPP installation

Postby markyoung1984 » 22. February 2010 17:31

I have installed XAMPP version 1.7.3 on a Windows machine but cannot seem to get my PHP5 extensions working. If I go to a page http://localhost/contact.php everything displays fine but if I change the filename to contact.php5 and then try to browse to http://localhost/contact.php5 all I see is my code. My host requires me to specify the .php5 file extension

How can I overcome this?
markyoung1984
 
Posts: 5
Joined: 08. June 2009 14:42

Re: PHP5 not working with my XAMPP installation

Postby Wiedmann » 22. February 2010 18:09

but cannot seem to get my PHP5 extensions working.

\xampp\apache\conf\extra\httpd-xampp.conf
change (2 times):
Code: Select all
<FilesMatch "\.php$">

Code: Select all
<FilesMatch "\.(php|php5)$">


and:
Code: Select all
AddType text/html .php .phps

Code: Select all
AddType text/html .php .phps .php5


Restart Apache.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: PHP5 not working with my XAMPP installation

Postby markyoung1984 » 23. February 2010 11:18

I tried what you said (all the variations) but I still get the same result. I am using virtual hosts as well. Could this have something to do with it?

I'm thinking the best thing to do at the moment is remove XAMPP completely, delete all related files and then reinstall XAMPP, see if it works and then implement the virtual hosts. Just installing XAMPP (without my additional virtual hosts) has worked in the past so this might be the best course of action. Unless you can suggest anything else.
markyoung1984
 
Posts: 5
Joined: 08. June 2009 14:42

Re: PHP5 not working with my XAMPP installation

Postby markyoung1984 » 23. February 2010 11:45

Have just double checked my system (default XAMPP install) and I cannot run PHP5 on my system either. I was mistaken before. I looked into the apache\conf\extra in the httd-xampp.conf I see the following lines but it still does not work:

AddType text/html .php .phps .php5 .php4 .php3 .phtml .phpt
<FilesMatch "\.php$|\.php5$|\.php4$|\.php3$|\.phtml$|\.phpt$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
markyoung1984
 
Posts: 5
Joined: 08. June 2009 14:42

Re: PHP5 not working with my XAMPP installation

Postby Wiedmann » 23. February 2010 12:35

I tried what you said (all the variations)

What does you mean with "all the variation"?

Code: Select all
<FilesMatch "\.php$|\.php5$|\.php4$|\.php3$|\.phtml$|\.phpt$">

That's not what I have posted above...
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: PHP5 not working with my XAMPP installation

Postby markyoung1984 » 23. February 2010 16:33

In your original post above you mention a number of commands. I tried all the variations of them.

I have tried a clean install and added the code below. After restarting Apache I can still see my PHP code when loading a PHP5 webpage.

Code: Select all
<FilesMatch "\.php$|\.php5$|\.php4$|\.php3$|\.phtml$|\.phpt$"></FilesMatch>


The server would not start without me adding the </FilesMatch> at the end.
markyoung1984
 
Posts: 5
Joined: 08. June 2009 14:42

Re: PHP5 not working with my XAMPP installation

Postby Nobbie » 23. February 2010 17:05

markyoung1984 wrote:In your original post above you mention a number of commands. I tried all the variations of them.


No, you didn't. You're still blind, open your eyes and have a closer look the (original) command of "Wiedmann":

Code: Select all
<FilesMatch "\.(php|php5)$">


Now have a look to your (faulty) command:

Code: Select all
<FilesMatch "\.php$|\.php5$|\.php4$|\.php3$|\.phtml$|\.phpt$">


Don't you see the big(!) differences between your syntax and Wiemanns syntax?

What do you think about this one:

Code: Select all
<FilesMatch "\.(php|php5|php4|php3|phtml|phpt)$">
Nobbie
 
Posts: 13182
Joined: 09. March 2008 13:04

Re: PHP5 not working with my XAMPP installation

Postby Willy92 » 24. February 2010 06:00

Is it really necessary to belittle people who ask for help -
You're still blind, open your eyes


It seems to be the standard from some peope here - If you don't want to help people who are new or lack understanding of the syntax - then don't post. When you put comments like that in you just make yourself look bad, and drive people away.
Willy92
 
Posts: 7
Joined: 01. April 2009 15:48

Re: PHP5 not working with my XAMPP installation

Postby mfarooqi » 06. August 2014 14:06

Wiedmann wrote:
but cannot seem to get my PHP5 extensions working.

\xampp\apache\conf\extra\httpd-xampp.conf
change (2 times):
Code: Select all
<FilesMatch "\.php$">

Code: Select all
<FilesMatch "\.(php|php5)$">


and:
Code: Select all
AddType text/html .php .phps

Code: Select all
AddType text/html .php .phps .php5


Restart Apache.


Thank you bro. .This worked.
I added one word ".php5" in httpd.conf

AddType application/x-httpd-php .php .phtml .php5


I've been fighting for about a month with my 3 computers (1. windows7, windows 8 and Macbook Pro)... 4 web servers WAMP, XAMPP on Windows, XAMPP on MAC, MAMP on MAC and lastly Mac's OWN apache.


aaah.. And finally a 4 digit word " .php5" solved the problem..

Really thank you sooo much..
:D :D :D :D :D
mfarooqi
 
Posts: 1
Joined: 06. August 2014 14:01
Operating System: Maverics OSX


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 68 guests