Page 1 of 1

Browser Not Parsing PHP

PostPosted: 23. November 2013 14:42
by markmmiller09
ApacheFriends XAMPP Version 1.8.3
Windows 7 64-bit

I am able to view http://localhost/xampp/index.php so it appears that PHP is installed, however when I try to open a .php file from c:\xampp\htdocs , Chrome opens the file as plain text and does not parse the PHP.

My XAMPP status reads:
MySQL database ACTIVATED
PHP ACTIVATED
HTTPS (SSL) ACTIVATED
Common Gateway Interface (CGI) DEACTIVATED
Server Side Includes (SSI) ACTIVATED

Is the fact that my common gateway interface is deactivated causing some sort of problem?

Why does the XAMPP index.php page work but any php scripts I put in htdocs do not run in my browser?

Re: Browser Not Parsing PHP

PostPosted: 23. November 2013 15:40
by Altrea
markmmiller09 wrote:Is the fact that my common gateway interface is deactivated causing some sort of problem?

No

markmmiller09 wrote:Why does the XAMPP index.php page work but any php scripts I put in htdocs do not run in my browser?

How do you "open" the file in your browser?
What is the sourcecode of that file?

Re: Browser Not Parsing PHP

PostPosted: 13. December 2013 08:03
by rsolly
First, I am an absolute rank beginner.

ApacheFriends XAMPP Version 1.8.2
Windows 7 64-bit

I seem to be having the same problem as Mr. Miller.:
XAMPP seems to be installed and operating on my machine and I have loaded a .php script in the htdocs folder that I want to see. In this case the script is some sort of a calendar program.
I am using localhost/calendar.php and many other variations and all I get is the "Object Not Found" Message. Can you help?

Chuck

Re: Browser Not Parsing PHP

PostPosted: 13. December 2013 09:09
by Altrea
Are you sure the file path is \xampp\htdocs\calendar.php?
Have you maybe activated the "hide known file extensions" option of your Windows explorer?

Re: Browser Not Parsing PHP

PostPosted: 13. December 2013 19:39
by rsolly
Altrea,
Thanks for returning my call for help.
Can you give me an example of what the localhost URL would look like if the calendar.php file was in fact in the htdocs folder?

I have a feeling I am missing a back slash or something...

Chuck

Re: Browser Not Parsing PHP

PostPosted: 13. December 2013 20:27
by Altrea
rsolly wrote:Can you give me an example of what the localhost URL would look like if the calendar.php file was in fact in the htdocs folder?

Sure, it is pretty straight forward:
http://localhost/calendar.php

Maybe the \xampp\apache\logs\access.log can give some inside.

Re: Browser Not Parsing PHP

PostPosted: 14. December 2013 05:11
by rsolly
Altrea,
Thanks. I was putting the entire path into the URL. It works but it is mostly code. Probably because mysql is not activated. I will get back to you!

Chuck