By sambtaylor on
I'm trying to set up local test sites. I downloaded mamp, did the couple of things that it said to do, but when I start it up, even though it gives two green lights, it opens my browser with the following printed php code in it instead of opening the page it should. It displays:
$language = (isset($_REQUEST["language"]) && $_REQUEST["language"]) ? $_REQUEST["language"] : "English"; $fp = fopen('../startMysql.sh','rb'); $file = fread($fp,filesize('../startMysql.sh')); fclose($fp); $port = '9999'; if(ereg('port=([0-9]+)',$file,$regs)){ $port = $regs[1]; } $link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'root', 'root'); if($link){ include($language.'/mamp.inc.php'); }else{ exit('Error: Could not connect to MySQL server!'); } mysql_close($link);
I have rebooted and reinstalled, etc, and it is still happening. Anyone know what might be happening or how I can fix it?
Comments
Suggestion
I don't know if this will help. But, here is a video tutorial on installing MAMP.
See http://www.lullabot.com/videocast/install_local_web_server_mac_osx
When I installed my MAMP installation, I also had to increase the memory for PHP because I was running quite a few modules.
See http://drupal.org/node/32116
Just in case
I'm not conversant with Mamp but Xampp, for Windows, which is very convenient & easy to use.
There's a version for Mac here http://www.apachefriends.org/en/xampp.html
Just in case the problem persists ... U could give it a try.
Php files are inserted in trhe htdocs file