Lance Cleveland

Commentary on Beijing’s South China Sea Claims Rejected by Hague Tribunal

International tribunals and organizations have ZERO power these days especially over super power nations like China. China has become far too powerful to confront with military enforcement of the findings.


Most corporations around the world sold their soul to China years ago in the name of profits. Nearly every item you buy, including those American flags we all were waving on July 4th, come from China solely to keep prices down and profits up.

If the world wants China to abide by a ruling against their egregious and aggressive behavior in the South China Sea it needs to start with economic ramifications. Not federal trade restrictions alone, but American corporations pulling manufacturing contracts from China. Preferably back to the USA but anywhere but China. It will be a long road, but if it doesn’t change China will soon be the world’s largest and most powerful Super Nation. The most powerful countries make the rules.

Beijing’s South China Sea Claims Rejected by Hague Tribunal
The New York Times

The panel delivered a sweeping rebuke on Tuesday of China’s behavior, deciding that its expansive claim to sovereignty over the waters had no legal basis. Read the full story

Shared from Apple News

More Notes On PHP Version Switching in VVV

This article is a follow-on to Changing PHP Version on Vagrant .

Here are some discoveries of using different versions of PHP on vagrant.

Change Your Host

The default vvv installation has the db_host set to ‘localhost’ in the wp-config.php file.

phpbrew, however, sets the default db listener to 127.0.01 explicitly.   They do not want to change it as they claim “this is the proper default”.   As happens often with technology gurus both the VVV camp and the phpbrew camp claim to be “right” in the purist-interpretation of the technology “bible”, after 30 years I’ve still not received my copy BTW.  The bottom line is that if you change your VVV PHP version using phpbrew you’ll need to edit your wp-config.php and change your db_host to be defined as

You will want to do this for each WordPress branch you are working with: wordpress-default , wordpress-develop, wordpress-trunk.

These directories are stored locally on your host so you can, theoretically, change them by going to your local vvv install directory and finding the www subdirectory and the proper wordpress-default directory under that.

Check Your nginx Config

The default listener for nginx php connections is defined in the /etc/nginx/nginx.conf file on the guest (where you are after you login with vagrant ssh).

Look for the entry ending with .sock in the upstream php section.   This defines the default compiled php version that is linked to nginx.  This will be what is run whenever someone accesses a PHP file from the nginx browser (the default for vvv).

Change this manually be commenting out the default server line and adding a new socket listener for your default phpbrew path.

If you run the vagrant provision command, this file will be created from your local HOST (not the guest box) and will overwrite things you do here.  You can make it persistent by editing your ~/config/nginx-config/nginx.conf file on your HOST box (where you installed vvv not after a vagrant ssh command).

Restart nginx After Socket Changes

If you use phpbrew to build a new version of PHP and edit the nginx.conf file to use the new PHP listener you just built and started with php fpm start, restart nginx.

phpMyAdmin Will Be Broken

phpMyAdmin uses its own configuration files to connect to MySQL.  You will need to change the default phpMyAdmin configuration file to point to instead of localhost to connect.

I’ve not yet found that config setting on vvv, but when I do I’ll let you know.   If you know the trick ,please comment or email me via lance at this website.

Investigate Docker

As a fellow tech guy and past colleague said “sounds like you need Docker”.   Yeah, probably so.  For most people not doing WordPress Core contributions, Docker is likely a much better solution for switching PHP versions.  If all you need is a place to run a local WordPress install and build themes / plugins that will likely be far easier (and faster) than VVV.

However I do contribute to core when I can and that requires me to have trunk, dev, and local installs of WordPress so I can build current patch files AND test with my plugins.    Can I do that in Docker?  Sure, but I’m guessing it is more work.   I’m also certain that at the next WordCamp the core team can help me if I’m running VVV as they often cite this as the way to “get started”.

Maybe I’ll play with Docker if I ever get a free afternoon and write some articles on doing WP Core development on that.

Someone also mentioned on my Twitter feed that Pressmatic may help (a Docker front end for OSX).  Looks cool and may be worth investigating someday.

UK has fastest mobile internet while US lags behind, says report

This is not a surprise to most Americans. US ISPs and mobile providers focus on profits over service. America has some of the worst Internet services in the world. Literally.

If you think America is the world leader in technology and innovation, think again. Many of the largest and most disruptive new companies are from Europe these days.

Changing PHP Version On Vagrant

After nearly 24 hours of working on this issue I finally figure out how to change the running version of PHP from the WEB SERVER under VVV for my WordPress development environment.  I recall, at a WordPress conference last year, someone touting how easy it was to change PHP versions to test plugin and theme development on various deployment stacks.    Sure, if you happen to want to pull a whole new box image with just the right version of PHP along with all your other tools in place.

For me, I wanted to keep my vanilla Vagrant box with a single mapped directory intact.   I wanted the SSL certificates I created to remain as well, which was another day-long project.   The only thing I wanted to do was replace the default PHP 5.5 release with PHP 5.4.43 to match that of a client.  I’d also like to test with PHP 5.2 someday as that is the minimum supported version for WordPress.

It turns out that changing the PHP version at the command line is easy.   Making it take affect in nginx, the default web server for VVV, is a whole other story.  I found lots of resources on doing this “simple trick” but very few were current and almost ALL were missing information or provide cryptic installs such as “on Apache” (not the VVV default web server) or “on Debian” (no the VVV default distro).

