News 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

NetTuts.com:
Setting Up a Local Mirror for Composer Packages With Satis
January 28, 2014 @ 12:27:08

Anyone who has worked with Composer for PHP package management knows that it's been one of the biggest changes in the PHP ecosystem in recent years. Unfortunately, it does have one major potential downfall - it's reliance on GitHub. While GitHub usually does a good job of staying stable, even they falter from time to time. Thankfully there's a locally hosted alternative you can use - Satis. In this new post to NetTuts.com, they show you how to use this tool and mirror packages for your own use.

In this tutorial we will set up a local mirror to proxy all your packages required in your project's composer.json file. This will make our CI work much faster, install the packages over the local network or even hosted on the same machine, and make sure we have the specific versions of the packages always available.

They start with a look at what Satis is and how it fits into the whole Composer installation process. From there, they show how to get it installed (via Composer) and using a "mirrored-packages.conf" configuration file to point to the repositories. They include the steps to get it up and running in Apache and show a simple command to get the latest versions for the mirrored packages (perfect for a cron job). There's also some testing included there at the end, parsing and validating the configuration file.

0 comments voice your opinion now!
composer local mirror satis package tutorial introduction

Link: http://net.tutsplus.com/tutorials/php/setting-up-a-local-mirror-for-composer-packages-with-satis/

PHPMaster.com:
Installing GitList for Local Repos
August 23, 2012 @ 09:29:59

If you're a git user and have thought about bringing things a bit more "in-house" than GitHub but still want some of the perks of the web-based interface, this quick tutorial from PHPMaster about installing Gitlist might interest you.

aking your repositories available in a local intranet is pretty easy, but having a nice interface to interact with those repositories, making collaboration between teams easier, is not that simple. [...] There are other solutions available, but some are too hard to install or, again, hard on the eyes. I recently discovered GitList, a free and open source Git repository viewer. It's interface resembles GitHub a lot but aims to keep everything simple and clear.

He includes the basic installation steps you'll need to get it up and running - setting up the environment, downloading and configuring Gitlist to look at your repositories and pointing out that, since the LESS source is included in the download, you can customize it how you see fit.

0 comments voice your opinion now!
gitlist git local web interface tutorial install configure


PHPMaster.com:
Using WampServer for Local Development
July 10, 2012 @ 12:43:19

