koka424 Posted May 18, 2007 Share Posted May 18, 2007 I just installed MAMP the other day and got it up and running. I put the .php file that I was trying to view in the htdocs folder. Then I typed in the address: http://localhost:8888/filename.php It worked just fine. Then I get on today and try to view that same file and nothing comes up. No error. Nothing from within the file itself. Just the address in the title bar. I created an .html document and put it into the htdocs folder and can view that just fine. But when ever I try to view the .php file it does nothing. I have tried changing the file extension to another .php type (.php3) and I tried recreating the .php file with different Doc types and nothing happened. The whole thing is that I never changed anything. It just stopped working. Well something had to have changed for it to not read .php files anymore. Please help Quote Link to comment https://forums.phpfreaks.com/topic/51926-will-not-recognize-php-files/ Share on other sites More sharing options...
trq Posted May 18, 2007 Share Posted May 18, 2007 Can we see what is in this php file? Quote Link to comment https://forums.phpfreaks.com/topic/51926-will-not-recognize-php-files/#findComment-255992 Share on other sites More sharing options...
koka424 Posted May 18, 2007 Author Share Posted May 18, 2007 <?php $outputString = "Hello, world"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/DTD/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Hello, world</title> </head> <body> <h1> Test </h1> <!-- <?php print $outputString; ?> <h1><?php # Double slash used for one line comment /* Slash and a star is used for multiple line comments */ print "Hello, world"; ?></h1> <p> <?php // Echo used in place of print, can print numbers as well echo "Hello, world"; ?> <br /> <?php echo 123; ?> </p> <?php // Can print more than one type of data echo "The answer is ", 42; echo "Hello"; // is the same as echo ("Hello"): ?> </body> </html> Its not just this file though. I made a couple and it will not read any of them. Quote Link to comment https://forums.phpfreaks.com/topic/51926-will-not-recognize-php-files/#findComment-255996 Share on other sites More sharing options...
trq Posted May 18, 2007 Share Posted May 18, 2007 Well something had to have changed for it to not read .php files anymore. I guess Id'e agree with that comment then. So what did you change? Quote Link to comment https://forums.phpfreaks.com/topic/51926-will-not-recognize-php-files/#findComment-255997 Share on other sites More sharing options...
koka424 Posted May 18, 2007 Author Share Posted May 18, 2007 This is the original file that worked last night and not today. In the other ones I tried changing to doctypes and stuff and I got nothing. I am thinking that it has to be something with MAMP. The only thing that I changed on my MAC was changing the wireless network that I signed on to. That should have nothing to do with it. Is there anything that I can check? What I don't get is Ill type in: http://localhost:8888/filename.php and I get nothing. Then I type in: http://localhost:8888/filename.html and I get the file to open up in the browser. Can you think of anything that I can double check? Quote Link to comment https://forums.phpfreaks.com/topic/51926-will-not-recognize-php-files/#findComment-256003 Share on other sites More sharing options...
koka424 Posted May 18, 2007 Author Share Posted May 18, 2007 The comment tags were not in the actual .php file that I am trying to view. Quote Link to comment https://forums.phpfreaks.com/topic/51926-will-not-recognize-php-files/#findComment-256016 Share on other sites More sharing options...
koka424 Posted May 19, 2007 Author Share Posted May 19, 2007 I reinstalled MAMP and it works fine now. My best guess is that somehow PHP was turned off. I don't know why else it would not have worked. Quote Link to comment https://forums.phpfreaks.com/topic/51926-will-not-recognize-php-files/#findComment-256771 Share on other sites More sharing options...
john010117 Posted May 19, 2007 Share Posted May 19, 2007 That's the biggest possibility. If you don't want the hassle of turning on php every time you start your PC, just set it to automatically start every time you start your computer. Quote Link to comment https://forums.phpfreaks.com/topic/51926-will-not-recognize-php-files/#findComment-256791 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.