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

Acquia Blog:
The Future of PHP is Shared Power Tools
October 17, 2014 @ 09:06:42

On the Acquia blog there's a recent post from Ryan Weaver from KnpLabs, well known for his contributions to the Symfony2 framework. In his post he suggests that the future of PHP is "shared power tools", less around the monolithic frameworks or installable software and more about the combinations of small pieces of code doing exactly what they need and nothing more.

[Things like Drupal, Joomla and WordPress are] painstakingly thought about and solved the same problems from scratch. And despite that, the results were incredible. How? Because they leveraged the sheer size and passion of their respective PHP communities. But it makes me wonder: what crazy things could we build if we worked together? Fortunately, we're on our way to finding that out. The PHP world is transforming and the individual armies and empires are blurring together.

He talks about how PHP developers should stop fighting the same battles and start working together using existing libraries to solve problems. He points out that applications, even the big names, are becoming more and more modular. Even Drupal has recently made the move to include Symfony packages for some of its functionality (other examples are given too). He also talks about "developer experience" in using these tools, what Symfony is doing to help it and how building on these and other components is essentially "standing on the shoulders of giants" to solve problems easier, faster and with better quality code.

0 comments voice your opinion now!
acquia blog ryanweaver shared tools package library symfony2

Link: https://www.acquia.com/blog/future-php-shared-power-tools

SitePoint PHP Blog:
Managing Gettext Translations on Shared Hosting
February 11, 2014 @ 13:09:19

