Monthly Archiv: January, 2019

PHP 5.6.40 Released

The PHP development team announces the immediate availability of PHP 5.6.40. This is a security release. Several security bugs have been fixed in this release. All PHP 5.6 users are encouraged to upgrade to this version. For source downloads of PHP 5.6.40 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog. Please note that according to the PHP version support timelines, PHP 5.6.40 is the last scheduled release of PHP 5.6 branch. There may be additional release if we discover important security issues that warrant it, otherwise this release will be the final one in the PHP 5.6 branch. If your PHP installation is based on PHP 5.6, it may be a good time to start making the plans for the upgrade to PHP 7.1, PHP 7.2 or PHP 7.3.

PHP 7.1.26 Release Announcement

The PHP development team announces the immediate availability of PHP 7.1.26. This is a security release which also contains several bug fixes.All PHP 7.1 users are encouraged to upgrade to this version.For source downloads of PHP 7.1.26 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.

PHP 7.2.14 Released

The PHP development team announces the immediate availability of PHP 7.2.14. This is a security release which also contains several minor bug fixes.All PHP 7.2 users are encouraged to upgrade to this version.For source downloads of PHP 7.2.14 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.

PHP 7.3.1 Released

PHP 7.3.1 Release AnnouncementThe PHP development team announces the immediate availability of PHP 7.3.1. This is a security release which also contains several bug fixes.All PHP 7.3 users are encouraged to upgrade to this version.For source downloads of PHP 7.3.1 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.

WordPress 5.0.3 Maintenance Release

WordPress 5.0.3 is now available!

5.0.3 is a maintenance release that includes 37 bug fixes and 7 performance updates. The focus of this release was fine-tuning the new block editor, and fixing any major bugs or regressions.

Here are a few of the highlights:

For a full list of changes, please consult the list of tickets on Trac, changelog, or read a more technical summary on the Make WordPress Core blog.

You can download WordPress 5.0.3 or visit Dashboard → Updates on your site and click Update Now. Sites that support automatic background updates have already started to update automatically.

Thank you to everyone who contributed to WordPress 5.0.3:

Aaron Jorbin, Alex Shiels, allancole, Andrea Fercia, Andrew Nevins, Andrew Ozz, Birgir Erlendsson (birgire), bobbingwide, Csaba (LittleBigThings), David Binovec, David Herrera, Dominik Schilling (ocean90), Felix Arntz, Gary Pendergast, Gerhard Potgieter, Grzegorz (Greg) Ziółkowski, Jb Audras, Job, Joe McGill, Joen Asmussen, John Blackbourn, Jonathan Desrosiers, kjellr, laurelfulford, Marcus Kazmierczak, Milan Dinić, Muntasir Mahmud, Nick Halsey, panchen, Pascal Birchler, Ramanan, Riad Benguella, Ricky Lee Whittemore, Sergey Biryukov, Weston Ruter, and William Earnhardt.

PHP AES GCM Encryption SIV

Package:
PHP AES GCM Encryption SIV
Summary:
Encrypt data with pure PHP code for Rijndael AES
Groups:
Cryptography, PHP 5
Author:
Jose Luis Lucas
Description:
This class can encrypt data with pure PHP code for Rijndael AES-GCM_SIV...

Read more at https://www.phpclasses.org/package/11021-PHP-Encrypt-data-with-pure-PHP-code-for-Rijndael-AES.html#2019-01-09-10:28:38

Fruits and Vegetables – The Good Carbs

One interesting line I heard once has stuck with me for years when it comes to carbohydrates,

“If it is white, don’t eat it”

Well that may be true for a few reasons that I wanted to cover today. When we eat carbs they tend to come in all colors, fruit has all sorts of colors, vegetables have all sorts of colors and bread, rice and potatoes some in one color often and that is white.

So why should we avoid all of those white carbohydrates? There are two ways that colored carbs are better than white carbs but I don;t think that we really ever hear why…so I will tell you now

White carbohydrates are low in water

Fruits and Vegetables - The Good Carbs

Carb Loading Foods

