9 comments

Hi there,

What is the URL that you see in a browser that does not work?

0

http://localhost:63342/myproject.com/test.php

0

Thnx.

You are NOT using Apache .. but PhpStorm's own built-in web server ... which at the moment has issues with POST requests -- https://youtrack.jetbrains.com/issue/WEB-17317

Use your Apache instead -- http://stackoverflow.com/a/34787827/783119

0

Thanks, Andryiy! That's good to know. If I can't even test simple PHP scripts, doesn't that make PhpStorm essentially useless right now (when I can use WebStorm as a cheaper alternative).

As a side now, I didn't mean to convey that I thought that I was running Apache via PhpStorm haha. I meant that I DO have a separate server that has Apache on it that I was using to test whether it was PhpStorm on my local machine causing issues or not.

0

PhpStorm has built-in web server for a few versions now. If they (JetBrains) would remove it (or if PhpStorm would never had in in first place) ... would it still be useless? Or maybe it will be just more obvious for user that he needs to use Apache/IIS/nginx/etc (or PHP's own web server) for serving his web requests?

When did WebStorm start supporting SQL/Database or editing PHP code (and PHP oriented tools, like CodeSniffer/MD/PHPUnit/etc)? That's, of course, if your are using it for actual PHP development and not just CSS/HTML/JS.

0

WebStorm doesn't support SQL/DB; you know that. But if I can't use PHP to get to the SQL/DB... you see my point? What alternative do I have? I'm new at this :] Be nice.

0

>What alternative do I have?

Use proper web server (Apache/IIS/nginx/whatever) to actually serve web pages.

The SO Answer I gave you the link for tells how to do that (configure Deployment entry) -- so that when you choose "Open in Browser" it will use your Apache's URL. If you do not have any deployment entries then IDE uses built-in web server for such "Open in Browser" and alike actions.

Plus (depends on your script, of course) .. you can run it in CLI environment (console/terminal) without any web server at all.

PHP itself can also act as simple web server and you can use "PHP built-in web server" type of run/Debug Configuration to launch it from IDE.

If you do not have any local web server software installed -- consider using VM via Vagrant .. or install MAMP/WAMP/XAMPP.

Some PHP frameworks (like Symfony or Laravel) have standard commands to launch local web server (using PHP itself) or have their own Vagrant-controlled VMs with pre-set environment.

 

Have a look at existing tutorials in case if you have not seen them yet: https://confluence.jetbrains.com/display/PhpStorm/Tutorials

0

I gave a bit bigger answer, but because it has few links ... it awaits approval (no idea how long it may take) .. so just a short one.

>What alternative do I have?

Use proper web server (Apache/IIS/nginx/whatever) to actually serve web pages.

The SO Answer I gave you the link for tells how to do that (configure Deployment entry) -- so that when you choose "Open in Browser" it will use your Apache's URL. If you do not have any deployment entries then IDE uses built-in web server for such "Open in Browser" and alike actions.

Have a look at existing tutorials in case if you have not seen them yet: https://confluence.jetbrains.com/display/PhpStorm/Tutorials

0

Ah okay. I deploy and launch via server now (instead of PhpStorm's localhost) and it works. Thank you so incredibly much.

0

Please sign in to leave a comment.