On the SitePoint PHP blog today Aurelio De Rosa makes some recommendations about handing gettext translations on shared hosting. The problem with shared hosting is the need to reset the web server (Apache) to get it to read the updated translation files. His workarounds uses an external script that can dynamically pull in the latest translations without the restart.`

For serious translations we can use Gettext. This approach enables us to have different files for every targeted language which helps in maintaining separation between the business logic, the presentation layer, and the translations (which we can see as an add-on of the presentation layer). With Gettext, we can parallelize the process because while we're working on some features of the website, translators can still work on translations using software like gettext functionality to set the current language and extract a "HELLO_WORLD" string. He then moves on to the use of the Audero Shared Gettext library. This library creates a "mirror" of the translation file requested and forces those updates into the current domain. Code examples of its use are included showing a basic pull and merge process.

0 comments voice your opinion now!
gettext tranlsation dynamic loading webserver shared hosting tutorial

Link: http://www.sitepoint.com/managing-gettext-translations-shared-hosting

Phil Bennett:
Do We Need a Framework For That? Or Hurry Up PHP-FIG
April 10, 2013 @ 13:38:48

In this recent post to his site, Phil Bennett shares some thoughts about the PHP-FIG, the standards they're proposing and how the shares interfaces might help reduce dependencies in framework-based applications.

[Frameworks] come in several different flavours that all have huge advantages, but also a few disadvantages. Over engineered (because their popularity demands that they be), updated too often, not updated enough. If you decide for example to update your application from using Zend Framework 1 to using Zend Framework 2, this will more than likely require, at least in part, a re-write of your code. This makes scalability difficult.

He talks some about the PSRs that the PHP-FIG group has proposed including the PSR-3 logging interface structure. He points out that, by having this same structure, it makes injecting dependencies easy while still leaving the actual functionality open to interpretation. He also suggests that maybe a framework isn't the right choice for all applications and that possibly using a collection of libraries, tied together by the PSR standards, could be a better answer.

0 comments voice your opinion now!
phpfig psr framework interface shared standard

Link: http://happyaccidents.me/blog/do-we-need-a-framework-for-that

Paul Jones:
A Response To "On php-fig and Shared Interfaces"
December 24, 2012 @ 12:54:57

Paul Jones has written up a response to Matthew Weier O'Phinney's recent post on shared interfaces and the PHP-FIG. In it he talks about the PHP-FIG group itself and specific references back to the original post.

He mentions the ideas of "new thinking" and the limitations that standardized interfaces might try to impose on an application:

One is able to imagine reasons why having shared interfaces of the kind described above is in opposition to, or at best orthogonal to, better development practices and greater innovation across PHP land. Even so, I assert that shared interfaces as described, while maybe preventing an imaginable ideal in theory, instead promote an actual good in practice.

Matthew Weier O'Phinney responded with some of his own comments and correcting some of the misinterpretation of his original comments.

0 comments voice your opinion now!
phpfig shared interface response comment


Matthew Weier O'Phinney:
On php-fig and Shared Interfaces
December 21, 2012 @ 11:45:37

In his most recent post Matthew Weier O'Phinney (lead on the Zend Framework project) takes a look at the PHP Interoperability Group (php-fig) and some recent discussions that have come up about shared interfaces for things like logging and caching.

A little over a year ago, there was a new push by a number of folks wanting to do more. Paul Jones did a remarkable job of spearheading the next two standards, which centered around coding style. [...] And this is when we started seeing proposals surface for shared interfaces, first around caching, and now around logging (though the latter is the first up for vote).

He talks a bit about shared interfaces - what they are and what kind of problem they aim to solve - and how he's not sure he "buys into them". He notes that "sharing is good, developing solutions is better" and stresses making it easier to operate with each other and not worry so much about standardized interfaces.

He's found a few problems with the concepts behind them like the Not Invented Here (NIH) idea they promote and that there's not really just a single solution to these kinds of problems ("space for multiple implementations"). He suggests an alternative to the idea of these shared interfaces - bridges/adapters. He illustrates this idea with some code showing the implementation of a "CacheInterface" and a "FrameworkACache" adapter that wraps the functionality of a "CacheItem" class that might be internal to your application already.

0 comments voice your opinion now!
phpfig framework interoperability standards interface shared


PHP-Security.net:
Suhosin 0.9.34-DEV Installation HowTo
May 03, 2012 @ 11:54:57

On the PHP-Security.net blog today there's a new post showing how to get the latest version of the Suhosin security patch for PHP installed.

With the recently released PHP 5.4, the Suhosin patch and extension were removed from many Linux distribution packages (i.e., Debian et al.) and until three weeks ago, there was no possibility to compile and run the Suhosin extension under PHP 5.4. This little howto shall serve as installation instruction for Debian Wheezy users - your mileage may vary. I blogged about this here.

They start with the apt-get commands to install the latest PHP5 for your distribution (yum commands are similar, of course) and includes the location to download the latest Suhosin version from Stefan Esser's github account. Unpack it, compile and "phpize" it and if all goes well, you should have a shared module built and ready for use.

0 comments voice your opinion now!
install suhosin shared module compile phpize tutorial


ServerGrove Blog:
Spooling emails with Symfony2 on VPS and Shared Hosting
April 30, 2012 @ 10:20:54

The ServerGrove blog has a recent post for the Symfony2 users out there, showing how you can spool emails on a VPS/shared hosting using SwiftMailer and the Symfony2 bundle to interact with it.

When you send an email, the mailer communicates with a remote server in charge of receiving the message and of delivering it to the recipient. This process can cause your form to submit slowly as it depends on how fast the mail server responds. Spooling allows us to decouple the application execution line from the process of the sending one, two, or as many emails as we need.

They show you how to configure the SwiftMailerBundle with the mail server's settings, how to set up the command to send the emails and the settings you'll need to put in your cron file to run the "send" operation periodically.

0 comments voice your opinion now!
shared hosting vps symfony2 spool email tutorial


IBM developerWorks:
Store datasets directly in shared memory with PHP
January 20, 2012 @ 11:29:24

On the IBM developerWorks site today there's a new tutorial showing you how to store shared data directly to a shared memory space of your PHP application.

Once created, and given proper permissions, other processes in the same machine can manipulate those segments by: read, write, and delete. This means that an application written in C can share information with an application written in other languages, such as Java or PHP. They can all share information, as long as they can access and understand that information. [...] This article's proposal is simple, learn how to create and manipulate shared memory segments with PHP and use them to store datasets that other applications can use.

Your PHP installation will need to have been compiled with "enable-shmop" to work with the code in this tutorial. Their examples show how to use the shmop_open, shmop_write and other related functions to read, write, remove and close segments in the shared memory space. They also include an example of using the SimpleSHM library to make it easier to interact with the shared memory space as a standard storage location.

0 comments voice your opinion now!
shared memory shmop dataset simpleshm storage


ServerGrove Blog:
Deploying Symfony2 Projects on Shared Hosting with Capifony
September 08, 2011 @ 11:15:18

The ServerGrove blog, a hosting provider whose services include shared hosting, has posted a guide to help you deploy to shared hosting with Capifony, a Symfony-based tool for use with Capistrano.

This article is meant to help you configure and deploy your projects developed with Symfony2 into a Shared Hosting environment, so if you need to deploy using capifony on a VPS, please read this article.

You'll need ssh access to the server to get things set up for the deployment as well as a local environment where you can install Ruby and Ruby Gems (their platform for the example is OSX). They help you get those installed and generate a key for use with the deployment. Once this key is copied over to the remote system, you can then set up the config to use the password-less connection and to deploy from either a local repository or a remote location (like github).

0 comments voice your opinion now!
shared hosting symfony2 deployment capifony tutorial


Martin Sikora's Blog:
Symfony 1.4 on shared webhosting
June 27, 2011 @ 11:07:36

On his blog Martin Sikora shares a solution that many a Symfony developer out there might find handy for running their application in a shared hosting environment:

Some time ago (actually when I was making this blog) I posted on stackoveflow.com a question on how to configure Symfony to run on shared webservers where you can't change your website's document root. I solved it but forgot that I was asking and left it without any answer.

The main problem is that the DOCUMENT_ROOT for the hosting service can't be changed by the users of the shared host. To solve this he modified his routing rules (sfPatternRouting class) and changed his .htaccess file to rewrite things over from just "/page" to "/web/page" instead. A simple solution, but it might be evasive if you've never configured it before.

0 comments voice your opinion now!
symfony setup shared hosting web tutorial route htaccess



Community Events





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


mvc podcast security series package update version framework laravel tool composer release interview opinion symfony voicesoftheelephpant community introduction language library

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