If you are looking for a way to lose then you are going to have to eat high water foods. I have not written about this too much in the past but fruit and all colored veggies like peppers or broccoli and other classic fruits and vegetables are high in water which will fill you up with less calories. Having high water foods to eat also means that your body will be better hydrates with these lower calorie foods but this is not the only great reason to eat colored fruits and vegetables, you also need them because….

White carbohydrates are low in nutrients

If you think about rice or potatoes and even white breads then you also thing about foods that are devoid of many nutrients. Vegetables are very high in minerals and fruits are very high in vitamins. I know that this is a generalization but I don’t think I have ever heard of someone getting healthier by eating bread, rice and potatoes but anyone can get healthier by eating more fruits and vegetables

FDA says OK to Prilosec and Nexium

Earlier this year there were some stories around about fears that Prilosec and Nexium may not be quite as healthy as they should be for people taking them for dealing with acid reflux disease and that they increased heart attack risk. The FDA is now saying that there are no increased risk of heart attacks with these drugs in the long term

Long-term use of Prilosec (omerprazole) and Nexium (esomeprazole) is not likely to be associated with an increased risk of heart problems.

FDA has completed a comprehensive, scientific review of known safety data for both drugs, which are used to treat the symptoms of gastroesophageal reflux disease (GERD) and other conditions caused by excess stomach acid. While long-term studies reported to the agency on May 29, 2007, collected safety data, the study protocols did not specify how heart problems, such as heart attacks, were defined or verified. As a result, evaluating the information that was gathered about the safety of both drugs in these studies was challenging.

FDA’s assessment of the information from the data gathered was further supported by an additional analysis of 14 comparative studies of Prilosec, four of which were placebo-controlled (an inactive substance was used). Although these studies were not specifically conducted to assess the risk of heart problems, and patient follow-up was incomplete, they do not suggest an increased risk of heart problems with the use of Prilosec or its newer formulation Nexium.

Based on everything now known at the agency, the reported difference in the frequency of heart attacks and other heart-related problems seen in the earlier analyses of two small long-term studies does not indicate the presence of a true effect. This represents the agency’s current analysis of available data on these medications.

FDA recommends that health care providers continue to prescribe–and patients continue to use–Prilosec and Nexium as described in the labeling for the two drugs.

Article source: https://www.fitnesstipsforlife.com/fda-says-ok-to-prilosec-and-nexium.html

MySQL examples in Node.js

If you’re integrating your Node.js service with MySQL, you probably want to execute queries.

I’ve seen a fair bit of ugly code to do this, often using callbacks. I thought I would share some of my own patterns here. Maybe this is useful to others to read.

I don’t typically use ORM’s. If you’re already happy with sequalize, this article is probably not for you.

Prequisites

The most popular NPM package for MySQL is mysql, but I use the mysql2 package instead.

The mysql2 package is also very popular, but has a few advantages. The advantage I care about is support for promises. The authors of this package have actually teamed up with the authors of the mysql package to reduce double efforts, and was made to be compatible with mysql so for many people it’s a drop-in replacement.

Creating a pool

const mysql = require('mysql2/promise');
const pool = mysql.createPool({
  host: 'localhost',
  user: 'root',
  database: 'test',
  waitForConnections: true,
  connectionLimit: 10,
  queueLimit: 0
});

A pool manages multiple connections. I create a pool once per node.js server.

Note: if you are migrating from the mysql to mysql2 package, you probably don’t want to require mysql2/promise. You can instead require mysql2 to get full backwards compatibility and use the promise() functions to get access to promisified versions of the APIs.

Note2: mysql2 uses the utf8mb4 charset by default. If you don’t know what this means trust that it’s the right choice. If you do know what this is, rejoice that somebody finally picked a sane default.

Executing a SELECT query

Generally I don’t need transactions for SELECT queries, because of this I can simply ask the pool to execute the query.

async function getBlogPost(id) {

  const result = await pool.query('SELECT * from posts WHERE id = ?', [id]); 
  if (!result[0].length < 1) {
    throw new Error('Post with this id was not found');
  }
  return result[0][0];

}

Truncated by Planet PHP, read more at the original (another 15105 bytes)

Powered by Gewgley