# files

files

Monday, August 16, 2010 - 23:56

Drupal has two ways in which to allow users to download files, these are private and public.

With public the files are open for anyone to download and Drupal is not involved in the download process. This means that no statistics are recorded or permissions used when downloading the file. Each file is referenced by name.

Category:

## Drupal Files Migration Script Using Phing

Tuesday, November 24, 2009 - 22:32

The other day I needed to copy a Drupal project from my source folder to another folder, so rather than manually copy the files I decided to create a Phing script that would do it for me in one go. This Phing script will export your Drupal project into another directory, change the database credentials and create zip and tar files of the project. The first thing to do is create a properties, here is the contents of that file.

Category:

## Zend Lucene And PDF Documents Part 4: Searching

Monday, November 16, 2009 - 11:35

Last time we had indexed our PDF documents and were ready to add a search form to our application. Adding search requires two things, the form to enter the search terms into and an action to control what happens when the form is submitted.

Category:

## Zend Lucene And PDF Documents Part 3: Indexing The Documents

Thursday, November 5, 2009 - 10:03

Last time we had reached the stage where we had PDF meta data and the extracted contents of PDF documents ready to be fed into our search indexing classes so that we can search them.

The first thing that is needed is a couple of configuration options to be set up. This will control where our Lucene index and the PDF files to be indexed will be kept. Add the following options to your configuration files (called application.ini if you used Zend Tool to create your applcation).

 1 2  luceneIndex = \path\to\lucene\index filesDirectory = \path\to\pdf\files\
Category:

## Starting And Stopping Apache Using Windows .bat Files

Wednesday, June 3, 2009 - 21:41

Following on from the post about starting and stopping MySQL using .bat files I decided to add commands to these files that also controlled Apache in the same way. This turned out to be a lot easier than trying to start and stop MySQL as the command line commands for httpd executable worked very well in .bat files.

So, to start Apache use the following line.

Category:

## Reading And Writing To Compressed gzip Files

Thursday, April 23, 2009 - 12:01

Reading and writing to compressed gzip files can be done in much the same way as reading and writing normal files. The main difference is the use of some special functions that compress and uncompress the data. Rather then use fopen() to open a file, you open a compressed file with gzopen(). This is the case for many of the file access functions, although you should be aware that they don't all work exactly the same as each other. Here are some examples of the compression functions in use. To read from a compressed file use the following script.
Category: