Git for Windows 7 - php

My OS is: Windows 7 Ultimate and IDE is Netbeans. Want to work with 2-3 devs on PHP projects. After research I found that it's possible with GIT. Found this solution. But it's installing apache server. (I don't need any web server: I already have one - IIS7). Is there any free solution (I mean not only GIT, maybe something else) that will work with Netbeans and allows to work with group of developers?

Instead of running your own Git server, why not use bitbucket? It will give you a Git server that you can share with up to 5 people, working on an unlimited number of projects and it is free.
Installing and running a private Git server is not worth it.

For an internal hosting solution I find that Gitolite running on an Ubuntu Server VM with the max secure connection setting bumped up to 100 works really fast! Admin is a breeze as well.

Personally I use TortoiseGit and it's good enough for me. However, a better idea might be to buy a cheap VPS (git doesn't need high specs) and set up your git repo on that.

Related

Complicated setup with Git, Laravel, PHPStorm and VPS

What I have so far:
Two VirtualBox LAMP machines (separate locations) where I connect my two Windows development machines via SFTP, to write code using PHPStorm.
One VPS machine where I deploy my code written for a project in Laravel.
What I am trying to achieve:
Fast and easy code deployment, as in: write the code in Windows via PHPStorm, test it on the LAMP machine, deploy to VPS if necessary.
The problem is that I need to use some php artisan commands on LAMP machines to get some code generated. This means that I always have to synchronize PHPStorm with LAMP files tree in order to see the changes. Then, I need to also sync the other dev (LAMP) machine and the other PHPStorm running on Windows machine number 2. I know that this can be done via Git.
So everytime I use the command line to generate code, I need to sync 4 machines (excluding the deployment server).
Later, if I add another pair of Windows/LAMP dev machines, the complexity grows.
Back in the days of Dreamweaver, I could write code directly on the deployment server. Not the greatest idea, but it was way much simpler and faster, and that's what I need now.
Any ideas on how can I simplify this?
Switching to WAMP so I can have files in sync with PHPStorm (because all is locally) is not OK because... Windows and PHP libraries issues :)
Also, switching to Dreamweaver is not OK either.
What other options do I have?
Thanks!
LE: on the side, I am also thinking if a NAS can be helpful for this type of problem.
LLE: is Linux Desktop + PHPStorm the only straight solution?
No matter the protocols
You can put your code outside of the guest machine and configure the guest machine to mount the code (mount a folder from the host inside the guest).
Apache will run slower because it will use the mounted remote-folder but PHPStorm will run at its maximum speed.
Taking protocols into consideration
Try using SSHFS on windows.
I use SSHFS for remote development from my Linux host machine to headless vagrant boxes (and/or to remote development servers / staging servers).
It's much faster than SAMBA (the windows SMB protocol) and oddly faster than NFS even though SSH uses encryption.
Coleages using Windows+SMB often leave their computers for 30 min while PHPStorm is indexing and git branch changes on the dev machine go unnoticed for minutes at a time.
Indexing over SSHFS usually takes less than 5 min on a Symfony2 project. Branch changes are detected in less than 15s.
Using Linux (shameless plug)
Linux is nice, and it's free, and it works out of the box (Ubuntu) -- including pesky USB-Modems which would normally require an install on windows.
You already know how to handle a Linux CLI the learning curve is already halfway crossed.
Auto-updates don't rule your life, they're not the king of you!
All the applications you need are part of the software repositories you don't need to look for anything, download 40+ executables and attempt to install them just to be welcomed by an error "invalid architecture", "windows version not supported", ".NET framework version too old", "DirectX version too new (wtf?)", "your cousin is a software pirate".
Dependency management is a concept Linux never fully solved -- but at least the bloody tried and in 90% of consumer use-cases it fits the bill. Windows is still eating glue at the back of the class.
How I solved the problem:
I have an extra Mac, on which I installed everything for my PHP ecosystem, including the IDE, so everything is local. That's the dev machine. Then I manually copy the code to the VPS when needed. Another solution was to install Ubuntu Desktop (or similar) on dual boot with Windows and use it as a local dev environment.
Much faster development / deployment :)

(LMX)AMP and Laravel

I understand LAMP, MAMP and XAMP are solution stack. I also understand there are frameworks like Laravel and Symfony.
If I have to start PHP development in a proper manner, Is it required to have a solution stack installed first and then the framework to have a professional set up?
If the answer is yes, then I am assuming the versions of the software inside the package is quite important for compatibility with the framework. Is there a popular combination out there?
And In Live, I suppose, I just to need to have the solution stack installed for the package to run.
My dev machine is a MAC with OSX 10.9.5 and my Live is going to be in Linux. I need to make sure these fundamental knowledge is concrete before I start the work. Any help is much appreciated.
Laravel has a all-in one virtual box solution. It's called as Homestead. Homestead works on many platforms such as Linux, MAC, Windows and contains everything you needed:
Ubuntu 14.04
PHP 5.6
HHVM
Nginx
MySQL
Postgres
Node (With Bower, Grunt, and Gulp)
Redis
Memcached
Beanstalkd
Laravel Envoy
Blackfire Profiler
If you decide to go with other solutions you will probably face with many problems like enabling essential extensions and with changing some system settings.
Besides you can use this solution for pretty much every kind of php framework or code.
Just follow the steps in the guide and almost everything will be ready to use just in few minutes after download finishes.
Laravel is good choice as there is big community and Google trends show it is growing very fast.
As it is PHP then you need to have server which processes the PHP. Usually it is Apache2.
Many people like to use MAMP, XAMP to simplify their development. I prefer to use standard Apache2 myself and you can even just rely on Laravel/PHP builtin server that you can start with php artisan serve, It will be enough for defelopment purposes.

