Pigalle FAQ - frequently asked questions

This is a work in progress. If you have a question that you think would benefit others using Pigalle, please add it to the comments and we will address it in this FAQ.

  • Pigalle User
    • How do I run Pigalle with a file extension different to .php (e.g. .php5) ?
    • How do I rename my file extensions (Linux/Unix) ?
    • How do I rename my file extensions (Windows) ?
  • Developer

Pigalle User

How do I run Pigalle with a file extension different to .php (e.g. .php5) ?

As Pigalle is designed to easy run with different file extensions, this is a pretty simple task. You should make sure, though, that you are running Pigalle 0.75-alpha or newer version, as extension handling was a bit messy in earlier versions.

Rename all your file extensions (according to the FAQ entries below) and set the new extension in phpext.inc:

// Change this if you are using a PHP file extension different to 'php':
define('PIGA_PHPEXT', 'php5');

That's it!

How do I rename my file extensions (Linux/Unix) ?

On a Unix system, use the file renaming script provided with Sourdough [1], which can be found in sourdough/resources/scripts/extrename.pl. Enter the YaBook root directory and execute it from there. This small Perl-script is preconfigured to change .php extensions to .php5. Open it and change its configuration, if required.

$> cd pigalle/
$> cp private/lib/sourdough/resources/scripts/extrename.pl .
$> chmod u+x extrename.pl
$> ./extrename.pl

We have now renamed all files to the new extension. The script didn't rename any thirdparty files included in the Sourdough framework, but you don't need to worry about this.

How do I rename my file extensions (Windows) ?

Sourdough [2] provides you with a batch script to rename your file extensions. It can be found in sourdough/resources/scripts/extrename.bat and uses forfiles.exe.

Before applying the script to your files, please temporarely move away the thirdparty directory from your file structure as those files should keep their .php extension. Move private/lib/sourdough/thirdparty to e.g. C:\Temp.

Now copy the script to your Pigalle root directory and execute it:

> CD pigalle/
> COPY private/lib/sourdough/resources/scripts/extrename.bat .
> COPY private/lib/sourdough/resources/scripts/forfiles.exe .
> EXTRENAME.BAT php php5

The sample above shows you how to rename all .php extensions to .php5. Change the command parameters according to your needs.

After the script has renamed everything, move back your thirdparty directory from C:\Temp to the original location private/lib/sourdough/thirdparty. If you know any better way of excluding the thirdparty directory from file renaming in the extrename.bat script, please let me know and post it to the [sourdough-devel] [3] mailing-list.



Driven by coWiki 0.3.4 web collaboration tool.