Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{align:right}
{html}
<a href="https://twitter.com/share" class="twitter-share-button" data-via="phpstorm">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<span id="fb-root"></span>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<span class="fb-like" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false" style="position:relative;margin-left:-20px;top:-5px;"></span>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
<g:plusone size="medium"></g:plusone>
{html}
{align}

Include Page
Social Buttons PhpStorm
Social Buttons PhpStorm

 

Note
iconfalse

This tutorial describes how to work with more advanced Vagrant features in PhpStorm.

Table of Contents

1. Using the built-in SSH terminal to connect to the Vagrant machine

...

From the Tools | Start SSH session... menu, we can connect to the Vagrant machine.

This will open a list of hosts we can connect to.

Our Vagrant machine should automatically be added to this list. Clicking it will open a connection to the SSH endpoint exposed by our Vagrant machine.
The Edit credentials... item allows us to provide connection information manually.

...

Next, we have to provide connection information. For the default lucid32 box, we can use the following values. Note that for other Vargrant Boxes this information may be different.

  • Host: localhost
  • Port: 2222 (which is forwarded to the Vagrant machine)
  • User name: vagrant
  • Password: vagrant

...

After we click OK, PhpStorm will connect to the Vagrant machine using SSH server and show us a terminal to work with.

In the SSH terminal, we can run commands remotely as well as copy/paste data back and forth.

...

From the VagrantFile, we can add path mappings by adding a configuration entry for it:

Code Block

Vagrant.configure("2") do |config|
   config.vm.synced_folder "src/", "/srv/website"
end

...

For example, when connecting to the Vagrant machine using the built-in SSH terminal, we can see the contents of the /vagrant folder which map to the PhpStorm local project folder. Be careful: deleting files from this folder will delete files on both ends!

3. Specifying Vagrant instance folder

...

The Vagrant virtual machine's PHP interpreter can be used as a remote PHP interpreter in PhpStorm. This lets us run our application and PHP-based tools on a production-like environment (our Vagrant machine), for example for running PHPUnit tests on the Vagrant machine. We can install only PhpStorm on our development machine, and run, debug and test our application on the Vagrant machine.

Wiki Markup
{align:right}
{html}
<a href="https://twitter.com/share" class="twitter-share-button" data-via="phpstorm">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<span id="fb-root"></span>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<span class="fb-like" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false" style="position:relative;margin-left:-20px;top:-5px;"></span>
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
<g:plusone size="medium"></g:plusone>
{html}
{align}

 

Include Page
Social Buttons PhpStorm
Social Buttons PhpStorm