Hi Michael, > I've used this command to install phpCAS (in one line): > > pear install > http://www.ja-sig.org/downloads/cas-clients/php/1.0.0/CAS-1.0.0.tgz > > But it didn't work because some modules were installed under > /usr/share/php5/PEAR/CAS/CAS/. > ^^^^ > I moved /usr/share/php5/PEAR/CAS/CAS.php to /usr/share/php5/PEAR/ and > /usr/share/php5/PEAR/CAS/CAS/* to /usr/share/php5/PEAR/CAS/ and now it > works.
> Seems that something's wrong with this PEAR installation. Since I don't > know how it works I can't help by providing a patch though. The php CAS files are installed in CAS/CAS.php, and that's how you should include/require them. PEAR will install packages in the directory specified by pear's php_dir configuration value (pear config-get php_dir). Also note, that for this to work with your PHP installation, that directory must also be in php's include path. On my machine, I have it set to /usr/local/lib/php As I tested this morning: ucommbieber:~ bbieber$ pear config-get php_dir /usr/local/lib/php ucommbieber:~ bbieber$ sudo pear install http://www.ja-sig.org/downloads/cas-clients/php/1.0.0/CAS-1.0.0.tgz downloading CAS-1.0.0.tgz ... Starting to download CAS-1.0.0.tgz (155,884 bytes) .................................done: 155,884 bytes WARNING: "pear/DB" is deprecated in favor of "pear/MDB2" install ok: channel://__uri/CAS-1.0.0 ucommbieber:~ bbieber$ pear list __uri/CAS Installed Files For __uri/CAS ============================= Type Install Path ... ...other CAS files here... ... php /usr/local/lib/php/CAS/CAS.php ucommbieber:~ bbieber$ ls -al /usr/local/lib/php/CAS/CAS.php -rw-r--r-- 1 root wheel 45538 Aug 14 09:27 /usr/local/lib/php/CAS/CAS.php ucommbieber:~ bbieber$ php -i | grep include_path include_path => .:/usr/local/lib/php => .:/usr/local/lib/php Which will work when you include the class using <?php require_once 'CAS/CAS.php'; Testable by using: ucommbieber:~ bbieber$ php -r "require_once 'CAS/CAS.php';" && echo TRUE || echo FALSE TRUE means it works, FALSE means it doesn't. Feel free to ask more questions regarding PEAR on the pear-general list Hope that helps! -- Brett Bieber http://saltybeagle.com/ _______________________________________________ Yale CAS mailing list [email protected] http://tp.its.yale.edu/mailman/listinfo/cas
