0

Im on Mac OS 10.11.4 El Capitan. I installed XAMPP for the Apache and MYSQL database for a username and password, login and register page for a forum im trying to create. Ive tried adding the AddType thing but it doesnt allow me to change the contents of the file.

Ive searched on so many different scenarios about roughly the same problem, but couldnt find anyone with the exact same problem with a solution.

MySQL database and apache web server work fine, and so do my HTML files in the folder ive created for my Forum, but my PHP files open as plain text. I also read somewhere that they need to open in a link such as: https://localhost/foldername/filename.php But this doesn't work and it says file not found, the files only open when i select the file from my drive and then click open with Google Chrome.

So, the overall problem is my PHP scripts are opening as plain text in the browser, im using the latest version of Google Chrome, OS 10.11.4, and XAMPP 7.0.8-0 and my PHP version returned this from the Terminal Application:

PHP 5.5.31 (cli) (built: Feb 20 2016 20:33:10) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies.

Also I'm using the latest version of Brackets for Mac OS to code for my forum

Sorry for the long question, my problem is specific and couldnt find any solutions anywhere. Thank you if you have any solutions!

Vasfed
  • 18,013
  • 10
  • 47
  • 53
  • 1
    Please check this post :- http://stackoverflow.com/questions/3555681/why-are-my-php-files-showing-as-plain-text may be it's helps you. – EnthuOns Jul 02 '16 at 11:02
  • "But this doesn't work and it says file not found" — Then you got the URL wrong and you need to work out what the right URL is (or change the server config or move the files). – Quentin Jul 02 '16 at 11:35
  • The link I type in has the correct folder and filename, but still doesn't work, and can you please specify on how to "change the server config or move the files" – Daniel Shaikh Jul 02 '16 at 18:32

0 Answers0