'View > Open in Browser' function is not working

New to PhpStorm...

I assume the reason Open in Browser is not working is because I don't have PHP installed on my Windows comp.  I have a Samba share on my LAMP server and I edit the site directly from a Project in PhpStorm.  I can browse to the URL on my server to view in browser.

My question is this: Am I losing any functionality other than the ability to view in browser from the IDE?  I'm wondering if PhpStorm has other features -- namely debugging -- that require an Interpreter on my computer.

Are there PhpStorm features worth the effort of installing PHP on my windows machine?  If so, which ones?

 

1 comment
Comment actions Permalink

Hi there,

>'View > Open in Browser' function is not working

What exactly is not working? Is that action disabled for you .. or it does not open the URL or what?

 

>I assume the reason Open in Browser is not working is because I don't have PHP installed on my Windows comp.

You do not need local PHP to have it working, at all.

Lets get few things together:

  • By default IDE uses built-in simple web server where you will see URLs like http://localhost:63342/PROJECT_NAME/path/to/file
  • If you setup Deployment entry .. you will provide an base URL there .. and that URL will be used for "Open in Browser" and alike actions instead of built-in server.
  • For built-in web server to process PHP files ... you need local PHP (obviously) .. but you do not need PHP if everything is remote

 

 

>I'm wondering if PhpStorm has other features -- namely debugging -- that require an Interpreter on my computer.

You do not need local PHP if you do not plan to execute/debug PHP code on local computer (when PHP is run locally) -- PhpStorm supports remote execution (via SSH) and debugging via browser (where it does not care how you run PHP there on remote system and what web server it is -- Apache/nginx/IIS/etc)

But you need locally installed PHP if you plan to use PHP-powered tools that will be run on local computer (e.g. local Composer, local Phing, local CodeSniffer/MessDetector integration/local PHPUnit tests etc)

PhpStorm supports local PHP Interpreters as well as remote ones (SSH/SFTP/Vagrant). I'm not sure if all of the aforementioned PHP tools can be run using remote interpreter (as I simply do not use them)

 

>Are there PhpStorm features worth the effort of installing PHP on my windows machine?  If so, which ones?

I'd say -- at least Composer (unless you do not use it at all .. or use on remote system only).

 

Keep in mind .. that working with project files directly over network is not recommended: IDE requires very fast access to source files (for indexing purposes + when file system watcher looking for changes etc) -- accessing files via network is always slower than local HDD (even ignoring common-these-days much faster SSDs) .. and you may experience some random short freezes when editing files (it's very system/setup dependant (number of files; how big the files are; coding style (I mean -- classes (any modern framework) vs globally-accessible code like WP) etc) -- for some it works just fine, for some network latency is causing issues).

Therefore the officially recommended way is to have local copy of your files to work with and then setup automatic deployment on Save.

In case if you have not seen it yet: Tutorials - PhpStorm

1

Please sign in to leave a comment.