News Feed
Jobs Feed
Sections




News Archive
feed this:

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

AWS PHP Development:
Testing Webhooks Locally for Amazon SNS
April 08, 2014 @ 11:33:07

In a previous post the AWS for PHP blog showed how to set up webhooks for handling the callbacks from their SNS messaging service. In this next part of the series they continue the process, showing how you can test these hooks locally without needing to actually send the messages. This eliminates the need to deploy to a public-facing server just to test the hooks every time you need an update.

In a recent post, I talked about Receiving Amazon SNS Messages in PHP. I showed you how to use the SNS Message and MessageValidator classes in the AWS SDK for PHP to handle incoming SNS messages. The PHP code for the webhook is easy to write, but can be difficult to test properly, since it must be deployed to a server in order to be accessible to Amazon SNS. I'll show you how you can actually test your code locally with the help of a few simple tools.

Using PHP's own built-in webserver and a tool called ngrok to tunnel from the public internet to a local server. He includes the commands to set up the PHP script directory, the code to intercept the POSTed data from the request, validate it and send the subscription confirmation request. He helps you create an SNS "topic" through the management console and walks you through a sample test request while tailing the logs.

0 comments voice your opinion now!
aws amazon sns webhook testing local server ngrok tutorial

Link: http://blogs.aws.amazon.com/php/post/Tx2CO24DVG9CAK0/Testing-Webhooks-Locally-for-Amazon-SNS

AWS PHP Development:
Receiving Amazon SNS Messages in PHP
April 01, 2014 @ 10:53:14

The Amazon Web Services PHP Development blog has a new post from Jeremy Lindblom showing you how you can receive inbound SNS messages via a webhook on your application.

Amazon Simple Notification Service (Amazon SNS) is a fast, fully-managed, push messaging service. Amazon SNS can deliver messages to email, mobile devices, Amazon SQS queues, and HTTP/HTTPS endpoints. [...] Though you can certainly subscribe your email address to receive SNS messages from service events like these, your inbox would fill up rather quickly. There is great power, however, in being able to subscribe an HTTP/HTTPS endpoint to receive the messages. This allows you to program webhooks for your applications to easily respond to various events.

Using the AWS SDK for PHP you can set up a listening script that can receive the message and handle subscription confirmations, message signature validation and handling the notifications.

0 comments voice your opinion now!
amazon aws sns message receive webhook sdk

Link: http://blogs.aws.amazon.com/php/post/Tx2G9D94IE6KPAY/Receiving-Amazon-SNS-Messages-in-PHP

Till Klampaeckel:
Speeding up composer on AWS OpsWorks
October 09, 2013 @ 12:10:25

Till Klampaeckel has a new post today showing how to get your Composer installation (and package install) to work a bit faster on the Amazon AWS OpsWorks management system.

At EasyBib, we're heavy users of composer and AWS OpsWorks. Since we recently moved a lot of our applications to a continuous deployment model, the benefits of speeding up the deployment process (~4-5 minutes) became more obvious.

He talks some about the current needs of their deployment process and how one option - symlinking the "vendors" directory just wouldn't work. Instead, they make use of Ruby and Chef to work with the OpsWorks hook system that fire on deployment. He includes the example Ruby scripts they put in place to handle "before migrate", "before symlink", "before restart" and "after restart" events. This new setup saved them about two to three minutes on their total deployment time and resulted in a much more stable environment.

0 comments voice your opinion now!
amazon aws opsworks composer install ruby chef hooks deployment

Link: http://till.klampaeckel.de/blog/archives/202-Speeding-up-composer-on-AWS-OpsWorks.html

Amazon Web Services PHP Blog:
Provision an Amazon EC2 Instance with PHP
August 23, 2013 @ 09:15:23

On the Amazon Web Services blog today Jeremy Lindblom shares a quick way you can use the AWS SDK to create an EC2 instance directly from PHP in just a few lines of code.

Amazon EC2 is a powerful AWS service that includes the ability to provision on-demand servers. While you can easily do this through the AWS Management Console, in this post, I want show you how to use the AWS SDK for PHP to do it programmatically by interacting with the Amazon EC2 API.

He starts with an outline of the steps (requiring a little bit of EC2-side configuration first) and shows how to use the SDK. His code sets up the client, creates the key pair and security group then is ready to make the instance. You can give the "runInstances" method a configuration that includes number of instances and what type. There's also some hooks back into the request that can tell you when the instances are running and how to get the path to the new instance (for ssh access).

0 comments voice your opinion now!
amazon webservice api provision instance ec2 sdk tutorial

Link: http://blogs.aws.amazon.com/php/post/TxMLFLE50WUAMR/Provision-an-Amazon-EC2-Instance-with-PHP

CoderWall.com:
Scale PHP on Ec2 to 30,000 Concurrent Users / Server
July 19, 2013 @ 11:07:08

On CoderWall.com there's a post sharing some findings about how RockThePost.com scaled PHP to 30,000 concurrent users on Amazon EC2 instances.

RockThePost.com is a LAMP stack hosted on Ec2. We're preparing to be featured in an email which will be sent to ~1M investors... all at the same time. For our 2 person engineering department, that meant we had to do a quick sanity check to see just how many people we can support concurrently.

