S
S
Stepan Yudin2015-05-15 08:05:20
IDE
Stepan Yudin, 2015-05-15 08:05:20

How to create a normal dev environment for PHP development on Windows OS?

Good afternoon, gentlemen.
Years passed, I was coding in PHP in PhpStorm, using Wamp Open Server as a dev server. The development of projects on Symfony went on calmly and went on.
But it's time to master a bunch of new technologies, such as Vagrant, Bower, Grunt, and so on, which require Node.js and other things that do not normally live under Windows. And then the struggles began:

  • I put VirtualBox, I raise the guest OS Ubuntu 12 LTS, I configure everything-everything-everything there. Works ok.
    The IDE is running on the host machine (Windows 7), the project folder is synchronized with the DocumentRoot of the web server on the virtual machine using VirtualBox Shared Folders. And as soon as I start working with a Symfony project, there are terrible delays. Pages are rendered in the best case for 6 seconds. I smoked blogs and articles, took out the cache and symphony logs outside the rummaged directory, disabled XDebug and tweaked Apache and PHP. Anyway - 2-3 seconds to open the page at least. This is very uncomfortable.
  • I put Vagrant, I generate a config on puphpet.com. History repeats itself, because the same VirtualBox and its Shared Folder are used.

Who is dealing with this? Or even leave Windows for Macos or Ubuntu? But it's also impossible, because 50% of the time I'm developing under IBM Lotus.
Buy a second laptop? As an option, but not really desirable.
UPD
Well, or maybe someone knows the recipe for how to seamlessly synchronize the web project directory between the host system and the virtual machine in both directions? to keep the speed normal.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
E
E_STRICT, 2015-05-17
@stepan_sib

The main rule is to store all files in the guest system .
Projects with a large number of files will also slow down on Linux if these files are stored on the main system. Yes, and logically it is more correct to keep files and databases in one place.
PHPStorm can work with files via SFTP . If this is not suitable, then for windows there are all sorts of proprietary solutions (paid and free) for mounting remote file systems.
PS Use Vagrant even if you switch to Linux or OS X.

N
Nazar Mokrinsky, 2015-05-15
@nazarpc

But what if you store files in a virtual machine and log in via Samba? PhpStorm normally works through Samba.
By the way, do you have a 1 Gpbs network in the virtual machine settings?
It would be easiest to switch to Ubuntu, in this case you can put Windows into a virtual machine.

S
Sergey, 2015-05-15
@serega_kaktus

Install ubuntu as a second axis and reboot when needed. And if you buy an ssd, rebooting + opening / closing applications will take no more than a minute

A
Alexey Yakhnenko, 2015-05-15
@ayahnenko

say, under Windows it is necessary to choose the type of synchronization specifically.
docs.vagrantup.com/v2/synced-folders/smb.html

P
Pavel Shvedov, 2015-05-15
@mmmaaak

I did not notice wild brakes, my scenario is slightly different from yours. I installed the latest LTS on the VBox Ubuntu Server, instead of Apache I use NGinx, I open the project folder on the host machine via the SFTP built-in IDE (more or less I liked Netbeans and Komodo Edit), I don’t use Synfony, I write in Python + Django + WSGI, problems with I don’t notice page rendering brakes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question