PHPMaster.com has a new tutorial posted today about doing development locally with the help of a WampServer installed on your Windows system (there's similar packages for Linux systems).

This article will explain how a development system solves such a problem and how to install the popular Windows-based web development platform WAMP. As a relative newcomer to the PHP language, I hope this article speaks directly to other new programmers who are interested in honing their development skills to eventually become PHP masters.

They explain some of the things that the WAMP server has to offer and how to set it all up (complete with screenshots). Their example configuration just uses the default "localhost" hostname and runs as the "www" user. If you want to get into more of the configuration options available in the tool, you can check out the project's site for details.

0 comments voice your opinion now!
wampserver local development tutorial windows


NETTUTS.com:
How to Set Up a Killer WordPress Testing Environment Locally
May 27, 2009 @ 09:35:43

If you're a WordPress developer and have been looking for a good guide on setting up a local installation to do some testing, you might want to check into this guide from NETTUTS.com.

If you're a heavy WordPress developer like me, you might find that you need to create a new installation for each site that requires a strange structure or specific posts, instead of using your uniform local test WordPress installation. Cue WordPress Mu. WordPress Multi User is a platform created by the geniuses at Automattic that is basically a WordPress installation that allows multiple blogs to run using the same software.

The tutorial requires you to already have a setup install of WordPress on your local machine and a working MAMP setup. The guide shows you how to change ports in the config, update the httpd.conf file for the webserver, add in a virtual host and configure the hosts file to point to your WordPress MU installation.

0 comments voice your opinion now!
environment local tutorial wordpress


SitePoint PHP Blog:
How to Install PHP on Windows
April 13, 2009 @ 10:24:14

In this new article on the SitePoint PHP blog, Craig Buckler shows you how to get PHP installed and working. He mentions the "all in one" packages that can do a lot of the work for you, but opts to go down the manual route to show you how its really done.

Installing PHP on your development PC allows you to safely create and test a web application without affecting the data or systems on your live website. This article describes PHP installation as a module within the Windows version of Apache 2.2. Mac and Linux users will probably have it installed already.

The process is quick and relatively painless - there's six steps (not including the Apache install, that was covered previously) and only a little bit of messing around with system properties you'll need to do.

0 comments voice your opinion now!
install windows local extension apache


Jaisen Mathai's Blog:
How to host the php.net manual on your laptop for offline use
March 12, 2009 @ 12:53:51

Jaisen Mathai has a helpful hint for those that do any offline work with PHP on their own development systems - how to mirror the PHP manual on a local web server.

In addition to [a local copy of your source] being faster to develop, it lets you work without needing to be connected to the Internet. But what about the tools you use while developing? If you're a PHP developer then the manual at php.net is an invaluable tool. It only make sense to have it available for when you're not online.

His example follows the official mirroring part of the PHP.net website and uses a slightly modified rsync command to fetch the manual information from the php.net site and drops it in a location locally. He throws in an Apache configuration too for a simple VirtualHost to get it up and running.

0 comments voice your opinion now!
phpnet manual offline local copy rsync mirror documentation


Vid Luther's Blog:
Using your Mac as a local web development environment.
February 09, 2009 @ 09:32:14

Having a development environment on a remote machine (maybe production, maybe test) is nice, but sometimes you just need the speed and simplicity that something a bit more local can give you. Vid Luther talks about setting up just such a local development environment on your Mac. (Sorry Windows guys - maybe check out WAMP)

This post is for the techies who know me, and are switching. Some are coming from Windows, some from Linux, some are designers who need to do some local development. So, I'll try to keep this post as simple as possible, and perhaps more like a tutorial, where you can "copy and paste" commands and files.

He recommends a few pieces of software that you'll need - things like XAMPP and MySQL - and some other "nice to haves" like TextMate, Subversion and Expandrive. He shows how to set up the shell environment, create virtual hosts and add them into the /etc/hosts file so they'll resolve locally.

0 comments voice your opinion now!
mac osx local development environment xampp mysql tutorial shell virthost


Leonid Mamchenkov's Blog:
Perl vs. PHP variable scoping
December 12, 2008 @ 08:49:14

Leonid Mamchenkov has compared Perl versus PHP in this new blog post - specifically how they handle variable scoping.

I've mentioned quite a few times that I am a big fan of Perl programming language. However, most of my programming time these days is spent in PHP. The languages are often similar, with PHP having its roots in Perl, and Perl being such a influence in the world of programming languages. This similarity is often very helpful. However there are a few difference, some of which are obvious and others are not.

His example compares looping (a foreach in both) and how, after the Perl loop the $value variable is no longer accessible. In PHP, however, it's passed back out into the current scope and can be read just like any other variable. While this can be useful, it can also cause headaches when trying to track down elusive bugs.

1 comment voice your opinion now!
variable scope foreach loop local outside compare


Lorna Mitchell's Blog:
Locale-Sensitive Dates in PHP
November 05, 2008 @ 08:48:44

Lorna Mitchell shares a quick code snippet she's worked up to make handling local-sensitive dates in PHP a bit easier (via the strftime function).

I needed dates like "Donderdag 23 Oktober", and I was sure PHP should know how to do this without me creating arrays for days of the week and months of the year. With some help from my friend (thanks Derick) I discovered that there is a date function in PHP that takes into account the locale of the script, called strftime.

Her code snippet shows how to set the correct local time (in her case, nl_NL with a UTF-8 encoding) and how to return a formatted string based on formatting characters (much like printf/sprintf).

0 comments voice your opinion now!
local sensitive date setlocalte strftime tutorial



Community Events





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


interview community code podcast language unittest introduction refactor symfony2 developer release threedevsandamaybe api list opinion testing install series laravel framework

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