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

SitePoint PHP Blog:
PHP and WMI - Dig deep into Windows with PHP
December 24, 2013 @ 12:30:25

On the SitePoint PHP blog they've posted a new tutorial that "digs deep" into PHP on Windows with WMI, the Windows Management Instrumentation functionality - a web-based architecture information gathering system.

There are many devices (servers, desktops, laptops, tablets, phones, etc) running a Windows operating system. Many of us who live in the nix based world have to work in this OS, or if we don't, we will, sooner or later. Besides the regular tools we can expect from a *nix system (say Apache, PHP, MySQL, C/C++ compilers, etc), Windows offers a set of unique features not present in any other OS, and WMI is one of them. In this article, we will address the questions like: What is WMI? How to use WMI with PHP? We will have some minimal sample codes to go through the basic programming techniques.

He starts off the post briefly explaining what WMI is and what kinds of problems it solves. He shows you how to check if it's installed (it probably is on most recent Windows machines) and that it's enabled. He also shows how to configure the firewall to allow WMI connections and the library you'll need to get the PHP support functional (php_com_dotnet.dll). He then gets into what kind of information you can get from WMI including local hardware information, BIOS details and memory usage. Some simple code is included using the COM functionality to connect to the server and run a query.

0 comments voice your opinion now!
windows wmi information tutorial introduction com

Link: http://www.sitepoint.com/php-wmi-dig-deep-windows-php

Liip Blog:
How to preload ACL in order to get good performances
October 09, 2013 @ 10:40:34

On the Liip blog today Jean-Christophe Zulian shares an idea about gaining performance in your access controlled section of your application. He suggests preloading ACL information in Symfony2-based applications.

Symfony2 comes with an ACL mechanism that can help you whenever you need to add some permissions in your system. [...] Unfortunately we came across a situation where we had to do this kind of permission check on a very long list of items. [...] erformance will go bad (or very bad in our case) and as the system keep storing more and more of the same kind of data it become slower and slower. [...] Luckily for us Sf2 ACL system provides a way out of this. You can in a small amount of query load all the ACLs that are related to some given objects.

He includes a small snippet of code that takes in a set of blog posts (as an example) and calls a "findAcls" method to pre-fetch the information. That information is then available for the rest of the request. The fetch is done by packet instead of via one large query, making it a bit more performant.

0 comments voice your opinion now!
symfony2 preload acl information performance

Link: http://blog.liip.ch/archive/2013/10/09/how-to-preload-acl-in-order-to-get-good-performances.html

PHPMaster.com:
6 Things to Consider when Choosing a Framework
April 08, 2013 @ 11:29:07

PHPMaster.com has posted a list of six things they think you should think about as you're selecting the framework for your next application.

You've decided that it makes sense to use a framework when writing your next new application, and chances are that if you're already familiar with a specific framework, then you'll probably be leaning towards using that one when you start. But are you sure it's really the most appropriate for the task at hand? In the name of due-diligence, here are some of questions that you should ask yourself before settling on a particular framework to make sure you're not programming "against the grain" and also to make sure it will be able to meet your needs now and in the long-term.

He doesn't get into any specifics of any PHP frameworks out there, but suggests general questions to ask even before getting too deep into the technology:

  • What do I need from the framework?
  • Do I expect the framework to help manage consistency?
  • Is good documentation available?
  • Is the framework actively developed, and does it have an active user base?
  • Does the framework work in what I run in production?
  • What business factors are influencing my decision?
Not every application needs to be written using a framework. But if you've decided that yours does, then it's beneficial to compare your needs against the features and benefits of the various framework offerings.
0 comments voice your opinion now!
framework choice advice questions information

Link: http://phpmaster.com/6-things-to-consider-when-choosing-a-framework

PHPBuilder.com:
Talking to Facebook's Social Graph with PHP
November 21, 2011 @ 11:26:54

On PHPBuilder.com there's a recent post showing you how to connect your application with Facebook's graph API and grabbing the current user's public profile information.

