Phlickr Installation

Phlickr is released as a PEAR package which you can download from SourceForge.

Prerequisites

Make sure that you are running PHP version 5. You can check the version using the following command:

$ php -v
PHP 5.0.4 (cli) (built: Mar 31 2005 02:45:48)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies

Make sure that PHP is compiled with the CURL and SimpleXML extensions. You view a list of the modules using the following command:

$ php -m
[PHP Modules]
...
curl
...
SimpleXML
...

[Zend Modules]

If the CURL and SimpleXML modules aren't listed take a look at the enabling modules page.

MacOS X

OS X ships with PHP 4 so you'll have to upgrade to PHP 5. I've had reports that Marc Liyanage's PHP 5 package works well. Make sure that you remove all the PHP 4 programs from the path and then re-install PEAR.

PEAR Installation

The simplest way to install Phlickr is with PEAR installer

  • Make sure that PEAR is installed. If you need help take a look a the PEAR installation instructions.
  • Open up a shell/command prompt and change to the directory where the package was saved.
  • Use PEAR to install the package:
    $ pear install Phlickr-0.2.4.tgz
    Optional dependencies:
    'curl' PHP extension is recommended to utilize some features
    'SimpleXML' PHP extension is recommended to utilize some features
    install ok: Phlickr 0.2.4

Manual Installation

If you encounter problems using the PEAR installer you can manually install Phlickr.

UNIX (and OSX)
  • Untar the package: $ tar xzf Phlickr-0.2.4.tgz
  • Delete the package.xml file, it's only used by the PEAR installer: $ rm package.xml
  • Move the Phlickr directory to a folder that's in PHP's include path: $ mv Phlickr-0.2.4 /to/some/path

If you're curious what directories are in your include path you can try the following command:

$ php -r 'print get_include_path() . "\n";'
.:/usr/local/share/pear/:/usr/local/lib/php/pear:/usr/local/share/smarty

Windows

Use something like 7-zip or Winzip to extract the contents of the Phlickr-0.2.4.tgz file into a a directory in your include path.

If you're curious what directories are in your include path you can try the following command:

C:\>php -r "print get_include_path();"
.;c:\php\includes;C:\PHP\pear;d:\sf\phlickr;

That's it!

You should now be able to either run the unit tests or some of the sample code.

Free The Airwaves

FreeTheAirwaves.com

User login