JulianY Posted March 23, 2007 Share Posted March 23, 2007 I am able to install PEAR with not problems, but I would like to be able the pear modules with my distributable application and have my install program finalize the paths. can any one tell me how this can be done ? Regards JY Quote Link to comment https://forums.phpfreaks.com/topic/43950-bundling-pear/ Share on other sites More sharing options...
Koobi Posted March 24, 2007 Share Posted March 24, 2007 PHP itself can't install PEAR. You might have to specify PEAR as a requirement for your application. php.ini will hold the path to PEAR so you don't have to worry about your application figuring out the paths. you can also try this... Package the PEAR base along with the modules that you need with your application. And within your application, use ini_set() to set the 'include_path' to point to the directory where you packaged your PEAR base and modules. I recall there is a strict folder structure you have to follow when installing PEAR manually (manual installation is apparently not recommended) and this was on the FAQ of the PEAR site a long time ago. I can't verify this because any subdomains of php.net haven't been working for the last 24 hours for me but this may be due to my geographical location so give it a try yourself: http://pear.php.net Quote Link to comment https://forums.phpfreaks.com/topic/43950-bundling-pear/#findComment-214433 Share on other sites More sharing options...
JulianY Posted March 25, 2007 Author Share Posted March 25, 2007 What I am looking to do is have PEAR "installed" in APLICATIONBASE/lib/PEAR. unzip/tar the whole application and then have min install.php set the APLICATIONBASE variables. The problem is that I thought that PEAR has some full (ie no relitive) paths in it's registry? Julian Quote Link to comment https://forums.phpfreaks.com/topic/43950-bundling-pear/#findComment-214733 Share on other sites More sharing options...
Koobi Posted March 25, 2007 Share Posted March 25, 2007 i believe PEAR stores it's configuration (registry, as you call it) in a .pearrc file. most web applications don't have enough permissions to make those changes. if they do, that's not a good thing. when PHP uses a PEAR class, you simply give the package folder's name and then the class name as you may already know...such as: include 'Crypt/BlowFish.php'; that's because the path to the PEAR base folder (i.e. where PEAR and the Crypt folders reside) is set in php.ini's include_dir directive. so you can use ini_set() to set include_dir in your application. at the installation point, you would have to ask the user to enter the path to their PEAR installation and set that in your application. i just had a look at the PEAR site, it says that manual installation is not advised so you might want to reconsider encouraging manual set up of PEAR by packaging the PEAR libs. see: Manual installation however, i don't see a problem packaging a PEAR module with your app and setting the include_dir path as i mentioned above...but i wouldn't attempt to set up the PEAR base within my application. Quote Link to comment https://forums.phpfreaks.com/topic/43950-bundling-pear/#findComment-214750 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.