Posted on Leave a comment

Workaround for Bower Version Deprecation

As of June 25, the version of Bower shipped with Visual Studio was deprecated, resulting in Bower operations failing when run in Visual Studio. If you use Bower, you will see an error something like:

EINVRES Request to https://bower.herokuapp.com/packages/bootstrap failed with 502

This will be fixed in Visual Studio 15.8. In the meantime, you can work around the issue by using a new version of Bower or by adding some configuration to each Bower project.

The Issue

Some time, ago Bower switched their primary registry feed but continued to support both. On June 25th, they turned off the older feed, which the copy in Visual Studio tries to use by default.

The Fix

There are two options to fix this issue:

  1. Update the configuration for each Bower project to explicitly use the new registry: https://reigstry.bower.io
  2. Manually install a newer version of Bower and configure Visual Studio to use it.

Workaround 1: Define the new registry entry in the project’s Bower config file (.bowerrc)

Add a .bowerrc file to the project (or modify the existing .bowerrc) with the following content:

{
 "registry": "https://registry.bower.io"
}

With the registry property defined in a .bowerrc file in the project root, Bower operations should run successfully on the older versions of Bower that shipped with Visual Studio 2015 and Visual Studio 2017.

Workaround 2: Configure Visual Studio to point to use a newer version of Bower

An alternative solution is to configure Visual Studio use to a newer version of Bower that you have installed as a global tool on your machine. (For instructions on how to install Bower, refer to the guidance on the Bower website.) If you have installed Bower via npm, then the path to the bower tools will be contained in the system $(PATH) variable. It might look something like this: C:\Users\[username]\AppData\Roaming\npm. If you make this path available to Visual Studio via the External Web Tools options page, then Visual Studio will be able to find and use the newer version.

To configure Visual Studio to use the globally installed Bower tools:

  1. Inside Visual Studio, open Tools->Options.
  2. Navigate to the External Web Tools options page (under Projects and Solutions->Web Package Management).
  3. Select the “$(PATH)” item in the Locations of external tools list box.
  4. Repeatedly press the up-arrow button in the top right corner of the Options dialog until the $(PATH) item is at the top of the list.
  5. Press OK to confirm the change.

Configure External Web Tools Path
Ordered this way, when Visual Studio is searching for Bower tools, it will search your system path first and should find and use the version you installed, rather than the older version that ships with Visual Studio in the $(VSINSTALLDIR)\Web\External directory.

Note: This change affects path resolution for all external tools. So, if you have Grunt, Gulp, npm or any other external tools on the system path, those tools will be used in preference to any other versions that shipped with VS. If you only want to change the path for Bower, leave the system path where it is and add a new entry at the top of the list that points to the instance of Bower installed locally. It might look something like this: C:\Users\[username]\AppData\Roaming\npm\node_modules\bower\bin

We trust this will solve any issues related to the recent outage of the older bower registry. If you have any questions or comments, please leave them below.

Happy coding!

Justin Clareburt, Senior Program Manager, Visual Studio

Justin Clareburt (justcla) Profile Pic Justin Clareburt is the Web Tools PM on the Visual Studio team. He has over 20 years of Software Engineering experience and brings to the team his expert knowledge of IDEs and a passion for creating the ultimate development experience.

Follow Justin on Twitter @justcla78

Posted on Leave a comment

PHP 7.3.0 alpha 1

