douhei8633 2016-04-01 21:56
浏览 86

无法在MAMP localhost上加载PHP文件[关闭]

I have a project folder that I've been working on with with WAMP on Windows, but I moved everything over to MAMP on the Mac. I've got the project file uploaded to a webspace and everything works fine, so I know the code is fine. I've imported all the MYSQL data from WAMP.

I can access the .html files with no problems on the Mac but when I try to run a .php file I receive the message localhost is currently unable to handle this request. and the error code 500.

I've been searching for hours and can't find a fix for this.

Any ideas as to why I am seeing these messages and cant access any .php files?

Some extra info on the mamp setup:

  • Apache port: 8888
  • MYSQL port: 8889
  • 写回答

1条回答 默认 最新

  • dtjo51649 2016-04-01 22:05

    The first thing that comes to mind is making sure that you hit the correct folder. The easiest way is probably by adding a test.php file in your project public root and putting something like <?php echo "hello world"; in there. And then you just browse to localhost:8888/my-project/test.php and check if the world gets greeted.

    The second thing I would do is check the error logs. "localhost is currently unable to handle this request." is not very helpful for debugging. You should be able to find apache_error.log and php_error.log inside /Applications/MAMP/logs

    Feel free to ask if that didn't help locating the issue, or if you are still stuck...

    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥15 求小游戏炸弹人中关于敌人的C++代码
  • ¥15 拿到这个服务器最高权限有偿
  • ¥50 来个抓app跳转支付宝转链接的
  • ¥15 remotes安装提示没有description文件
  • ¥15 AttributeError: 'NoneType' object has no attribute 'drop_duplicates'报错
  • ¥15 以下代码,运行结果报错
  • ¥15 Vivado仿真数据出错
  • ¥15 银河麒麟不支持vant等前端框架怎么办?
  • ¥15 vue3的子组件在父页面调用不显示不生效问题
  • ¥15 cadence PEX