They have a list of five suggestions/opinions on what has helped them scale out to this level including using Varnish for caching, turning on APC (PHP opcode caching) and using a c1.xlarge EC2 instance. They used Google Analytics and Siege to run their load testing on the "exterior" of the site.

0 comments voice your opinion now!
rockthepost scale amazon ec2 concurrent users howto

Link: https://coderwall.com/p/__z9ia

Amazon Web Services PHP Blog:
Syncing Data with Amazon S3
June 28, 2013 @ 11:57:59

On the Amazon AWS blog there's a recent post showing you how to sync data with S3 and handle multiple files quickly and easily.

Have you ever needed to upload an entire directory of files to Amazon S3 or download an Amazon S3 bucket to a local directory? With a recent release of the AWS SDK for PHP, this is now not only possible, but really simple.

He includes example code for doing it both ways - upload and download syncing - as well as some options you can use to customize the connection. You can define things like ACL settings, the number of concurrent connections and if you want the debug options turned off or on.

0 comments voice your opinion now!
sync amazon s3 tutorial upload download

Link: http://blogs.aws.amazon.com/php/post/Tx2W9JAA7RXVOXA/Syncing-Data-with-Amazon-S3

Snipe.net:
Sending Mail Using PHP and Amazon SES on Centos/AWS Linux
March 27, 2013 @ 10:56:53

In this new post to her site Alison shows how to send emails through the Amazon Simple Email Service (SES) from a CentOS instance (an AMI in this case).

If you find yourself using Amazon SES for sending outgoing emails in a PHP web app, getting everything set up is much simpler than it may seem. In my case, this was on an AWS Linux image, but it will work on any Fedora/CentOS AMI. You can, of course, set up sendmail and use a proper MTA to send email from your web app, but in this case, I had inherited the requirement to set up an environment for code that was already written to use SES for outgoing email and Google Apps for incoming emails, so the actual mechanics weren't up for debate.

She includes screenshots showing how to configure the SES system with your site's domains and DNS as well as the email addresses you're planning on using. She links over to the MSMTP software you'll need to install on your instance to make the connection and what you'll need to do to get it configured for PHP's use. A sample email script is also included to test the connection (and where to look to make sure everything worked correctly).

0 comments voice your opinion now!
amazon ami ses email send centos tutorial


Andi Gutmans:
Zend Server 6 is launched and available on the Amazon Web Services (AWS) Marketplace
February 21, 2013 @ 10:40:26

Andi Gutmans has a new post to his site about a recent update to the offerings on the Amazon Web Services (AWS) - it now offers Zend Server 6 as an installable option.

Zend Server 6 is the ideal application platform for mobile and web applications, and this version brings a new level of enterprise capabilities. [...] Today, I'm also pleased to share that this newest version of Zend Server is now available on the Amazon Web Services Marketplace. Now, for one combined fee with Amazon Web Services, you can run your applications on a fully supported PHP application platform with Zend Server 6 running on Red Hat Enterprise Linux or Ubuntu Linux.

If you're interested in what Zend Server has to offer, check out the product page on the Zend website. Zend Server handles a lot of the base level things for you and can help you get up and running quickly. It includes things like detailed monitoring, error tracking, code tracing and a nice UI to for management and configuration of the server.

0 comments voice your opinion now!
zendserver aws amazon webservice server linux deploy


Community News:
Get "The Joy of PHP" Free on Amazon
February 08, 2013 @ 12:22:57

A while back Alan Forbes started a Kickstarter project to write a PHP book, "The Joy of PHP". This book was targeted at those that wanted to learn PHP and "have some fun along the way". The book has been finished and, in a special promotion, is being offered free of charge through Amazon and for the next five days.

The book "The Joy of PHP" by Alan Forbes now available as a Kindle book on Amazon.com. Starting today (or tomorrow, depending on Amazon) and lasting only 5 days the book will be absolutely free. The only "catch" is that the author is asking for reviews. In other words, once you've taken a look a the book please go back to the book listing on Amazon and give it a star rating from 1 to 5 to help the author build momentum for the book.

You can find out more about the book on its website and, if you don't want the Kindle version, pick up a copy of the PDF version for just $12 USD.

UPDATE: the free offer for this book has been extended and is available for no cost for a limited time!

0 comments voice your opinion now!
joyofphp kickstarter book amazon kindle free promotion


Amazon Web Services Blog:
Version 2 of the AWS SDK for PHP (now with Guzzle)
November 15, 2012 @ 14:57:49

The Amazon Web Services group has recently released an updated version of their SDK for PHP and at it's heart is the open source project Guzzle (a HTTP client framework).

The new SDK is built on top of the Guzzle HTTP client framework, which provides increased performance and enables event-driven customization. Each AWS service client extends the Guzzle client and describes operations on the service using a service description file. The SDK now manages persistent connections for both serial and parallel requests. It detects transient network failures, with automatic retries using truncated exponential backoff. Support for event hooks (via the Symfony2 EventDispatcher) allows you to implement custom, event-driven behavior.

In the AWS post about the update, they give you a few code snippets showing this updated version in use. This completely reworked version of the SDK is not compatible with the previous version, so you'll need to consult their migration guide to bring things up to date.

0 comments voice your opinion now!
aws amazon webservices guzzle opensource http client version release sdk



Community Events











Don't see your event here?
Let us know!


performance application introduction hack language podcast project package framework hhvm example component unittest composer facebook database install symfony2 release security

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework