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 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题