Php files downloading, not executing (fresh install)

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Php files downloading, not executing (fresh install)

Postby StayClone » 31. March 2016 17:04

Hey there Apache Friends!

Please bear in mind the following: I am not experienced with XAMPP or apache in any way at all (please treat me like Joe Simplton so I can understand).
Software: OS - Mac OS X 10.11.13 XAMPP version - 7.0.4-0 (I have also had the same issue with 5.6.19-0).
The issue itself: when visiting php files on my localhost (i.e. localhost:3306/index.php) the file downloads and does not execute.
When it started: Yesterday morning I was able to run php perfectly okay. Upon visiting my university I couldn't get MySQL server to start. Eventually reinstalling multiple times fixed that. However since getting the server started again this issue with the php files has occurred.
WIHT:
- updating httpd.conf (all of them but I am unsure which I was supposed to/if I had the right ones etc. but I was editing the ones in XAMPP install location /Applications/XAMPP)
- uncommenting LoadModule for php5 in httpd.conf in /etc/apache2
- reinstalling XAMPP multiple times (including different version - see above)

Along with the above I have tried many other "solutions" to no success.
IMO: there is something wrong with XAMPP on my MacBook now, no matter fresh install or not. Something has gone wrong somewhere...
I appreciate any help I do receive is purely generous and therefore I am thankful, however I am under a lot of stress and rushed as I need XAMPP to work so I can use php files as custom APIs for a database I am using in an Android app for a university dissertation. With a deadline looming and not being able to test/continue creating my app I really do need to get this solved ASAP. I do appreciate any help you can offer on this matter.
StayClone
 
Posts: 2
Joined: 31. March 2016 16:38
Operating System: Mac OS X 10.11.13

Re: Php files downloading, not executing (fresh install)

Postby StayClone » 31. March 2016 22:55

After speaking with a friend and using teamviewer we went through a few things.

1 - should be viewing files by path: localhost/dir/file.php i.e. no use of port (or using port 80 but as it's default results in normal activity).

2 - a couple of php files had been edited in textEdit causing ' or " symbols to be wrong type of symbol. Solved by using cmd + z to revert type.
2.1 - double check encoding type of php files.

Sorry for pointless post but thought I should follow up for anyone else facing the same issue in the future.
StayClone
 
Posts: 2
Joined: 31. March 2016 16:38
Operating System: Mac OS X 10.11.13


Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 3 guests