News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

PHPro.org:
Application Configuration
November 04, 2008 @ 12:09:17

Kevin Waterson has posted a new tutorial today looking at a key part of any web application - the configuration settings and how they can be stored.

PHP applications come in many shapes and sizes. Some used locally from command line, and more commonly, for web based applications. More often than not, regardless of size or type, some form of configuration variables will be stored for global access. [...] Each options has its pros and cons. Here each of these options is explored to see which method is right for your application.

He looks at four different options:

  • an ini file that can be parsed/modified directly by PHP
  • an XML file slightly more complex, but still simple for PHP to use
  • a PHP file with things like PHP arrays defining settings
  • and a database with one or more configuration tables

Each type comes with some example code and format to give you an idea of how they'd work.

1 comment voice your opinion now!
application configuration ini xml database native



Stefan Esser's Blog:
Suhosin Updates - Improved Randomness & LAZY Symbol Loading
August 25, 2008 @ 12:06:01

Stefan Esser has released a new update (really two, but one is the latest) to his Suhosin patch for PHP - version 0.9.27.

The previous update (0.9.26) updated the utility with an improved randomness fixing a few issues with an ini setting and the uploadprogress extension as well as adding in a few new settings and updates to the randomizing functions that come included in PHP.

The 0.9.27 update (the most current) updates the patch with a lazy loading change that allows it to work correctly on systems that have it disabled by default (causing the previous patch to not work).

You can grab this latest release, 0.9.27, from the suhosin website.

0 comments voice your opinion now!
lazy loading improve random suhosin ini patch


Brian DeShong's Blog:
Small news that's big to me my PHP Testfest submissions made it into 5_3!
June 13, 2008 @ 10:25:12

Congrats to Brian DeShong for having his submissions from this year's TestFest be included in the next release of PHP, version 5.3's build.

Someday I'll look back on this post and think it's super lame, but my recent submission of two tests for PHP's putenv() function made it into PHP_5_3! I've officially made a contribution it's a red letter day, folks. Without Atlanta PHP and PHP's Testfest, none of this would have been possible.

His tests ran with putenv() and the safe_mode_allowed_env_vars/safe_mode_protected_env_vars settings in use. You can see the inclusion in this commit message (by Lars Strojny).

0 comments voice your opinion now!
putenv function safemode ini setting php5 codecoverage


Pierre-Alain Joye's Blog:
cache added to htscanner
December 08, 2006 @ 07:48:00

Pierre-Alain Joye has an update on one of the PECL packages he maintains, htscanner, on his blog today:

htscanner 0.6.0 has been released. It caches the ini settings instead of looking for htaccess files in the current directory and its parents. The performance impact is yet minimal.

A new ini setting was also added, htscanner.default_ttl, to give the lifetime of the cache. You can get this latest version of htscanner from its PECL homepage.

0 comments voice your opinion now!
htscanner cache ini setting pecl package release htscanner cache ini setting pecl package release


PHPit.net:
Creating a PHP Settings Class
June 20, 2006 @ 09:35:03

PHPit.net is back again today with yet another great tutorial. This time, they help you create a class to manage the settings for your application that not only supports plain-text, but INI, XML, and YAML formats as well.

A config.php or a settings.xml file is a very common thing for most PHP scripts, and it's usually where all the script settings (e.g. database information) are stored. The easiest way is to simply use a simple PHP script as a config file, but this may not be the best way, and it's certainly not the most user-friendly way.

In this tutorial we'll have a look at creating a Settings class which can handle any type of config format. I'll take you through the steps necessary to handle four different formats (PHP, INI, XML and YAML), but it's very easy to add more formats.

To start, they build the base class before quickly adding the get() and load() functions to pull in the external content. First on the list, they extend the base and make a pure PHP implementation holding the settings. Following that, they move on to the INI format, using PHP's parse_ini_file function to make it simple.

Last but not least, they venture into something a bit more complex - working with XML and the YAML formats to create this simple, handy tool.

0 comments voice your opinion now!
settings class tutorial ini text parse_ini_file xml yaml settings class tutorial ini text parse_ini_file xml yaml



Community Events









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


zendframework developer PHP5 code release framework application ajax zend job example security releases cakephp database conference book mysql PEAR package

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