Build a MAMP environment on Mac... Best solution?

I recently bought a new mac... In the past I used MAMP and Bitnami for the setup of my dev environment, but I would like to find a more efficient way, if exists, to manage my apache & php installation...
So...
What is the best way to set up a PHP development environment on a Mac? On StackOverflow I found something on http://www.macports.org/ are they reliable and/or updated to latest versions of apache and php?
I am one of the BitNami developers. I wanted to mention we have released a version of MAMP stack that you can download and run from Mac OS X app store with one click. It is completely free: https://itunes.apple.com/app/mamp-stack/id571310406
I finally found my perfect setup thanks to this blog post: http://echodittolabs.org/blog/2011/09/os-x-107-lion-development-native-apache-php-homebrew-mysql-or-mariadb, which basically uses Lion's built-in Apache and PHP with a Homebrew installation of MySQL and a nice VirtualHosts setup.
You can try AMPPS new MAMP/WAMP Stack. I use it.
I've installed Apache/MySQL/PHP on linux servers several times, and it's usually a piece of cake because of good package managers.
However, I had a terrible experience with MacPorts. Why don't you look at Xampp if it has everything you need.
I think I'm going for an Ubuntu Virtual Machine, for several reasons...
Easy to mantain (all packages available)
Easy to shutdown
MacOS stays clean
I can easily switch env or similar...
For Windows users i recommend "Softaculous AMPPS" since it's easy to update it. For Mac users I recommend "Bitnami MAMPStack". However to test PHP mail function on my Mac, i use "MAMP Pro".

Working with small group of developer on PHP projects

Want to work with 4-5 devs over internet on PHP projects.
Question: Is there any with/without central server version control system that will work with Netbeans IDE, Windows 7 and IIS?
Please: don't suggest any third-party servers like bitbucket or git-hub. I don't want to use any paid server or free ones with limited posibilities.
I want to set-up my own server. That's why asking to community
Thanks in advance.
System specs:
Currently My OS is: Windows 7 Ultimate X64 and IDE is Netbeans 7.1.
I personally prefer git. Since I work from a laptop, it allows me to have my own versions, while still reaping the benefits of a centralized repository.
The Windows part was answered in this question.
This should be the thing you're looking for, since git integrates in netbeans 7.1 REALLY well, and is easy to use and master.
cvs and svn are both easy to setup on a server and they have clients for all the platforms mentioned.
We are successfully using gitosis. gitolight might also be an option for small teams but I have not used it. An other option is to set up gitourious, but this might be overkill for you.
Said all that most of this systems are desigend to work on Linux. We are actually running gitosis on a Synology NAS, with 2 developers and about 30 projects.
This post might be interesting for you: Gitosis alternative?
You can use an ssh account and create a github repo that is shared among the members of the team. The limitations are negligible with this approach since you can setup a server yourself.
Take a look at http://www.mindfuzz.net/?p=250 for ideas.
Ok, I decided to make this an answer after all.
VisualSVN is an easy-to-use-and-setup SVN server. Simply download the free version from http://visualsvn.com/server/download and install. Then refer to http://www.visualsvn.com/server/getting-started/ for a few tips to get you started.
You need to make sure that NetBeans supports SVN. This link states it does.
If you want to run your own server, you have many options. I personally like git, and it is quite easy to set up your own server. Check out this chapter of Progit: http://progit.org/book/ch4-0.html
It talks about your options for setting up a git server and has step by step instructions.

How to share a PHP project?

Me and two friends want to build something in common in PHP, probably all of us are going to use eclipse for that, but some use Ubuntu and some use Windows.
Is there any convince and good why to share the code and develop together freely? Thanks!
And we don't want our project to be open source in this case :(
You can probably use a Subversion (SVN) or Git repository. These are tools that enable several developers to work on the same project at the same time, managing conflicts and versions of the code.
For free solutions, please see:
https://stackoverflow.com/questions/59791/free-online-private-svn-repositories
https://stackoverflow.com/questions/2378120/is-there-a-free-private-git-repository
How to install Subversive, a free Subversion client for eclipse: http://www.eclipse.org/subversive/documentation/gettingStarted/aboutSubversive/install.php
Depending on your platform, i would recommend following:
SVN Provider:
SpringLoops (Ref. Link)
I've been with them for 2.5 years now, blazing fast support. It has some rock-solid features like auto remote deployment so if you commit it instantly deploys to the remote server so you have the actual version running on the FTP too.
As far as i can tell you, KEEP AWAY from BeanStalk as provider, they are copying SpringLoops and have roughly the same features but theirs work very very slow. There are waiting times for remote deploy of 120 seconds in average.
Mac OS X:
I've extensively used Versionsapp from Sofa but in the last 2 years it did not receive any (major) update at all so i purchased CornerStone and it's working very very good. You can keep track of anything that happens to the repository.
Windows:
If you are using windows, i would work with tortoisesvn which works with the windows Shell so you give the commands via the shell menu. It's easy to use and is developed since a very long time.
If you have any questions write a comment and I'll update my answer :)
I think bitbucket is a great solution for sharing a small project with your friends and make it privately for free.
https://bitbucket.org/

Categories