Hi all! PHP team is glad to announce the release of the first PHP 7.3.0 pre-release version, PHP 7.3.0 Alpha 1. This starts the PHP 7.3 release cycle, the rough outline of which is at: https://wiki.php.net/todo/php73 The source code can be downloaded from: https://downloads.php.net/~stas/ Please carefully test this version and report any issues found in the bug reporting system at http://bugs.php.net Please DO NOT use this version in production, it is an early test version. The next release would be Alpha 2, planned for June 21. The signatures for the release can be found at: https://gist.github.com/smalyshev/b0994d4dd138007237911429702ee040 or below: php-7.3.0alpha1.tar.gz SHA256 hash: bf3d089d876ac817aecd6afca7ef801cda5c809d4954871e8e6be38bea656f2c PGP signature: -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iF4EABEIAAYFAlsYI5EACgkQL3lWvF2gS13VYQD8CRnpb3777zrkHN9NAgCjv9xX z4jBKIT7s4bxKpnlqh8A/jyhy9Ru6MoZkUwZWgE4FOTesW4Q50G1NCEuotLbTwOa =87pc -----END PGP SIGNATURE----- php-7.3.0alpha1.tar.bz2 SHA256 hash: 8e27df8cf9db49cd2b56fa545b962e8f9ff31889c5429f77b4cf7d94ddab5a09 PGP signature: -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iF4EABEIAAYFAlsYI5sACgkQL3lWvF2gS13hZwEAkNyCRGLkdyWcEH9RgU7Y57+o FBYHNCvfHRnehyJEoiUA/3oUmXbevgVyIGnsrWnZ+LKeoroRJZ9ny5zT2Mo0AThL =N+jd -----END PGP SIGNATURE----- php-7.3.0alpha1.tar.xz SHA256 hash: a229d0bf48a3f91d1751ec859473abc70e7fd0f6befc2dc6578b3a128bd0e025 PGP signature: -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iF4EABEIAAYFAlsYI6MACgkQL3lWvF2gS12/XQD+NmLWvxAaTix94G8M80WoEULg 5EEnnuBCzOyr/PsudFEBAIRZ5wYMGqDma35LeZQ6rmCMJX0mPnYoqxL/kK3GdeyG =PQW8 -----END PGP SIGNATURE----- Thanks, Your friendly neighborhood PHP 7.3 RMs
Posted on Leave a comment

A Penny Saved is a Ton of Serverless Compute Earned

Scott Guthrie recently shared one of my favorite anecdotes on his Azure Red Shirt Tour. A Microsoft customer regularly invokes 1 billion (yes, that’s with a “B”) Azure Functions per day. The customer reached out to support after the first month thinking there was a bug in the billing system, only to find out that the $72 was in fact correct. How is that possible? Azure Functions is a serverless compute platform that allows you to focus on code that only executes when triggered by events, and you only pay for CPU time and memory used during execution (versus a traditional web server where you are paying a fee even if your app is idle). This is called micro-billing, and is one key reason serverless computing is so powerful.

Curious about Azure Functions? Follow the link https://aka.ms/go-funcs to get up and running with your first function in minutes.

Scott Guthrie Red Shirt

Scott Guthrie on the Azure Red Shirt Tour

In fact, micro-billing is so important, it’s one of three rules I use to verify if a service is serverless. There is not an official set of rules and there is no standard for serverless. The closest thing to a standard is the whitepaper published by the Cloud Native Computing Foundation titled CNCF WG-Serverless Whitepaper v1.0 (PDF). The paper describes serverless computing as “building and running applications that do not require server management.” The paper continues to state they are “executed, scaled, and billed in response to the exact demand needed at the moment.”

It’s easy to label almost everything serverless, but there is a difference between managed and serverless. A managed service takes care of responsibilities for you, such as standing up a website or hosting a Docker container. Serverless is a managed service but requires a bit more. Here is Jeremy’s Serverless Rules.

  1. The service should be capable of running entirely in the cloud. Running locally is fine and often preferred for developing, testing, and debugging, but ultimately it should end up in the cloud.
  2. You don’t have to configure a virtual machine or cluster. Docker is great, but containers require a Docker host to run. That host typically means setting up a VM and, for resiliency and scale, using an orchestrator like Kubernetes to scale the solution. There are also services like Azure Web Apps that provide a fully managed experience for running web apps and containers, but I don’t consider them serverless because they break the next rule.
  3. You only pay for active invocations and never for idle time. This rule is important, and the essence of micro-billing. ACI is a great way to run a container, but I pay for it even when it’s not being used. A function, on the other hand, only bills when it’s called.

These rules are why I stopped calling managed databases “serverless.” So, what, then, does qualify as serverless?

