Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
The Ultimate Guide to Deploying PHP Apps in the Cloud
May 12, 2017 @ 17:18:59

On the SitePoint PHP blog author Prosper Otemuyiwa shares what they call the ultimate guide to deploying PHP apps in the cloud with examples for Heroku, Google Cloud, IBM BlueMix, Microsoft Azure, Amazon Web Services and Laravel Forge.

There is a popular mantra amongst developers that goes like this write, test and deploy. In this tutorial, I’ll show you how to deploy your PHP apps to different cloud server platforms such as Google Cloud, Microsoft Azure, Heroku, IBM Bluemix, and others.

Cloud servers are basically virtual servers that run within a cloud computing environment. There are various benefits to hosting and deploying your applications in the cloud. [...] In fact, many companies have moved their infrastructure to the cloud in order to reduce cost and complexity. It’s a great option for small, mid-sized, and enterprise scale businesses. If you write a lot of tutorials and do POCs (Proof-of-concepts) like me, it’s also a great choice for you!

He starts off by covering the technologies that will be involved in each deploy: Linux, Apache, MySQL and of course PHP. Then, for each of the platforms previously mentioned, he goes through the setup and configuration of the same functionality. Most include screenshots of the UI in the service setting up the account and application. He also links to two tools that can make it easier to deploy your actual application to these newly configured cloud instances: Envoyer and Deployer.

tagged: guide deploy application cloud google bluemix azure aws forge

Link: https://www.sitepoint.com/ultimate-guide-deploying-php-apps-cloud/

Kevin Schroeder:
(Almost) Stupid Easy PHP Integration with Active Directory on Azure
Apr 12, 2017 @ 17:31:04

Kevin Schroeder has a new post to his site showing an (almost) stupid easy Active Directory integration method on the Windows Azure service via PHP.

There is something nice about simply having to go to one company and say “I need X” and, lo, you have it. Clearly that’s an over-simplification and, to some degree, a lie, but for the Microsoft developers I’ve talked to who have had to make the switch to PHP that is one of the things that they have said the liked better about Microsoft.

This is a simple library that uses the league/oauth2-client to provide OAuth2 based integration with Active Directory. Out of the box it is configured to work with Active Directory on Azure but, though I haven’t tested it, you can provide a different configuration object to the primary adapter and you should be able to authenticate against any Active Directory implementation as long as it has OAuth2 connectivity.

If you haven't worked with Azure's Active Directory before, he includes an instructional video of how to get it set up first. With that in place he shows an example of using the library to make the authentication request to the AD server and how to log back out. He also includes the code you'll need to configure the library via the Magium Configuration Manager or, for those without Magento experience, with some alternate methods: PHP arrays, JSON, YAML or INI files.

tagged: integration activedirectory azure package example tutorial

Link: http://www.eschrade.com/page/almost-stupid-easy-php-integration-with-active-directory-on-azure

Zend Developer Zone:
Introspecting your Code with Z-Ray for Azure
Jan 13, 2016 @ 18:38:38

On the Zend Developer Zone blog Daniel Berman has posted a guide showing how to use their Z-Ray plugin to inspect code running on Azure for statistics around performance, queries and errors thrown by the code.

Quick experimentation, easy collaboration, automated infrastructure and scalability, together with advanced diagnostic and analytical tools – all provide PHP developers with good reasons to develop in the cloud.

[...] The combination of Z-Ray and the Azure cloud means PHP developers building apps on the Azure web app service get the best of both worlds – Z-Ray’s powerful introspection capabilities and Azure’s rich cloud infrastructure.

The post walks you through the steps to create a new Azure-based web application, how to upload your code and enable the Z-Ray feature directly from the Azure "Tools" menu. The Z-Ray toolbar is then automatically injected into your application for your immediate profiling needs.

tagged: azure microsoft hosting zray profiling tool interface tutorial

Link: http://devzone.zend.com/7093/introspecting-code-with-z-ray-for-azure/

