News Feed
Jobs Feed
Sections




Recent Jobs

News Archive
feed this:

NETTUTS.com:
CodeIgniter from Scratch File Uploading and Image Manipulation
February 23, 2010 @ 08:09:17

On NETTUTS.com there's a recent tutorial - the ninth part of the "CodeIgniter from Scratch" series - posted (by Burak Guzel) for all of the users of this popular framework out there. It looks at, starting from the very beginning, how to create an upload and image manipulation script for use in the framework.

In lesson nine of our CodeIgniter series, we'll build a small image gallery that allows you to upload files, and automatically create thumbnails

He links to the previous eight parts of the series if you need to catch up as well as the source code for this installment so you can follow along with the screencast. For those more on the go, you can also download the screencast and watch it whenever.

0 comments voice your opinion now!
tutorial file upload image manipulate screencast



Programming Facts Blog:
Upload large(Big) files in PHP using .htaccess
February 17, 2010 @ 13:19:06

Rakshit Patel has posted a tip to the Programming Facts blog that those out there wanting to upload larger files through your application - change your settings via one of three ways to tell PHP it's okay.

I have seen many developers who find difficulties when working with larger files upload in php. When files which are too large in size [...] If you are uploading file which is larger than 2MB size than here i am showing you the way to upload larger files using PHP.

The method's pretty much the same in each of the three methods. You can either have the settings in your httpd.conf (if you have access to it), in the php.ini or in a .htaccess file in the directory your PHP script is in.

0 comments voice your opinion now!
upload large file tutorial phpini httpdconf htaccess


Matthew Turland's Blog:
Splitting PHP Class Files
January 25, 2010 @ 13:23:56

Matthew Turland, in trying to solve a problem from work, needed a way to split out some code into two files to simplify and make it easier to use them individually.

The issue I ran into was due to all the generated PHP classes being housed in a single file. I had to process two WSDL files that had several identical user-defined types in common. As a result, I couldn't simply include the two PHP files generated from them because PHP doesn't allow you to define two classes with the same name.

He used the tokenizer extension to create a simple command-line script that did the splitting for him. This script could potentially be used for splitting out other kinds of files too - "unpacking" them from their combined state. You can download the latest version from Matthew's github account.

0 comments voice your opinion now!
tutorial split class file wsdl


Brian Moon's Blog:
Using ini files for PHP application settings
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.

0 comments voice your opinion now!
ini file setting getcfgvar tutorial


Andrew Johnstone's Blog:
Lock Files in PHP & Bash
January 05, 2010 @ 12:40:39

Andrew Johnstone, inspired by a previous post on file locking to avoid cron job overlaps, as posted his own method and give a few more examples of how it can be done.

In order for a lock to work correctly it must handle, Atomicity / Race Conditions, and Signaling. I use the following bash script to create locks for crontabs and ensure single execution of scripts.

His bash script looks at the processes currently running and checks to be sure there's not already one there. If not, it takes the script given and executes an instance. If the process has finished running but the lock file is still there, it removes it and moves on to the execute. He includes a few examples of how to use it and the code for a PHP class that makes it easy to check if something's running, locked or what the current signal/status of the process is.

0 comments voice your opinion now!
lock file bash script tutorial


Abhinav Singh's Blog:
How to use locks in PHP cron jobs to avoid cron overlaps
December 29, 2009 @ 12:45:31

In this new post from Abhinav Singh on how to use file locking to keep your cron jobs from trying to use the same resources.

Cron jobs are hidden building blocks for most of the websites. They are generally used to process/aggregate data in the background. However as a website starts to grow and there is gigabytes of data to be processed by every cron job, chances are that our cron jobs might overlap and possibly corrupt our data. In this blog post, I will demonstrate how can we avoid such overlaps by using simple locking techniques. I will also discuss a few edge cases we need to consider while using locks to avoid overlap.

He includes some sample code - both the class to create the functionality and a script showing how to make use of it (and, of course, an example of it in use).

0 comments voice your opinion now!
cron file lock tutorial


Kae Verens' Blog:
multiple file uploads using HTML5
December 29, 2009 @ 09:57:05

Kae Verens has come up with a tutorial using a feature of HTML5 - multiple file uploads.

As a response to a reported bug where Chrome was taking ages to load up a flash multiple-file uploader, I've updated KFM to use HTML5's multiple-file input box where possible.

The code examples in the post show how to use a square bracket ("[]") set in the name of a file upload field, how they're handled on the PHP side and how they can be accessed in the FILES superglobal.

0 comments voice your opinion now!
html5 multiple file upload


Developer.com:
Managing File Uploads with the Zend Framework
November 06, 2009 @ 07:56:50

On Developer.com today there's a new tutorial that looks at working with file uploads in Zend Framework applications and looking more specifically at the Zend_File_Transfer component.

Chances are you've become well acquainted with the Web-based mechanism used to upload files to the Web. But how does this mechanism actually work? What process results in the file being transferred from your computer to the remote server? In this tutorial I'll show you how to create your own file upload mechanism using the popular Zend Framework, which makes accepting, validating, and processing uploaded files a walk in the park.

They look at creating a simple upload form and how to tie a Zend_File_Transfer instance to the backend of it to make uploading and validating the files a simple process. You can find out more information on the component here and another related component, Zend_ProgressBar, here.

0 comments voice your opinion now!
zendframework file upload zendfiletransfer


DotVoid.com:
Problem with downloading files with Internet Explorer over HTTPS
October 01, 2009 @ 09:48:28

On the DotVoid.com blog Danne shares a quick tip on forcing downloads over HTTPS to Internet Explorer (which, of course, has to be difficult about it).

The problem is that Internet Explorer does not handle file dowloads without caching over https very well. Or at all. According to knowledge articles on Microsofts website the problem occurs when having one or two of the http headers. [...] Previously I have have just omitted the http header "Pragma: nocache" for IE but it seems it does not always help.

So the fix is relatively simple - rely on the $_SERVER['HTTP_USER_AGENT'] value to tell if it's an IR browser or not. If it is, "Pragma: cache" works. If not, stick with "Pragma: no-cache".

0 comments voice your opinion now!
download file ie browser https tutorial


NETTUTS.com:
Online File Storage with PHP
July 16, 2009 @ 10:28:42

This new tutorial from NETTUTS.com takes a look at creating an online file storage system - uploading files and having them linked for download.

In this tutorial, I will show you how easy it is to create an online file storage system with PHP. You will learn how to upload files with PHP and list them by scanning the "uploads" folder.

You can download the source to get started right away or you can work through their tutorial - complete with code snippets and screenshots - to build out this simple system. They also throw in a little Javascript (jQuery) to show/hide files based on which of the file types you select.

0 comments voice your opinion now!
download tutorial storage file



Community Events









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


opinion sqlserver release developer drupal symfony podcast wordpress windows hiphop framework codeigniter facebook conference apache extension feature microsoft zendframework job

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