The Azure serverless platform includes Azure Functions, Logic Apps, and Event Grid. In this post, we’ll take a closer look at Azure Functions.

Azure Functions

Azure Functions allows you to write code that is executed based on an event, or trigger. Triggers may include an HTTP request, a timer, a message in a queue, or any other number of important events. The code is passed details of the trigger but can also access bindings that make it easier to connect to resources like databases and storage. The serverless Azure Functions model is based on two parameters: invocations and gigabyte seconds.

Invocations are the number of times the function is invoked based on its trigger. Gigabyte seconds is a function of memory usage. Image a graph that shows time on the x-axis and memory consumption on the y-axis. Plot the memory usage of your function over time. Gigabyte seconds represent the area under the curve.

Let’s assume you have a microservice that is called every minute and takes one second to scan and aggregate data. It uses a steady 128 megabytes of memory during the run. Using the Azure Pricing Calculator, you’ll find that the cost is free. That’s because the first 400,000 Gigabyte seconds and 1 million invocations are free every month. Running every second (there are 2,628,000 seconds in a month) with double memory (256 megabytes), the entire monthly cost is estimated at $4.51.

Azure Functions pricing

Pricing calculator for Azure Functions

Recently I tweeted about my own experience with serverless cost (or lack thereof). I wrote a link-shortening tool. It uses a function to take long URLs and turn them into a shorter code I can easily share. I also have a function that takes the short code and performs the redirect, then stores the data in a queue. Another microservice processes items in the queue and stores metadata that I can analyze for later. I have tens of thousands of invocations per month and my total cost is less than a dollar.

Link shortener stats

A tweet about cost of running serverless code in Azure

Do I have your attention?

In future posts I will explore the cost model for Logic Apps and Event Grid. In the meantime…

Learn about and get started with your first Azure Function by following this link: https://aka.ms/go-funcs

Posted on Leave a comment

PHP 5.6.36 is available

 Hello! The PHP development team announces the immediate availability of PHP 5.6.36. 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.36 please visit our downloads page: http://www.php.net/downloads.php Windows binaries can be found on http://windows.php.net/download/. The list of changes is recorded in the ChangeLog: http://www.php.net/ChangeLog-5.php#5.6.36 To verify the downloads, you can use the following information: php-5.6.36.tar.bz2 SHA256 hash: 626a0e3f5d8a0e686a2b930f0dd3a0601fe3dcb5e43dd0e8c3fab631e64e172a PGP signature: -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJa37ZtAAoJEMK/C8Qzz8iz8XQIAIhmNbsUrGxGKoyP37zzVxby 7zTYsRfZt2sOw+tLaBj15co95ncc86UATph6stDWyVaVp+CNlLF1Sh0TpDJOuiBO HrUWmMrOM7R4gaI2P22HD7d+zvZJLzgwtkaQ6+jrt2qhr5wPqBky3B321FMREnYA FLq13pb2hHSCLfeuYKZe2+KBouOmDFCi0+VKy8PdhHYAbMbbMFHGaVMEWwbr8Ulv oqozMa4STTmMpzdOc/6rMSFcQ01dndTQGuq3AelHtwkb7rus0I11S4CrwsEsV24F 6RIOJ7ORcNDIxCe/xF+mPOE2rvJTNbQxinrGEFduNN8NPP/6RsZ6ZfCIiA6hrxs= =rtkh -----END PGP SIGNATURE----- php-5.6.36.tar.gz SHA256 hash: 06086a8b6a9964ef8009c4d9176b4eeb0c564ea39c1213f015e24f3466d2d69f PGP signature: -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJa37ZyAAoJEMK/C8Qzz8izIYYH/18ltAzkrqLP+5m0MPZKJNH8 oISnKo4dB6i6PdSl65Pw6EqfgA8sEU6NGztSi82bysPMm9pvZn7hv1zhOISaqsUP GeUCcq+5poN/saymlmsjtF7cB/RyhiMKBDJ9yQkIuLR8dxcaY4YkwKx6lNKjYme5 k7TlnQc4YVFuukDZhLWYfvEJDyrKtYNCnXDpfcxIFiV9oqYWzSvR8oOoxkDJE5Qu q/eSoXUFeiXJLp4DL/38ph+z5+YhtjqDMJN2sJ18PVFWHRHtOuvMsPm3dy4l49di oyBoA5PxLA7rAjy0evaig6CrJPOOFKv2Zjc+5vB9bXFjKG8OR1Tbk6N3BFaNrHk= =6vkh -----END PGP SIGNATURE----- php-5.6.36.tar.xz SHA256 hash: 18f536bf548e909b4e980379d0c4e56d024b2b1eb1c9768fd169360491f1d6dd PGP signature: -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJa37Z3AAoJEMK/C8Qzz8izUa8IAJyMUOUk2jpYEg9+xarMFLYE tzt703TMjq3cIIyt9ds1hNU64MBC/y+Pzg5RTQAkG2XD88pwN5B3NwUp2KAgbXsQ TKtw+ymMJ/JFk6X4qh0Xx8R4MT8CTU3ZoUMY5WBVa3CbFy9PFMhMrJK6KnM+ATcJ 6cV2jE0Ca5c5ENWgkfNmPlSMjCni/dzPRrfBySbJpRuDbNkfY3AGngr2E1k/WKR7 VwgVIcdGgnJMf3x2NIxokr2gQcShhY7SE5hqflsG7099yIel51pSOxoGuSWOfq4j mBx0bLB39uyUm69HasZR518fgpZJOyE3R9iDsF1itaWbfG66/1h02HNJKjD9FHU= =cf+7 -----END PGP SIGNATURE----- Julien Pauli & Ferenc Kovacs
