Laravel is just using PHP's built in server. So you can run php -i to view the phpinfo details.
Using Laravel's inbuilt webserver
Hi - how do I find out the rudiments of the PHP version I am using which I presume is bundled inside the Laravel webserver.
Under Xampp I just went phpinfo.php and bingo ... unless of course Laravel is somehow magically leveraging that version of PHP.
thanks !
If you are taking about the php artisan serve command then this is just a laravel command wrapper for the php built in server. php [options] -S
from Illuminate\Foundation\Console\ServeCommand::fire() passthru('"'.PHP_BINARY.'"'." -S {$host}:{$port} -t \"{$public}\" server.php");
So I think what you are telling is that my install of Laravel 4 is leveraging the PHP 5.3.8 I have inside Xampp ? and that is why composer is rejecting my request for Jeffrey's Generatords class as it needs 5.4 and above - right ??
If I am right I have to upgrade my php.
Sounds like it. If you're on PHP 5.3, then you definitely need to upgrade. :)
You can also do which php to make sure that it's pointing to your Xampp install, and not your system version.
does windows have a which command?
@keevitaja, you can have it by installing Cygwin terminal.
I have 25 years of knowledge invested in Windows and so I would rather continue to develop in Windows. BUT, my ISP runs Centos / Apache 2.2, so sure I would like a Linux VM for testing synched into my Windows project folder. I use PHPStorm on Windows7 as well.
I tried using Homestead last night, and realised it would not do I want.
The more I think about it, the more I am thinking I need to manually build a Ubuntu VM for testing, using a Ubuntu tool (Unison) for Windows synching.
Is there a better way, other than trashing my whole Windows rig ?
Instead of using Xampp, you could check out Vagrant to quickly create and provision a Linux VM which would have your Laravel project on your Windows host machine synced with your Linux VM.
Jeffrey has a series on Vagrant:
https://laracasts.com/index/vagrant
And here's a good Vagrant provisioning file that I like to use for Linux VMs with Laravel:
Windows is and forever will be, a desktop PC, not built for developing or coding :) I kid, I kid. It's just funny.
Doesn't take that much to install a Linux distro and install Nginx/Apache with PHP 5.5. Can also use the above methods (Vagrant/Vaprobash/Homestead/Normal VirtualBox install)
You are right .. it doesn't take a lot.. There are a lot of Linux scripts which will download a a package a machine. I have a Ubuntu machine in a VM now. My issue is synching the Windows dev platform with Ubuntu in real time, so I can build and test on the Linux box.
I don't think Jeffrey's lessons talk about synching Homestead into a windows world. I have pretty well watched them all.
Yes, it is kind of funny how the dev world has turned against Windows, unless you are a .Net developer of course. Linux has only really come into it's own in the last 10 or so years. When I started out we only had AIX / HPUX etc.
@vincej do you meant like running phpunit test from PHPstorm (windows) in Ubuntu environment?
If that, new PHPStorm support remote interpreter that we can configure phpstorm to use PHP from the VM. The feature is still quite buggy but the is workaround for that.
In Homestead all you need to do is edit the homestead.yaml file and add your windows (code) folders. It will sync up on the Linux side. Then you do all of your development on the Windows side. You even view it on the browser on the Windows side even though the Linux box is serving everything. The only thing you do on the VM side is "up" the server.
Check out the video again.
L5 : https://laracasts.com/series/laravel-5-from-scratch/episodes/3 L4: https://laracasts.com/lessons/introducing-laravel-homestead
@roderick have you tried vagrant on windows?
windows doesn't have native nfs support, which will make syncing slow as hell.
Thanks to all !
I think the easiest thing is just to synch using my Windows based PHPStorm using FTP into Virtualbox / Ubuntu / Apache. Conceptually it should be fast and automatic and the same as FTPing into an ISP. BUT I have never tried this before, so I might be talking rubbish.
Maybe if Jeffrey is running out of things to talk about he could turn some of his attention to us poor Windows users ! :o)
I've been more productive on a Mac in the last year, than I have in the previous 4 on Windows. Don't do it to yourself :P
Yeah, I think at the next Desktop upgrade I could see myself making the jump into Linux.
@vincej. Try Linux Mint. It's built on top of Ubuntu and have the same feel as Windows 7. I made the switched to developing on Linux, 4 years ago and never look back. It's the L in LAMP.
@vincej i think you should check this out first.
http://docs.vagrantup.com/v2/cli/rsync-auto.html
vagrant now support auto-sync from window's shared folder to internal VM folder. so you will have both speed and conveniences working with PHPStorm with vagrant.
p/s: never used this feature. I'm on mac.
@yadakhov Yup, I use Mint, I just call it Ubuntu because more people know that.
I'm just curious. Why is Linux so much more productive. I struggle to see one overwhelming compelling reason. If I could see it I would jump tomorrow.
Thanks !
I guess if you've spent years on Windows, you'll know your way around it but it's so much easier for me in Mac (Unix)/Linux. Everything just works, packages, filesystem is better, CLI is better etc.
For me, the best things is tools like homebrew, apt-get and yum. Not sure if there is similar tools in windows.
Ok, I give in - I'll move my PHPStorm over to Mint / Ubuntu and run it in a VM for a while and see how it feels.
I already am wrecked with apprehension and anxiety :o)
@vincej I'm more productive in Linux because my Production environment is also in Linux. If I'm going to install a virtual host for Apache or Nginx I already know how because I've done it in my local environment. The apt-get repository is
The command line is also great. PHPStorm also works perfectly in Linux.
The bottom line is stick with what you are comfortable with and can quickly google the solution for.
@keevitaja - I didn't know it was a major performance hit on Windows.
@vincej - Sounds like it might work for you but @bashy and @yadakhov speak the truth. If you go with Linux for development the "Googling" time invested in the beginning will pay dividends.
well, slight change of plan. No VM. I will dual boot my machine.
I find it amusing how back in the day, people on Unix were considered by the Young Turks as being old, historic and generally stuck in the mud. Windows was were it was at, especially NT. Apple as a company was bankrupt and dead. It got thrown a small life line of $150million care of MicroSoft.
Now the worm has turned and now *nix is the fashion and MSFT is dieing ... well slowly.
@roderick perhaps it is better with rsync now as @faisal_arbain suggested. i have not used windows for a while
@vincej good, and i promise you one thing. you will like it and it is much easier to ask and get some linux help versus windows help.
This might end up being a long post, not quite sure yet. But I have done dev work on the three major OSes being mentioned here (windows 7, mac OSX and Ubuntu). Below are my findings on them.
Windows 7 is by far the most frustrating to work in. It has no decent ability to sync with remote servers, but more so, it's CLI is near non-existent for dev work. Programs and commands don't mesh well in Windows and, from my perspective, that slowed everything down. Between needing git and synced files, Windows was always a pain to work with.
Ubuntu was definitely better. The ability to use CLI while developing and (when needed) mount remote filesystems locally was a huge benefit. Also, major dev applications like sublime and php storm worked far better with this OS.
Mac OSX though has been my favorite. Other than needing to switch my keys around to feel more windows-esque, it has been a major upgrade. The command line is nothing special, but it has tools such as homebrew and phpbrew that make developing really simple. As a minor side note, newer dev oriented chat programs seem to only be targeting macs (flowdock and slack come to mind here).
I can go into more details on specifics if needed, but from my experience and testing, Mac is by far the most comfortable and enjoyable to develop in.
Why is Mac better than linux? What kind of advantages it has?
They are actually pretty closely matched. The main thing that I noticed for mac is that it has a stronger focus on applications while still having a command line. PHP Storm for example was a pain in Ubuntu as it was a java script instead of a program I could simply click and have running. (Yes, this is able to be set up manually, but it didn't come that way when I used it).
OS X is very close to Linux, with it being UNIX (branch from FreeBSD). More programs are available for OS X and pretty much the goto OS for developers in the website area.
Love how this question has turned into a "switch to something other than Windows" discussion :P
Please or to participate in this conversation.