Phpstorm will run all local files but on my local server

I'm pulling my hair out. I can run most php files on my local server but one. I have a filename calendar.php that won't run and calendar01.php that will run on my local server (Mamp Pro). They are both in the local server directory and project folder, same settings as far as I can tell. The only thing I think can be different is the calender.php thinks it is a javascript file? Any help or steering me in the right direction would be greatly appreciated.

 

Thanks John 

0

Hi there,

Please post screenshots showing where "the calender.php thinks it is a javascript file" Is it a file itself .. or is it just a Run/Debug Configuration etc.

0
Avatar
Permanently deleted user

I got it work somewhat when I just run the file:

but it does this when I click the anchor tag

0
Avatar
Permanently deleted user

I think it could be a configuration error? I'm using Mamp Pro and I can't seem to get the PHP  versions to match?

0

Well .. then only thing I can say from your screenshots -- the file name is different which can be a typo.

  • when it works .. the file name in URL is calender.php
  • when it does not work... it is calendar.php

Looking at the URL -- it does not look like it is served by the PhpStorm's own built-in simple web server .. so it must be your Apache from MAMP. If Apache cannot find the file .. then it's either missing there (e.g. wrongly spelled file name) or some issue with Apache or actually your app (e.g. config that forbids accessing such URL etc)

Therefore right now I do not see how this problem is related to PhpStorm. If you think it is caused by PhpStorm then please share why (with screenshots etc).

 

0
Avatar
Permanently deleted user

THANK YOU

I can't believe I spent all this time over a simple typo. I hate when I spend all this time on something so simple. Syntax errors are easy to fix, Logic Errors are a pain in the blank. Thank you once again!  The stupid thing is the file name calender.php should be calendar.php. Oh, well. I normally pull the page name dynamically.

0

请先登录再写评论。