Welcome

This is my personal web space. Please forgive the broken articles, Markdown/Textile are not very forgiving after multiple blog software changes!

Carbon today() vs. now()

Posted on: 2021-01-13 08:43:55

Beware of Carbon::today() vs. Carbon::now(). They are not synonyms. The former is equiv. to Carbon::now()->startOfDay().

This is important, especially in test environments. If you're thinking that Carbon::today() is actually today... well I suppose it is, but in what timezone?

I had a test that was doing something calculated off of Carbon::today()->subDays(1) and that is not equal to Carbon::now()->subDays(1).

Continue reading...

Notes on using SQLite with Laravel from a MySQL user

Posted on: 2020-12-04 22:44:32

Come with me on a journey to discover how easy (or not) it is to get a large Laravel app working with SQLite.

Continue reading...

Using a CSS Inliner with Laravel

Posted on: 2020-11-29 09:23:15

Here are some notes from my use of the Laravel CSS Inliner plugin. Mainly stemming from problems we had with the responsive CSS getting blown away by the inliner.

Continue reading...

Ah, a blog again.

Posted on: 2018-06-12 19:13:43

I rebuilt this blog in Laravel 5 about 2 years ago as an experiment. Never launched it.

Now I have things to say, so here it comes again.

Continue reading...

Notes on setting up Lockr on Acquia Dev Desktop

Posted on: 2017-09-01 11:01:14

Have been playing around with Lockr on Drupal 7 and want to play around with it locally and so I fall back to Acquia Dev Desktop.

Just as a note, as of the writing of this blog post, Acquia Dev Desktop ships with an invalid openssl.cnf location, so you have to provide one.

I found this out when I started getting this message while trying to create a certificate locally:

RuntimeException: Could not create private key. in Lockr\SiteClient->createCert() (line 37 of /Users/nvahalik/tmp/lockr/src/Lockr/SiteClient.php).

Bummer. Anyway. The fix is simple. Just add the following to your settings.php or local.settings.php (if you're on a Mac):

putenv("OPENSSL_CONF=/private/etc/ssl/openssl.cnf");

And if you're using Lockr, make sure this patch is applied. The patch is needed due to this bug in PHP.

Once you've done that you should be ready to lock and roll!

Continue reading...