The Summary

Install and use phpbrew to build the PHP flavor you are looking for.

Find your particular flavor of PHP under the vagrant user directory and get the path to the socket listener.

Modify the nginx configuration file to use the socket for your flavor of PHP.

Restart nginx.

Installing phpbrew

Install phpbrew either by going to the phpbrew site and following their instructions OR go to the Vagrant site , install Vagrant, and then clone the repo to a local directory.    After cloning the repo checkout the feature/phpbrew branch.   phpbrew will be installed and ready-to-run.

I chose the “install manually” option as I wanted to keep my Customfile and some tweaks to my config files that I already had in place on my current “non-repo based” Vagrant box.

Make sure you run the phpbrew init command, preferably as the default vagrant login NOT as root.  This will create a hidden .phpbrew directory under your user’s (vagrant) home directory (/home/vagrant).

Install Your PHP “Flavor”

Decide what version of PHP you want to run and install it with phpbrew.  This may take a little time.   When it is done  you should have some new directories under your /home/vagrant/.phpbrew/php folder for the version you installed.

You will want some default options as well.   Here is my command for PHP 5.4.43 with the default configuration, FPM support, MySQL support, and CLI support.

Find The Socket Listener

Under the ~/.phpbrew/php//etc directory you will find the configuration files for that version of PHP.    Search the files for the line that loads the socket listener.  The socket listener ends with .sock and is usually in a /run/ directory.     I use grep to search:

The part after the listen = that is returned is the patch to the PHP 5.4.43 socket listener for FPM.

Modify The nginx Config

I edited this directly on my guest box by logging in with vagrant ssh and restarted nginx.  The default config file is at /etc/nginx/nginx.conf

Look for the line that loads the current socket listener, usually in the /var/run directory and comment it out.  Put another line in that points to your specific PHP listener.   Here is my snippet pointing to my PHP 5.4.43 version:

The other option to make this more permanent is to edit the vagrant config files.  Got to the directory that contains your Vagrant environment, the place with the Vagrantfile, and go to the ./config/nginx-conf/ subdirectory.   Edit the nginx.conf file.     This is the file that will build the /etc/nginx.conf file whenever you provision your Vagrant box.    If you change this file you will want to run vagrant provision from your host.

Restart nginx

Again, I did this from the command line on my vagrant box after logging in with vagrant ssh.

Check Your Work

Go to to your web browser and check the phpinfo status.

By default this is found at on your host.

Click the phpinfo link.

vvv dev dashboard

vvv dev dashboard

Lessons From My First RV Trip

I just spent a week doing my annual father/son summer getaway.   Our crazy but fun RV trip is over. Back to reality; back to work. Before I forget, I want to share some things I learned along the way:

RV sales and rental companies should be required to follow concussion protocols similar to the NFL. Nicolas & I each hit our heads at least as many times as a typical linebacker during a full season. I’m still not sure what year it is or how many fingers you’re holding up.

Prius drivers are slow. I’m pretty sure they don’t even realize they are in a car. My guess is they meant to get on their bicycle and got in the Prius by accident. I’ve driven most of the East Coast TWICE in the past 5 weeks. I have lots of empirical data to back this up.

Google Maps Navigation does NOT base the estimated travel time on the posted speed limit and traffic conditions. As far as I can tell it is the average speed of traffic times your gross vehicle weight divided by 3,501.7. Since nobody drives the speed limit these days and EVERYBODY drives faster than the speed limit (besides Prius owners) you will be much later than Google says unless you are doing 90 in a 70. Also a loaded RV is slightly more than 3,501.7 pounds so there’s that. Case in point, doing 72 in a 65 – Google kept adding 1 minute to our arrival time every 7.25 minutes of driving time. Do the math.

Chevy cruise control blows. Set cruise control for 70. Start up a hill, speed drops to 62. Amnesia Cruise Control mode wakes up and RV downshifts to overdrive and speeds up to 78 using 37 gallons of gas in the process. Almost rear-end a semi , turn off cruise control and re-engage at 70.

You can jump a Prius in an RV. Remember that precision cruise control system? It is particularly good at getting and RV up to Evil Knievel Jump-The-Gorge speeds any time you approach an overpass hill. Just as you get partway up the overpass it will downshift to overdrive and floor it. It peaks at something close to 98 MPH, I can’t say for certain as that is the point I close my eyes. This sends the RV airborne at the crest of the hill. During one of the numerous daredevil stunts on the 8.5 , I mean 10.75, hour drive home I opened my eyes and the light blue all-electric Prius we were about to take out was somehow behind us. I’m pretty sure we jumped it. Either that or we just ran it over and the RV spat it out the backside like a used burrito.

There are many more things I learned from being an “RVer” this past week; DC public transportation is unreliable, RV Park WiFi is connected to dial-up modems, don’t drink the water, do see the Smithsonian museums, DC people are nicer than they look, and your congressmen and senators really ARE as lazy as you think.

In short, if you’ve never done the RV experience I highly recommend it. It may not be the most enjoyable or relaxing trip you take but it will certainly be memorable; other than those things you forget from short-term amnesia caused by your 12th concussion of the week.

%d bloggers like this: