 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPMaster.com: A Tour of PHP.INI
by Chris Cornutt December 12, 2011 @ 10:42:45
On PHPMaster.com today Callum Hopkins has written up an introduction to the php.ini, the heart and soul of any PHP installation. With configuration options for just about everything, it can be confusing. This tutorial hits some of the highs and most commonly updated settings.
Anyone who has a server using PHP has undoubtedly heard of php.ini - it's the configuration file used to control and customize PHP's run-time behavior. It provides a simple way to configure settings. [...] In this article I'll give an overview of some important settings I believe you should be concerned with when tweaking your own php.ini file.
The tutorial's broken up into a few different topics:
- the PHP engine
- Short tags
- Output buffering
- Automatic headers and footers
- Handling errors
- Time zones
voice your opinion now!
phpini configuration tutorial file setting
Kevin Schroeder's Blog: Pre-caching FTW
by Chris Cornutt January 07, 2011 @ 11:16:57
In this new post to his blog Kevin Schroeder suggests that there's something even better than doing the typical caching inline (request, write to cache) - pre-caching.
I just had an epiphany. I've talked about pre-caching content before and the benefits thereof before. But this is the first time I realized not only that there are benefits, but that doing it is BETTER than caching inline. Let me sum up... no, there is to much. Let me explain.
He gives an example of how a typical application might cache - when it finds a "miss" for the data it's trying to pull. A simple cache is easy, but what happens if it uses a configuration value that could change (like the username/password in his second example). Pre-caching would eliminate the risk since the setting would be known to be valid when the cache is generated.
voice your opinion now!
caching precache inline setting invalid miss
SitePoint PHP Blog: How to Upload Large Files in PHP
by Chris Cornutt August 17, 2010 @ 08:44:18
On the SitePoint PHP blog today Craig Buckler talks about uploading large files in your PHP application. He points to two other resources - this manual page and this introductory tutorial about handling file uploads to get the ball rolling.
One of the most popular uses is image uploads. Your users can submit photographs from a form without resorting to FTP or other convoluted methods. HTML5 and Flash also permit drag and drop, so the operation is likely to become easier as browsers evolve. This is where the problems can begin.
He points out the large size of the images most modern cameras work with and how PHP, with its basic settings, can't handle a lot of the resulting images. He mentions the upload_max_filesize and post_max_size settings you can set in either your php.ini or via an .htaccess (or even in your script). There's also a few helpful comments with more tips on large file handling.
voice your opinion now!
upload large file tutorial phpini setting
Brian Moon's Blog: Using ini files for PHP application settings
by Chris Cornutt January 20, 2010 @ 10:40:39
In a new post to his blog Brian Moon looks at a handy piece of functionality that comes with the default PHP installations (and is used by several major frameworks like this one) - using INI files to store settings for an application.
One of the challenges of this [three tier server setup] is where and how to store the connection information for all these services. We have done several things in the past. The most common thing is to store this information in a PHP file. [...] We have taken [it] one step further using some PHP ini trickeration. We use ini files that are loaded at PHP's startup and therefore the information is kept in PHP's memory at all times.
They use the get_cfg_var function and the "--with-config-file-scan-dir" option to tell PHP to automatically load in the ini files it finds in the named directory. He gives an example of both a simple configuration and a more complex situation where a MySQL instance can read from the ini file containing the username/password/host information.
voice your opinion now!
ini file setting getcfgvar tutorial
Rob Allen's Blog: Accessing your configuration data in application.ini
by Chris Cornutt December 01, 2009 @ 08:58:23
Rob Allen has a quick tip for Zend Framework users looking to get to the configuration values in their application.ini file.
Zend_Application will read the data in your application.ini and make it available from your bootstrap's getOptions() method. It then sets the bootstrap as a parameter in the front controller. Note that the top level keys are all normalised to lowercase too. You can then retrieve the options in a number of ways.
He gives examples of pulling them into a controller, an object outside the controller and an interesting conflict that using the Zend_Config component could cause.
voice your opinion now!
zendframework configuration setting tutorial
Brandon Savage's Blog: Configuring PHP Essential INI Settings
by Chris Cornutt September 28, 2009 @ 08:40:46
Brandon Savage has a new post to his blog today looking at some of the more essential settings to check out in your php.ini file when configuring your install.
When setting up a web server with PHP, there are a number of settings that are critical to consider. PHP 5.3 contains both a development INI file and a production INI file; however, users of older PHP releases (or those who don't have direct control over their INI files) will want to pay attention and make sure that certain settings are configured.
Settings in his list include:
- register_globals
- display_errors
- error_reporting
- short_open_tag
These are just a handful of the settings you can configure in your php.ini. Check out this list for many, many more.
voice your opinion now!
phpini configure setting
PHPFreaks.com: Working with checkboxes and a database
by Chris Cornutt January 12, 2009 @ 21:13:12
On the PHPFreaks.com website a new tutorial (by Ben Smithers) looks at interfacing checkboxes in your application's form with a backend database.
The concept is actually pretty simple. It involves naming your checkbox as an array and the use of the IN mysql clause. This tutorial aims to give a simple example in the hope that, next time someone asks, I can point them to a tutorial rather than explaining all over again.
They include the database structure, insert statements and the code needed to pull and push the information for the checkboxes.
voice your opinion now!
checkbox database tutorial admin setting
|
Community Events
Don't see your event here? Let us know!
|