SitePoint PHP Blog:
Debugging WordPress on Azure with Z-Ray
Oct 13, 2015 @ 16:23:55

On the SitePoint PHP blog there's a tutorial showing you how to integrate the Z-Ray tool into WordPress to make debugging it on an Azure instance simpler. The steps make major use of the Azure control panel handling, so it's not quite as useful as a cross-platform guide but at least it gives you an idea of what you could expect from the Z-Ray+WordPress integration.

We all know that WordPress is an amazingly rich, extendable and simple platform. That’s probably one of the reasons it powers so much of the web today. But in some cases this richness can be the downfall of your site. [...] This means you need an easy, safe and reliable way to profile your WordPress app that will help you identify the bottlenecks slowing it down.

This article demonstrates a simple way to do just this. It describes how to debug a WordPress application deployed on Microsoft Azure’s web app service, using Z-Ray for Azure – a new technology that was announced a few months ago and is now in preview mode.

He walks you through the entire process (assuming you already have an account on Azure:

  • Creating the sample WordPress application on Azure
  • Enabling Z-Ray
  • Developing WordPress with Z-Ray

In that last step he includes some screenshots of the kinds of results you can expect from the plugin including details about cache objects, plugin statistics, hooks being executed and WP Query use. He ends the post looking at using Z-Ray for mobile debugging and how to use it in "secured mode" in a production environment.

tagged: tutorial wordpress azure microsoft zray debugging installation configuration

Link: http://www.sitepoint.com/debugging-wordpress-on-azure-with-z-ray/

Michelangelo van Dam:
Running Apigility on Azure
Nov 21, 2014 @ 17:55:15

Michelango van Dam has a new post on his site today walking you through the process of running Apigility on Windows Azure. Apigility is a project from Zend that makes creating and maintaining APIs much simpler (based on the Zend Framework).

Since a couple of years I've been a fan of Microsoft Azure, the cloud platform by Microsoft. It offers a platform as a service (PaaS) in the form of Azure Websites which makes it a great solution to prototype and to play with new stuff. Last year Matthew Weier O'Phinney announced Apigility at ZendCon, a manager for API design. It was immediately clear that it would revolutionise the way we would design and manage REST API's.

Michelangelo walks you through the entire process, starting locally. He shows you how to clone and set up the latest version of Apigility and create a basic endpoint named "demo". He adds in a bit of code to handle the API request (returning user data) and includes an example of what the REST request looks like. With that up and running, he moves on to the Azure side of things. He shows you how to create a "web.config" file to configure the Azure server and run Composer as the install is being processed. He helps you get an Azure account set up and shows how to set up the website instance where you'll deploy the application, pointing it to a GitHub repository as a deploy source.

tagged: apigility windows azure deploy tutorial introduction rest api

Link: http://www.dragonbe.com/2014/11/running-apigility-on-azure.html

Voices of the ElePHPant:
Interview with Mark Brown
Jan 21, 2014 @ 16:44:43

The Voices of the ElePHPant podcast has released their latest community interview today, this time with Mark Brown, a community evangelist for Windows Azure.

They talk some about the Windows Azure product and what kind of functionality it can currently offer PHP developers and applications. He talks some about the operating systems they've made available on the platform and the "community" virtual machine images. These run anything from a regular LAMP stack out to installed applications (like Drupal or WordPress). They also discuss the Azure target markets and how it can help make developers' lives easier.

You can listen to this latest episode either through the in-page player or by downloading the mp3 directly. You can also subscribe to their feed.

tagged: voicesoftheelephpant community interview markbrown windows azure

Link: http://voicesoftheelephpant.com/2014/01/21/interview-with-mark-brown/

SitePoint PHP Blog:
Translation and Text-to-Speech with Microsoft Translator
Dec 05, 2013 @ 15:19:29

On the SitePoint PHP blog today there's a new tutorial showing you how to combine the Microsoft Azure platform services with their Translator API to create a text-to-speech translation service with some simple curl calls.

Text to speech is a popular technique used by many websites to provide their content in an interactive way. The generation of artificial human voice is known as Speech Synthesis. Even though it's highly popular, there are very few speech synthesis services, especially when looking for those free of charge. Microsoft Translator is one of the services we can use to get a speech service with limited features. In this tutorial, we are going to look at how we can use Microsoft Translator API to translate content and then make audio files using said content.

He walks you through setting up an Azure application (you'll need an account for the marketplace already) and how to subscribe to the translation service. It's a paid service but there's a "try before you buy" level that allows 2,000,000 characters of translation before it's cut off - perfect for testing. He includes the PHP to make the requests to the Translation API via curl. Included is code to initialize the configuration for the request, get the correct tokens and a reusable method for making the actual translation request. Finally, an example of doing the actual text-to-speech conversion is shown, resulting in an mp3 file.

He also includes an example of a simple frontend UI. You can see a working demo of the script here.

tagged: microsoft translator api texttospeech text speech tutorial azure service

Link: http://www.sitepoint.com/translation-text-speech-microsoft-translator/

Maarten Balliauw:
Working with Windows Azure SQL Database in PhpStorm
Feb 25, 2013 @ 15:13:20

Maarten Balliauw has a new post to his site showing how you can work with a Azure SQL database directly from the UI of the popular PHP IDE, phpStorm.

PhpStorm provides us the possibility to connect to Windows Azure SQL Database right from within the IDE. In this post, we’ll explore several options that are available for working with Windows Azure SQL Database: Setting up a database connection, creating a table, inserting and updating data, using the database console, generating a database diagram and database refactoring.

He includes the instructions and several screenshots showing each step of the above mentioned steps. The database diagram gives you a good overall view of your database structure and allows you to show a visualization of how the tables relate to each other. Note that, though this particular example shows it connecting to an Azure SQL database, the same setup can be used with lots of popular RDBMS out there.

tagged: phpstorm windows azure sql database ui interface setup

Link:

Ruslan Yakushev:
PHP Troubleshooting in Windows Azure Web Sites
Jan 31, 2013 @ 16:19:16

In the latest post to his site, Ruslan Yakushev looks at some simple ways you can debug your PHP-based applications running on a Windows Azure platform.

The need to diagnose and troubleshoot application’s failures often comes up during deployment to a hosting environment. Some configuration settings in hosting server may differ from what application expects. Often it is not as easy to figure out the cause of the problem in a hosting environment as it is on a development machine. I found the following techniques useful when troubleshooting errors in PHP applications hosted in Windows Azure Web Sites.

He shares seven different tips, some pretty simple, others a bit more difficult requiring other software to be up and working:

  • Using phpinfo()
  • Checking the wincache settings
  • Looking at your error logs
  • Turning on the display_errors setting
  • Turning on HTTP logging, detailed errors and failed request tracking in the control panel
  • Using XDebug
  • Getting the statistics for your ClearDB instance
tagged: windows azure platform debug tips settings logs configuration

Link:

Maarten Balliauw:
Running unit tests when deploying to Windows Azure Web Sites
Jan 30, 2013 @ 16:25:20

Maarten Balliauw has a new post to his site showing you how to execute your unit tests (in this case PHPUnit) when you deploy your instance out to the Windows Azure platform.

When deploying an application to Windows Azure Web Sites, a number of deployment steps are executed. For .NET projects, msbuild is triggered. For node.js applications, a list of dependencies is restored. For PHP applications, files are copied from source control to the actual web root which is served publicly. Wouldn’t it be cool if Windows Azure Web Sites refused to deploy fresh source code whenever unit tests fail? In this post, I’ll show you how.

He creates a super basic script using Silex and writes up a test with some dummy assertions, checking if true equals true. He then steps you through updating the current "deploy.sh" script to add in a call to execute PHPUnit and an "exitWithMessageOnError" statement. This statement kicks it back and causes the deployment to fail when tests don't pass (as seen here).

tagged: windows azure phpunit unittest execute deploy fail

Link:


Trending Topics: