0

I am working on setting up and developing a small project using JavaScript and PHP. I installed Apache2.4 and PHP7, worked through some issues and have it running where I can view the phpinfo() file.

Right now when I run my account creation form, it either shows me the source code when run in Chrome, but wants to open the .php file when I run in edge browser.

Has anyone experienced this issue? I have seen it reported for Ubuntu/Linux builds but I haven't been able to find anything for Windows.

How can I get the Apache to parse the php files?

Seth Kerr
  • 27
  • 8
  • Is it just this one file which is returning the source? – Jack Wilsdon Sep 23 '17 at 20:48
  • It works in Edge but not Chrome? I don't see how that'd be possible. Can you show what you are doing? – chris85 Sep 23 '17 at 20:48
  • To be clear, the php file is not running on either Edge or Chrome. In Edge I get asked if I want to open the file which is "account_creation_success.php" – Seth Kerr Sep 23 '17 at 20:55
  • It does doesn't parse any php file. (edit: Aside from the test.php file that I access via the local host) – Seth Kerr Sep 23 '17 at 20:56
  • 2
    You sure you are accessing the file through your webserver and not the filesystem directly? how do the URI's look like? – Michael M. Sep 23 '17 at 21:03
  • Okay, so I moved the files into the /htdocs and it was able to attempt to parse the file, but I was given a parse syntax error. So I at least solved the first question, thank you Michael. – Seth Kerr Sep 23 '17 at 21:19

1 Answers1

0

The desired php file needed to be in the '...\Apache24\htdocs' directory in order to be parsed by the Apache web server.

That way the file was able to be accessed by the Apache web server and not as listed above from the standard file directory.

You sure you are accessing the file through your webserver and not the >filesystem directly? posted by Michael M.

Thanks to Michael M. for helping to solve this question.

Seth Kerr
  • 27
  • 8