Installing Laravel 5.5 & MySQL in Ubuntu 16.04 with Nginix already installed

Here are my notes on how to install these components.

sudo apt-get install php7.0-mbstring php7.0-xml composer unzip
sudo apt-get install -y php7.0 php7.0-fpm php7.0-mysql php7.0-zip php7.0-gd
sudo apt-get install mcrypt php7.0-mcrypt
sudo apt-get install -y php7.0-mbstring php7.0-xml –force-yes
sudo apt-get install php7.0-curl php7.0-json
sudo vi /etc/php/7.0/fpm/php.ini
sudo service php7.0-fpm restart
sudo mkdir -p /var/www/laravel
sudo vi /etc/nginx/sites-available/default
server {
        listen 80;
        listen [::]:80 ipv6only=on;

        root /var/www/laravel/public;
        index index.php index.html index.htm;

        # Make site accessible from http://localhost/
        server_name <serverName>;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ /index.php?$query_string;
                # Uncomment to enable naxsi on this location
                # include /etc/nginx/naxsi.rules
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
cd ~
curl -sS | php
sudo mv composer.phar /usr/local/bin/composer
sudo composer create-project laravel/laravel /var/www/laravel
sudo chown -R :www-data /var/www/laravel
sudo chmod -R 775 /var/www/laravel/storage
sudo chmod -R guo+w storage
sudo apt-get update
sudo apt-get install mysql-server
sudo mysql_secure_installation

Using git to push and pull repositories.

I’ve been trying to get more proficient with git and figured the only way to do that is to get my hands dirty and write some simple app(s) and push them to a production server. There are my notes, mainly for me to help me remember how this stuff works.

The very first time you do a git init to initialize your repository.

git init

You do this every time you want to add new changes to your reposiotry.

git add .

To see the status of things which are going to be added, removed.

git status

Once you’re happy with what you want to commit, leave your future self a little love note.

git commit –m “Doing something”

You only do this the first time to setup your remote repository destination.

git remote add origin

Then you do this every time you want to push your commit.

git push –u origin master

Now, let’s say I want to pull my repository to a new host e.g. production. If you’re using Laravel make sure you’re setting up your environment name in your vhost file first.

sudo git clone locaton/in/my/server

Laravel specific commands.

chown -R :www-data app/storage

chmod –R 777 app/storage

‘composer install’

php artisan cache:clear

I’ve found for 5.1 you might have to do this the first time too.

mkdir storage/views

mkdir storage/sessions

chown –R :www-data app/storage

Now, once you’ve cloned your repository you need to updated it every time you want to pull down any new commits.

sudo git pull origin master

composer update

php artisan cache:clear


Uniform Server (WAMP) and Laravel

I’ve been playing around with Laravel a bit just to try it out and figured I would bundle this with a light weight WAMP solution.  Went through the install and everything worked fine exept when it came time to migrate my database:

C:\UniServer\laravel1>php artisan migrate
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Call to undefined function Symfony\\Component\\Console\\mb_detect_encoding()","file":"C:\\UniServer\\laravel1\\vendor\\symfony\\console\\Symfony\\Component\\Console\\Application.php","line":721}}

Took some googling around, but the solution was pretty easy.  Assuming you’re running a stock and fairly recent version of Uniform, all you have to do is modify your php-cli.ini file and add:


Restart Apache and presto.


New Years Resolutions and Data Visualization

At the end of last year (December 2010) I set out to change a few things.  The biggest one being to try and burn 10,000 calories a month through exercise.  The first few months I kept track of my calorie expenditure base on a heart monitor, when my heart monitor met an untimely death I switched to an Android app call CardioTrainer. I highly recommend this app for anyone else who wants to keep track of their workouts.

While I was only able to accomplish this 6 times, I have burned over 100,000 calories so far and lost about 10 pounds.  I will continue working towards 10,000 a month in 2012.  So, now I have a year of data and I’ve been looking to play around with Google’s Chart Tools and figure this would be the combination.  Here’s my first stab at visualizing the data I’ve collected so far.



May 2nd 2010 Pittsburgh Half Marathon

In my never ending attempt to punish my body and hate my knees I’ve been training to what I hope will amount to another full marathon this year.  Along the way I figured it would be a good idea to give a half marathon another shot.  If you’ve never been to Pittsburgh, I recommend you do, it’s called the city of bridges for a reason and running through its neighborhoods and streets is a very unique experience.

The morning of the race, we arrived with a little under 30 minutes to spare, which was not good.  I really didn’t get a good warm up run in and stretched out just a bit.  It was a cloudy day with chance of thunderstorms.  Which was an issues, since the race could get called off if there was lighting… the chances of getting hit by lighting are incredibly small, but I digress.

The race began promptly at 7:30 AM, but since I was so far back in the pack I didn’t cross the starting line until about 10 minutes after the gun went off.  The first couple of miles are always torture.  It’s really a free for all, you never hit your stride as you’re on the lookout for all other runners, ensuring you don’t step on someone or someone doesn’t elbow you as they are trying to squeeze by you.  At bout mile 5 is when the seas start to part and you really get to focus on what you came here to do.  The unfortunate part is that you hit the half way point before you know it.  For me this is the hardest part as I always feel that I’ve spent too much energy trying to make it through the pack that I start to run out of gas around mile 9.  Oh well, that’s what training is there for, right?  At the end of the day it was a great day for a race even though the rain was coming down pretty hard.  Final time below.



My only complaints about this event are the lack of Goo.  All they had for the runners was water and Gatorade, glad I packed some beans, but I was banking on some Goo to break up the monotony.  Second, I didn’t see any post race beer, not saying this is imperative, but I love me a beer or three after pounding out a 13 miler.  And finally, I should have used more lube.  Yes, my armpits were red and tender and it had everything to do with the huge amounts of water that came down on me while running.


Phishers use IVRs for phishing!

This week I received a text message from an “Unknown sender” and it read:

“This is an automated message from Franklin Bank.Your ATM card has been suspended.To reactivate call urgent at 866-545-2647”

Being the curious little monkey that I am, I just had to call it. So, the first thing I did was find a phone which did not display an external caller ID (ANI). After finding a phone I called the number above. I was greeted by an automated voice asking for my credit car number, my expiration number, and my 4 digit pin. I entered random information. After it was trying to verify my information, it asked for it again. However, this time it said it could not verify my account at this time and to call customer service representative… however it didn’t provide me with a number.

This is a scam, although I must say a some what ingenious scam. First, there’s an automated voice which answers the call, this can’t be tracked to any one person which might throw of a caller because of an accent or tone of voice. Second, is very similar to text messages received from various financial institutions. Finally, they have a toll free number which they provide for you to “activate you call”. Pretty cool, huh?

I think I’ll set something similar up at my home and even have it go to a web service to verify the credit card number is of the correct format just to say I can. :-)


