<< Back to Extension manuals page
- 1 What does it do?
- 2 Screenshots
- 3 Users manual
- 4 Adminstration
- 5 Configuration not needed
- 6 Tutorial to use PEAR-packages
- 7 Known problems
- 8 To-Do list
- 9 Changelog is pear/ChangeLog
What does it do?
Install, delete, update PEAR-packages, use it in your own extensions.
Install pear before other PEAR-extensions. You can correct the extension-order [extListArray] in the Install Tool - but don't put it before a system-extension.With this global variables you can check if a PEAR-package is installed 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.
The central path for the PEAR-packages has changed: "typo3conf/pear/PEAR". The "auto-pilot" puts this as first PEAR-package into the include_path. Use the INSTALL-manager to put pear as last extension in the extension-key-list, if you want to update PEAR-packages from any TYPO3-extension.
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.
- SECURITY INFO - Be sure to disable the PEAR Manager after installing.
Thanks for translation:Fabien Udriot (french )
(pear manual v1.1.6 +0 changes)
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 (Daniel Brüßler) and I add it for all.
Thanks: Fabien Udriot for french translation
FAQ - How to get beta or alpha packages
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"
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:\php\go-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:
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();
The Safe Mode/ open_basedir - restriction is not handled in the moment. If you find a solution then please contact me at email@example.com, Daniel Brüßler. 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 bugtracker category "tx_pear".
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
See current version