Jump to content

MAMP not recognizing PHP files?


joomlavideos

Recommended Posts

HI, I have MAMP installed and running 10.5.8. I am successfully developing sites locally with WordPress and Joomla. However, I am trying to develop a site using php and having issues.

 

When I go to url localhost:8888/sitename/ nothing comes up. When I go to url localhost:8888/sitename/index.php, all that shows in the browser is the source code.

 

IS this something to do with .htaccess? If I modify this file, will it mess up Joomla and WP?

 

Any help is greatly appreciated.

Link to comment
Share on other sites

How are you creating your files? What editor are you using? For example, others have had issues when using TextEdit when they don't realize they are using Rich Text mode rather than plain text mode.

 

Assuming you are using TextEdit...

-- open up TextEdit

-- go to the preferences

-- make sure new documents are set to use "Plain Text" format (it defaults to rich text)

 

If the above issue doesn't fix things, you should also check that Mac OSX isn't hiding the real file extension from you, which could result in you having files named "yourfile.php.txt".

 

To check this:

-- Open up the Finder

-- go to the preferences

-- select the "Advanced" tab

-- make sure that "Show all filename extensions" checkbox is checked (I believe it is unchecked by default)

-- check your .php file to make sure it ends in .php

 

Also, assuming you are using TextEdit, take a look at Smultron or TextWrangler -- both are free text editors for Mac that support things like syntax highlighting, line numbering, etc. They're both a lot better to work with than TextEdit (though you could do a website in TextEdit just fine.) If you have money to spend, take a look at Coda (my editor of choice) or Espresso / Textmate.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...