Rio Rancho, NM

I’m out here to do a presentation and this place is absolutely beautiful. The sun is out and shining brightly, while the temperature is in the mid 30s. I’m staying at this beautiful resort called the Hyatt Regency Tamaya Resort and the place is immense with a lot of great things to do and see. The room I have, while it takes around 10 minutes to walk to it, has an amazing view of the mountains. Here are two pictures I took.


And another:

Mountains 2

One thing I also love is the fact that gardens here consist of rocks, sand, and some shrubs. My type of gardening.


Oh Sprint How I Love You So, Let Me Count the Ways.

The last few months my Sprint bill had been in the multiple of hundreds of dollars. Usually above $300, so I finally decided to switch to their everything plan. $99 dollars + tax for all the calling, texting, and web is an excellent price and I will take full advantage of it. However, it just so happens that I have a corporate discount of 23%. Now, if you do the math, that would be a savings of at least $23 every single month! Yes, doesn’t that rock, simply everything plan for $77 + tax? However, I received my first bill today and the awesome savings came to a total of $0.18. Yes, that cents… 18 cents.

I picked up the phone and got in contact with Sprint (who btw has changed their IVR and gotten rid of ASR). The wonderful agent I spoke with, Christina, informed me that “since the simply everything plan is already so discounted, no further discounts can be applied towards it”. Well, isn’t that grand? In the long run, I will pay less, however I will miss that 23% discount. :(


Let me tell you about my current life.

It has been a long while since I’ve had any time to breath. While I enjoy the non-stop days and nights of working all day and rocking all night… well rocking perhaps not, but sleeping yes, it is nice to just take a break. A break where you can just sit, relax, and exhale. This past week my currently project reached a major milestone. Even though we had multi-week delays, we were still able to come through and deliver. At the end of the day, when under the gun, we all realize that sleep is over rated and not really necessary. Now that this date is behind us, we can all go back and ensure everything is configured correctly and ready for production, which comes around in March of 2009. Here are some pics from my last week.

The answer is 7.

The answer is 7.

I want this sheep!

I want this sheep!

No relations.

No relations.