Posted on Leave a comment

PHP 7.2.5 Released

Hi, The PHP development team announces the immediate availability of PHP 7.2.5. 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.5 please visit our downloads page. Windows binaries can be found on the PHP for Windows site. The list of changes is recorded in the ChangeLog. Release Announcement: http://php.net/releases/7_2_5.php Downloads: http://www.php.net/downloads Windows downloads: http://windows.php.net/download Changelog: http://www.php.net/ChangeLog-7.php#7.2.5 Many thanks to all the contributors and supporters! Sara Golemon, Remi Collet php-7.2.5.tar.gz SHA256 hash: c198aedd4cd16db0803e0ef955036722a1f4ce9ad3827546709fac05f1567ba5 PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJa30kSAAoJENyf+NPuWvJ/qqkP/icRqp7mRXn3Gm2uq+oacW6z mRm0NTPPxXV6eGPiQs5NPDfCdqSQ61oIA5iw+3FjET0Cf/8c/gAB7KWC04dl4BPR mv9yms8YtMd8FZPhrzO0lqwnCrPuULAjvSiOllziNVnm+hX52mKcWxGN3O4Ic44b 2yTwQ4/p7kMDCMwAWS3584GPOkk04zTOahFUGQf7LIT0+zYMlEXnJcsclEge5C7N htIokbs3x8jFs94mvWgNLIl9povxLD1VpNnKNEx4VduEHpkXQLlMkkqaeK+ysAep fJ+APqUiv+chbisG+b3GF+zBuCi9Uzecd7cg/UwbyE11e0gqaYC5/QrxYyy8YW3a JI8gSGBC7iwfuBguGWLIWEA8a74JZ/GDAGOgjD6+DG5EqQmzgZudmcZnF9nF1qMD PORmwNsQJq4tom5ORQmRbu8XRPfg67sLe6aUYlw59/MCuESUpHD9EOD4a0dRolTo 3kJzK6+1rwKtmMhIM63Jqk6uSwXjt/WM9ypRSgDX2/5BFxzYRAexkyrPzkdMsGVF 0q9DBTWi7a7kYMAWBDVQ4p0Cn4U5L/4/zB2fuS/8lUfA8xntcodLFSphzCNxjjwW Ut6o6uk8PagniWC5jD+RqG8Wggbnf6oLRyv8sw+P7C3h+w54LeRtl6lPmLLVorvJ HiuUmonSgu+ZwukjNxhz =woFY -----END PGP SIGNATURE----- php-7.2.5.tar.bz2 SHA256 hash: f3820efa8efa79628b6e1b5b2f8c1b04c08d32e6721fa1654039ce5f89796031 PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJa30kWAAoJENyf+NPuWvJ/YgUP/j1cTSFC2MBFZCwWq9r8bmBf 6Nhv1n2NZsczWODwK1DCDJK9xoXOhFYcDP8uWDiJalRMbVQHiMqyS5FF9x7cU8Xo C5uXIAjdL0wzQDhEokB+oMq+x61OJQYWfr49spXwDbu/iyGWNn90wRbd25/+mfuT GnfeLmO+pzyzNPm+vr2iHxbpOdafzRKdYgw9BML/eMF+dwCb6mnbgBhwbn2ZWGaZ E5AGTvYJTajbbmdWu4h+30KDxmQjqWNA8kk/Qw6+0ppNhtzvjLDH5pR/KePn/6/X oshu5zzSyf9Zn4WemgR61ocVmY8UYHphEajuNCJQyE2nYiDaOj+K+cpxasj7J2up iSlOMS6eWy6LrJyxVVzYqm3DghVtvLiuLsn6khGtnCwaT/4TzytQpteLK4hqGKZi vyqTZZPbZigpQLrpCKhuSU1u+UcUpmxUJvqLPENziW/Rsrci9c9iwZx39zrOmXQO BKWiK5K5W0ojl7wAVo8Oxh56Gj7BxzTMehC0AfjZtdCTyo+AfrgTJ4HJK43n1rPw kLIIC8Y87337G2znP0yjGgTuMJa4mjSeFdAFdA6MEVOM4JkEwIaYZfsnsYnkqKDn uG8kc4CR3Y1X3TRQ6EDE8ifogtMv/V7cn09vavqZddn3g/GByD+n1ZS2DvWj8xVq hQVAif1hK45zLNg6ZJeT =v15G -----END PGP SIGNATURE----- php-7.2.5.tar.xz SHA256 hash: af70a33b3f7a51510467199b39af151333fbbe4cc21923bad9c7cf64268cddb2 PGP signature: -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJa30kZAAoJENyf+NPuWvJ/4qkP/RjEFunVEN+qKXXFqUTBD4Fs fHPQMCYlB1ipYLUC3MJy3pXYz6eUeOtjkk/X4Ty+sObxUS6w6w5cDoL72bqsVRdn 6l0EYCMWoKBCJPlQCv3cKi9NwmHX2+TRE1HpR247GtIw5nt/7gnbtpx4ANXVeMEZ U1KrPe3HPDbGVB/O0vp+9yVcY+z5+ymyrhVg+L5A5cITaQjwd/jepJl270G5oPN6 3mCgVwRp6xyJQCNeeboJszLMjRbMfPTb7mdCf09tyv32lUiCltTXwkO/xr0F7I8i Pz5GH6mBZHvG4VYjLK+tvx3zOJvTO0GzpED1I6vMqA7SMxA7XMhWyxbQfZfMx4XZ JvR9KtnRVMMTq3hXmKbFiRGphnIlZL1INs5ADTltIxPyVSDYo2baLGHW9RzNYkcR 2eG0ZWE9qQ5PkGGrsxDl++1bT/9nbYvJ08mfqjYW8OS1+5GAV3fl3B7FTCqcj0fp q2TC0mgxK9ZQtf2+PijJvL8KmE+g3ptkH0NgsiUt5tsf0rdIJUIVm1BX+W9NSoQR z/kAcBWC0wTs/j/es3SLV5Tok02qfQ3eHvtvEEMrTxHpXdE6xCqv6M5rpt0N7GWO zTNeUoptnQmAWDfx/ll8xcxWSfjWedRiSJXD9Iw45L95mVjpWHH4tVNvHlWwNNJz S6U7zEsQW6kvnnOCtLTR =li6E -----END PGP SIGNATURE-----