DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: pear

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed:2008-04-18T23:31:05
Keywords:extension, PEAR
Author:ExtensionCoordinationTeam, Daniel Bruessler
Email:info@patchworking.de
Info 3:
Info 4:extension, PEAR

EXT: pear

Extension Key: pear

Copyright 2007-2008, ExtensionCoordinationTeam, Daniel Bruessler, <info@patchworking.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: pear 1

Introduction 1

What does it do? 1

Screenshots 2

Users manual 2

FAQ – How to translate the Installer 2

FAQ – How to get beta or alpha packages 2

Adminstration 2

Always secure the PEAR Manager after you have used it3

HowTo switch off the “auto-pilot” for include_path 3

Special for Windows 3

Configuration not needed 3

Tutorial to use PEAR-packages 3

Known problems 4

To-Do list 4

Changelog is pear/ChangeLog 4

Introduction

What does it do?

Install, delete, update PEAR-packages, use it in your own extensions.

TYPO3 4.2 bugfixed. Install pear before other PEAR -extensions. You can correct the extension-order [extList] in Install Manager - but don't put it before a system-extension.

With this global variables you can check if a PEAR-package is installed already and if the " auto-pilot "/ include_path setting is active:

$TYPO3_CONF_VARS['PEAR']['isAuto']
#and
$TYPO3_CONF_VARS['PEAR']['packagePath']

For a shipped-in package within your extension put it at the END of the include_path. Why? Because so admins can update the package.

See mailinglist news://t.t.extension-coordination and http://bugs.typo3.org bugtracker "tx_pear".

SECURITY: Best is if you secure the folder typo3conf/pear/ by .htaccess - otherwise use the activate/protect button. The icon of the module in the menu is changing. In the moment you have to reload the menu by yourself to see the current state of it.

Further information* http://typo3.org/teams/extension-coordination- team/ * SECURITY INFO - Be sure to disable the PEAR Manager after installing.* http://pear.php.net/ * http://pear.php.net/manual/en/installation.getting.php

Thanks for translation: Fabien Udriot (french )

have phun

(pear manual v1.1.6)

Screenshots

img-1 While installation

Users manual

For Admins: just install the extension, then follow the Administration-part. From time to time check for updates of the packages. In future the updates will also be handled by the Extension Manager.

For Extension-Developers: Use the “ini_set”-version for include_path, because so users of your extension do NOT have to care for that setting. Each PEAR-package has a version-function - just test that! In future the kickstarter will have the dependency-setting “pear-depends” - so you can set what package-versions you need.

FAQ – How to translate the Installer

open the file "locallang.xml" of the "mod1"-folder in your favorite text-editor and see how I added the german translation. Just send your changed file to me (info@patchworking.de, Daniel Bruessler) and I add it for all.

Thanks: Fabien Udriot (french)

FAQ – How to get beta or alpha packages

img-2 klick at "Configuration"-button on the left side. You see a settings-table and look for "Preferred Package State". Change the setting from "stable" to "beta" and klick "submit".

Adminstration

Just klick at "download", then "install", "next".

Configuration while install: You need not to change something! Just if you're behind a proxy you have to insert the name.

Now you see the install-process of the most important PEAR-packages.

When it's ready you see the link at the footer of the page:"Start Web Frontend of the PEAR Installer >>"

As test type this in the search-box:"PEAR_Info"

img-3 Always secure the PEAR Manager after you have used it

HowTo switch off the “auto-pilot” for include_path

Klick at Extension Manager, look for the pear-Extension, klick at it for the details. You now see the configuration - remove the check mark.

Special for Windows

After you have downloaded and installed PHP, you have to manually execute the batch file located in e.g. c:phpgo-pear.bat. The setup will ask you some questions and afterwards the PEAR Package Manager will be installed in the path, which you have specified during installation. Finally you have to add that installation path to your PATH environment. Either do this manually (Start > Control Panel > System > Environment) or run (double-click) the newly generated PEAR_ENV.reg that's now found in the PHP source directory. After that you can access the PEAR Package Manager by running the command pear in a Windows Command Prompt.

To update your PEAR installation from go-pear.org, request http://pear.php.net/go-pear in your browser and save the output to a local file go-pear.php. You can then run it in a Windows Command Prompt to start the update process:

php go-pear.php

Configuration not needed

The installation goes automatically!! You need not to change something! Just if you're behind a proxy you have to insert the name.

Tutorial to use PEAR-packages

When your installation is ready the PEAR Manager shows you how to set the include_path to localconf/ext/pear/PEAR .

As a start: install the package “PEAR_Info” (just type the name in the search-box of PEAR Manager), check that include_path is correct, disable the PEAR Manger again, and then put this into a new extension or as single PHP-file:

<?php
    require_once 'PEAR/Info.php';

    // If you need to set a http_proxy value at run-time you can use the
    following, this must be called BEFORE instantiating the PEAR_Info object
    // PEAR_Info::setProxy('your.proxy.here');

    // Instantiate PEAR_Info object
    $info = new PEAR_Info();

    // Show output
    $info->show();
?>

Known problems

The Safe Mode/ open_basedir – restriction is not handled in the moment. If you find a solution then please contact me at info@patchworking.de , Daniel Bruessler. If somebody is behind a proxy then please tell me what settings are needed. Thanks!!

For Windows-problems see GNU Utils (http://gnuwin32.sourceforge.net/packages/wget.htm)

If you find a bugs so please report it to http://bugs.typo3.org bugtracker category “tx_pear”.

To-Do list

Workaround for current and old versions of Extension Manager:

  • ship the PEAR-class with your extension - as fallback
  • link from your BE-module to the PearManager (if installed) so that people can update by itself

Next step for this Extension:

create "bridge"-functions or a service that uses this pear-extension to get the right package-version

Future version of Extension Manager: Call pear-extension to check if package X ist available and what version it has, make request for installation when package X is in need. Provide settings for stable / beta/ alpha in Extension Manager. Put PEAR Manager as function into the Extension Manager.

When Extension Manager and TER provides pear-dependencies the kickstarter can be extended to use the kind "pear-depends".

Changelog is pear/ChangeLog

img-4 EXT: pear - 4