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

PHPBuilder.com:
PHPUnit Fundamentals Setting Up and Tearing Down a Doctrine 2 Database
August 18, 2011 @ 09:03:40

New on PHPBuilder.com today is a tutorial showing you how to use set up and tear down methods in PHPUnit unit tests to work with a Doctrine 2 database, making it simpler to run self-contained testing.

The recently released Doctrine 2 presents significant advantages over its 1.X predecessor, advantages which are even more pronounced when compared to the Zend Framework's default database solution, namely the Zend_Db component. [...] When running unit tests which vet various aspects of your database you'll want to setup (create) and teardown (destroy) the test database, ensuring that a pristine and repeatable version of the database is available to each test.

He includes an example of using the SchemaTool class (of Doctrine) to drop and recreate the schema from scratch with the end result of a clean working copy, ready to test from. He also includes an example of how to initialize the database with some default information using the PHPUnit database connection and a default set of fixtures (defined in YAML).

0 comments voice your opinion now!
phpunit unittest setup tear down doctrine2 database tutorial


Community News:
PHP Down to 5th on TIOBE Programming Community Index
November 06, 2006 @ 09:02:00

According to the latest stats from the TIOBE Programming Community Index, PHP has dropped down a spot from its previous standing last month down to the number five slot for November, being bumped down by (Visual) Basic.

As the long term trends graph shows, though, PHP and Basic are neck and neck, with one only gaining slightly over the other. As the International PHP Magazine site notes:

As the graph on TIOBE's web site indicates, PHP has been charting an uneven course, facing ups and just as many downs. However, PHP's position as of Feb 2006 is significantly higher than that of 2005.

You can get all of the stats and graphs for this latest month of results from the TIOBE site.

0 comments voice your opinion now!
tiobe community programming index popularity down ranking tiobe community programming index popularity down ranking


Melvin Rivera's Blog:
Creating a custom WordPress database error page
June 19, 2006 @ 05:45:40

On the All Forces blog today, Melvin Rivera has posted a new tutorial for all of those WordPress users out there wanting to make a custom database error message page.

The database connection error occurs when WordPress tries o connect to the database but does not succeed at it. When you are first installing WordPress, it can mean that your settings are incorrect. i.e. the username/password are wrong. However, if your WordPress installation is running smoothly but for some reason MySQL goes down on your server then WordPress will show that huge "WordPress, Error Establishing a Database Connection" error page that looks nothing like the rest of your site.

The error page is great when you are first setting up WordPress but it is not the most ideal for a professional website. It creates confusion for the visitor that might not even know what WordPress is. What's worst, the web developer might not even find out for hours.

He guides you through making a small modification to WordPress itself (to change the page location), including the exact code to change. He also includes a brief it of PHP code to place on this custom page to email you whenever it hits this page (so you'll know it's down). From there, it's just about creating the custom error page that fits into your template. And, of course, he suggests testing it briefly, just to ensure that everything's on the up and up. Files are included where code was referenced.

0 comments voice your opinion now!
wordpress tutorial custom error page email database down wordpress tutorial custom error page email database down


IBM developerWorks:
Locking down your PHP applications
May 24, 2006 @ 06:17:48

IBM developerWorks has another new tutorial today with a look at locking down your PHP applications - "four security rules you can't violate".

In this tutorial, you'll learn how to add security to your PHP Web applications. It is assumed that you've been coding PHP Web applications for at least a year, so it won't cover the basics of the language (either conventions or syntax). The goal is to make you more aware of what you should be doing to secure the Web applications you're building.

This tutorial teaches you how to guard against the most common security threats: SQL injections, the manipulation of the GET and POST variables, buffer overflow attacks, cross-site scripting attacks, data manipulation inside the browser, and remote form posting.

You'll need a system already running PHP (at least version 4.x) and MySQL on a web server (Apache or otherwise). They look briefly at some of the common security issues plaguing web applications these days before moving on to the four rules:

  • Never trust outside data or input
  • Disable PHP settings that make security difficult to enforce
  • You can't secure it if you can't understand it
  • "Defense in depth" is your new mantra
They take a look at each of these and use the rest of the article (8 more pages) showing you how to keep yourself safe from these issues.

0 comments voice your opinion now!
security locking down application tutorial rules security locking down application tutorial rules


Jim Plush's Blog:
My-Bic version 0.6 Released
March 31, 2006 @ 20:08:08

Jim Plush has released the latest version of his My-Bic Ajax/PHP framework with a few cool enhancements - version 0.6 according to this new post.

The two major features added are JSON client side encoding and network down handling. Client side JSON encoding will allow you to send more complex structures to your PHP script and they can get converted to normal PHP objects. The other major feature is handling network down issues.

For example if your client script cannot get a response back from the server My-Bic will now allow you to define your own network down function or you can use the default method which creates a div on the screen alerting the user of network issues. If there are 3 requests that fail in a row My-Bic disables itself until the page is reloaded. All of those settings are configurable so you can change or override them.

The addition of these two features is definitely a plus for the framework - they provide two more advanced features that any developer can use thanks to the simplicity of the My-Bic framework. Some of the other features of the framework include easy forms, a built-in submission queue, and a bit to help you in debugging your scripts.

0 comments voice your opinion now!
my-bic version 0.6 release json client side encoding network down handling my-bic version 0.6 release json client side encoding network down handling


Community News:
Gabor Hojtsy Steps Down as PHP Manual Editor
February 27, 2006 @ 08:43:47

There's a pointer in this post from Sean Coates to this mailing list message from Gabor Hojtsy talking about his resignation from the post of editor of the PHP manual.

I have been pondering through this writeup in the last couple of weeks, and the recent OSCOM events [1] prompted me to be straight and honest, and step back from the leadership of the PHP Documentation and from the list on the documentation frontpage consequently.

To be honest, I have not been active the last couple of months, only pariticipated in some directional discussions, and unfortunately I don't see a light in the future to be able to contribute more. Certainly I don't deserve the position to be named and listed as the PHP Documentation Editor anymore. There are quite a few more active people, who should get the credit they deserve.

He mentions some of the other things going on in his life - work, personal life, other web development sites - and he just dosen't have the time to give it the effort it needs. He's leaving his post knowing that there are plenty of qualified people in the PHP team to take his place.

Thanks for all of your hard work, Gabor - the entire PHP community appreciates all you've done.

0 comments voice your opinion now!
manual Gabor Hojtsy editor step down manual Gabor Hojtsy editor step down



Community Events





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


library language developer series community release bugfix threedevsandamaybe api podcast application laravel wordpress list framework introduction project interview code configure

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