I'm attempting to install the Propel ORM on CentOS which has a dependency for phing. I've run the following which was succesful:
pear channel-discover pear.phing.info
pear install phing/phing
pear install Log
However when I run ./propel-gen
as is described on the Propel documentation it fails with the error:
./propel-gen: line 69: phing: command not found
However if I check to see if phing is installed it doesn't appear in the package list, yet if I try to install it again it fails:
$ pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.8 stable
Console_Getopt 1.3.1 stable
Log 1.12.7 stable
PEAR 1.9.4 stable
Structures_Graph 1.0.4 stable
XML_Util 1.2.1 stable
$ pear install phing/phing
phing/phing is already installed and is the same as the released version 2.4.7.1 install failed
I need to be able to run ./propel-gen
to test that Propel has been installed successfully, so I'm a little stuck at this point. I've also double checked that Pear is in the PHP include_path
by running the following which exits bool(true)
:
<?php
require_once 'System.php';
var_dump(class_exists('System', false));
?>
Any help in debugging & fixing this is greatly appreciated! :)
You can install Phing by adding the pear.phing.info channel to your PEAR environment and then installing Phing using the phing channel alias and phing package name: For more info, refer to the PEAR channel . Starting from version 3.0, Phing will only be available through Composer or as a .phar archive.
For more info, refer to the PEAR channel . Starting from version 3.0, Phing will only be available through Composer or as a .phar archive. The full Phing package has a more traditional directory organization and contains the full documentation, test scripts, and build.xml files for (e.g.) building the PEAR-installable package.
Pear might have potential, but it's still half-baked. The other instructions are really only suited for manual installation, and I would never, ever recommend them. This page is completely useless! PHP does not come with any PEAR stuff installed by default on Windows.
To use PEAR and PEAR compatible packages in your applications, you normally include them into your PHP scripts using require_once(). For this to work, PEAR's php_dir must be a part of PHP's include path. First, check where PEAR installs .php files: $ pear config-get php_dir.
You need to have pear's bin (executable) directory in your $PATH
variable.
Find the path with
$ pear config-get bin_dir
Add this to your path that way:
$ export PATH=$PATH:/usr/share/php/bin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With