I'm working on a personal project at home, and I'm using Apache/Linux as my server, and PhpStorm as my IDE. I made it where I could just type in the domain name (myDomain.com/login.php) instead of "localhost/login.php". In my /etc/hosts file, I've resolved 127.0.0.1 to my domain name. All is well, and my code executes perfectly when accessing it directly. This is where my issue arises:
If I write some code within PhpStorm, and I execute from within the IDE, no php executes. It only works if I access it outside the IDE. I have correctly set up my php interpreter.
And I'm using port 63342 as required by PhpStorm.
Why is it that when I execute from the IDE, the php code doesn't execute? I can't register a new account, login, or even incorrectly login. It just refreshes the page.
To show that it works outside of the IDE, here is a snapshot of my Bootstrap alert-danger alert popping up upon invalid credentials:
Any pointers would be greatly appreciated. I don't mind going back and forth between IDE and actual localhost. It would just be convenient to execute from within my IDE.
To run the website via PhpStorm you need configure the PHP interpreter and the "Built-in Web Server" inside PhpStorm. Check this link.