In recent years, [Facebook's] influence has dramatically grown thanks to the Facebook Platform, a set of APIs which third-parties can use to create or extend applications which tightly integrate with Facebook.com's features and users. [...] PHP-minded developers are particularly fortunate, as the Facebook PHP SDK doesn't only provide users a powerful solution for interacting with the social graph, but because it's actively maintained by the Facebook development team is often the first of several available APIs to offer the latest features and bug fixes.

He points out the github repostory for grabbing the Facebook SDK, the information you'd get (at a minimum) from the API and the sort of detail you can expect from a user logged into your application. Sample code is included for this last example.

0 comments voice your opinion now!
facebook social graph api tutorial public information


Community News:
Debug Bar for Zend Framework - Scienta
March 30, 2009 @ 10:21:48

Joakim Nygard has come up with a debug bar similar to ones found in other frameworks for the Zend Framework - the Scienta ZF debug bar.

The Scienta ZF Debug Bar is a plugin for the Zend Framework for PHP5. It provides useful debug information displayed in a small bar at the bottom of every page. Time spent, memory usage and number of database queries are presented at a glance. Additionally, included files, a listing of available view variables and the complete SQL command of all queries are shown in separate panels (shown configured with 2 database adapters):

You can check out an example setup here [png] and get the full installation instructions and latest downloads from the project's page.

0 comments voice your opinion now!
debug bar status information example install download project


Andi Gutmans' Blog:
Zend Server is here! (almost)
February 20, 2009 @ 15:17:44

Andi Gutmans has posted some of his own thoughts about the recent Zend Server beta release over on his Blogspot blog:

As I alluded in my New Year's post we've been very busy working on a new product line which today we are unveiling as Zend Server. Zend Server is not a Zend Core or Zend Platform derivative (although it uses a small amount of those components, mostly enhanced) rather it's a new approach on how we want to develop, distribute, and service our production products.

He talks about some of Zend's reasoning behind the project such as the need they saw in the community for a good, easy to install full web stack that can be relied on to provide solid, dependable performance. The entire setup is free of dependencies making it idea for a "drop in" kind of package for those needing an environment on Windows, Linux or Mac OS X.

You can find out more information about this new Zend offering on this page on the Zend website.

8 comments voice your opinion now!
zendserver zend andigutmans information introduction


Juozas Kaziukenas' Blog:
Web scraping with PHP and XPath
February 18, 2009 @ 10:28:08

In this new post to his blog Juozas Kaziukenas takes a look at one method for getting the information out of a remote page - parsing it with PHP and XPath (assuming the page is correctly formatted).

When I was writing about how I use web scraping, I was still hadn't tried using Xpath (shame on me). [...] It turned out, that using Xpath is extremely easy, really. When you master it, you can do everything in seconds. Yes, you need to know how XML works and how to write correct Xpath queries (brief explanation of Xpath syntax is available at W3Schools), but hey - these topics are in 1st year of university.

He includes both some sample code (to fetch a titles and prices for cameras from bhphotovideo.com) and a link to a XPath checker you can use to ensure that your query is correctly formatted. It's good that he also includes a quick reminder about the ethical issue with web scraping - it could be considered stealing depending on where the information comes from and who is providing it.

1 comment voice your opinion now!
web scraping xpath tutorial price title ethical steal information


Stefan Koopmanschap's Blog:
What we can learn from yesterday's phpBB.com hack
February 03, 2009 @ 10:28:00

For those that might have missed it, the phpBB.com server was hacked via an unpatched version of another piece of PHP software running on the same machine. Stefan Koopmanschap has posted a bit about it and talks about what happened and what can be learned from it.

Yesterday the phpBB.com server got hacked. People who, like me, were there back in the days of phpBB2 will be reminded of the security flaws found in the software back then. However, this was not the cause of this hack. It was an unpatched version of another PHP package that caused the hack, which exposed amongst other things the full user database and several server passwords.

The problem was with an unpatched version of phpList, a mailing list manager, that allowed the hacker to get in and get out with a complete dump of the users table (including passwords and other private information).

I think the whole world can learn something from this: Your server is only as secure as your weakest link. So if you use any third party open source software, make sure that you always use the latest version, and that you subscribe to notification mailinglists of new releases. This will ensure that you get notified when new versions are released, so that you can patch your installation to the latest version and fix any vulnerabilities in the software.
1 comment voice your opinion now!
phpbb hack website phplist mailinglist manager user private information


Eric Reis' Blog:
Why PHP won
January 20, 2009 @ 12:55:20

In a recent post to his blog Eric Reis talks about "why PHP won" in his web application development over other (web scripting) languages:

Some of them are probably still cursing my name, because - let's face it - PHP can be pretty painful. As a language, it's inelegant. Its object-orientation support is "much improved" - which is another way of saying it's been horrendous for a long time. Writing unit tests or mock objects in PHP is an exercise in constant frustration. And yet I keep returning to PHP as a development platform, as have most of my fellow startup CTOs. This post is about why.

He includes four things (that would be needed to counter the information cascade that PHP has) a "new challenger" language might need to burst PHP's bubble.

  • Speed of iteration (a good write/test/debug cycle)
  • Better mapping of outputs to inputs
  • A similar standard library
  • A better OOP implementation

He gets a bit confusing in there, moving back and forth between "PHP is good" and "PHP is bad" comments but he does come back to the one thing that everyone can agree on - regardless of your personal bias, you should always consider this: "it's all about picking the right tool for the job".

0 comments voice your opinion now!
opinion information cascade oop iteration standard library tool


PHPBuilder.com:
Getting started with Flex and Zend_Amf
November 03, 2008 @ 08:49:38

This new article from PHPBuilder.com talks about getting started with one of the newly introduced components of the Zend Framework (in collaboration with Adobe) - the Zend_Amf interface.

To introduce this new Zend Framework extension and give you a look inside its functionality, I show you how to build a Flex application that pulls data from a MySQL database using PHP. First, you set up the application to use XML, the conventional cross-platform data-exchange method. Then, you change the code to use AMF and custom classes.

They give you the tools you'll need to set up the right environment (including version 1.7 or later of the Zend Framework and Adobe Flex Builder) and the steps to create the simple application. It uses a MySQL backend to store contact information ad a basic Flex interface to pull that information back out for display.

0 comments voice your opinion now!
tutorial flex zendamf contact mysql information interface zendframework



Community Events





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


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

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