Koobi Posted June 6, 2006 Share Posted June 6, 2006 How many of you actually use PEAR classes in your projects?Sometimes I find them a bit bloated...but sometimes time is an issue and at the cost of optimization and they're easy to use so I put on my Vader shorts and use PEAR heheheand if you do use PEAR, what do you think you would say is your favourite package apart from PEAR or PEAR-Info?what about the rest of you?For those of you who think I'm talking about a fruit: [a href=\"http://pear.php.net/\" target=\"_blank\"]PEAR[/a] Quote Link to comment https://forums.phpfreaks.com/topic/11367-pear-classes-how-many-of-you-use-it/ Share on other sites More sharing options...
ober Posted June 7, 2006 Share Posted June 7, 2006 The only part of PEAR I've even come close to using is an Excel spreadsheet class.What do you use from PEAR? Quote Link to comment https://forums.phpfreaks.com/topic/11367-pear-classes-how-many-of-you-use-it/#findComment-42653 Share on other sites More sharing options...
jeremywesselman Posted June 7, 2006 Share Posted June 7, 2006 I have used PEAR DB on a couple of projects. It's alright. I use it mostly when separating content from logic. But lately I have been messing around with CakePHP. I think it is really neat how everything works together like it does.[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--] Quote Link to comment https://forums.phpfreaks.com/topic/11367-pear-classes-how-many-of-you-use-it/#findComment-42715 Share on other sites More sharing options...
Koobi Posted June 7, 2006 Author Share Posted June 7, 2006 ober: i've been using PEAR's QuickForms and I used ITX briefly, I love it's Console class and phpDocumentor is great too for documentation purposes.jeremywesselman, is CakePHP fast? Quote Link to comment https://forums.phpfreaks.com/topic/11367-pear-classes-how-many-of-you-use-it/#findComment-42722 Share on other sites More sharing options...
ober Posted June 7, 2006 Share Posted June 7, 2006 Can you describe what ITX is and how you use phpDocumentor?? Quote Link to comment https://forums.phpfreaks.com/topic/11367-pear-classes-how-many-of-you-use-it/#findComment-42759 Share on other sites More sharing options...
Koobi Posted June 7, 2006 Author Share Posted June 7, 2006 ITX is a templating class. seems to be good. I like how QuickForms seamlessly integrates with Smarty.frankly i don't like templating engines so much, especially smarty because it seems bulky but sometimes its not my choice :/[a href=\"http://pear.php.net/manual/en/package.php.phpdocumentor.intro.php\" target=\"_blank\"]phpDocumentor[/a] is amazing. cuts out any documentation i have to work. the only hitch is that you have to use a certain documentation format for your functions so that when you run your source files through phpdocumentor, it can pick out what it needs to document. it's not much of a problem for me because i've created a keybinding in vim to auto generate the necessary documentation format depending on a functions parameters, return values, etc.if i'm not mistaken, phpdocumentor is what was used to document the PHP Manual...kinda similar to JavaDoc.it's hard to explain, the best thing to do is to have a look at the site:[a href=\"http://pear.php.net/manual/en/package.php.phpdocumentor.intro.php\" target=\"_blank\"]http://pear.php.net/manual/en/package.php....entor.intro.php[/a] Quote Link to comment https://forums.phpfreaks.com/topic/11367-pear-classes-how-many-of-you-use-it/#findComment-42788 Share on other sites More sharing options...
ober Posted June 7, 2006 Share Posted June 7, 2006 Ok... stupid question, I went about enabling PEAR on my company server and I want to install the QuickForm package, but I have no idea what I'm supposed to do with the files. Where do I put them? Quote Link to comment https://forums.phpfreaks.com/topic/11367-pear-classes-how-many-of-you-use-it/#findComment-42789 Share on other sites More sharing options...
Koobi Posted June 7, 2006 Author Share Posted June 7, 2006 i forgot to mention that i use PEAR DB too. i actually quite like that class. very nice functions in it and overall, a very nicely constructed class without too many frills.[!--quoteo(post=380988:date=Jun 7 2006, 07:21 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ Jun 7 2006, 07:21 PM) [snapback]380988[/snapback][/div][div class=\'quotemain\'][!--quotec--]Ok... stupid question, I went about enabling PEAR on my company server and I want to install the QuickForm package, but I have no idea what I'm supposed to do with the files. Where do I put them?[/quote]well PEAR provides an installer. if you can get to a terminal, type:[code]pear[/code]and it will show you all the options.this would show you the list of available PEAR packages:[code]pear list-all[/code]so typically, if i wanted to find the quickforms package, and install it, i would do it in this sequence:[code]pear search quickform # searches for the package 'quickforms'pear install HTML_QuickForm # installs HTML_QuickForms which was found from the previous commandpear info HTML_QuickForm[/code]although those commands arent working for me at the moment...i think somethings temporarily wrong at PEAR's end.and if you want to use quickforms, this is a good start:[a href=\"http://pear.php.net/manual/en/package.html.html-quickform.tutorial.php\" target=\"_blank\"]http://pear.php.net/manual/en/package.html...rm.tutorial.php[/a]once you're done installing PEAR, depending on if you've edited any config variables, PEAR will be installed to that directory. by default this is generally /usr/share/php or /usr/share/pear (it's stored in php.ini under the include_path directive)nice system. only thing is i think some classes are a bit too heavy but i really like the DB class...especially since i'm not too fond of handling db related issues via PHP. you should also look at the Console package for PEAR...the member functions are really nicely constructed and thought through.let me know if i can be of more help on this subject. Quote Link to comment https://forums.phpfreaks.com/topic/11367-pear-classes-how-many-of-you-use-it/#findComment-42883 Share on other sites More sharing options...
ober Posted June 7, 2006 Share Posted June 7, 2006 Pardon me because I'm probably missing something very simple... but is it going to find the quickform package on the harddrive by default... or do I have to put it in a specific place? And do I leave it zipped up or do I extract it down to the folder + package.xml file? Quote Link to comment https://forums.phpfreaks.com/topic/11367-pear-classes-how-many-of-you-use-it/#findComment-42913 Share on other sites More sharing options...
Koobi Posted June 7, 2006 Author Share Posted June 7, 2006 [!--quoteo(post=381114:date=Jun 8 2006, 01:27 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ Jun 8 2006, 01:27 AM) [snapback]381114[/snapback][/div][div class=\'quotemain\'][!--quotec--]Pardon me because I'm probably missing something very simple... but is it going to find the quickform package on the harddrive by default... or do I have to put it in a specific place? And do I leave it zipped up or do I extract it down to the folder + package.xml file?[/quote]i believe what you're trying to do is manually install it.it's better to use the built in PEAR installer. if you're on an up to date PHP installation, you probably have the PEAR base installer unless you compiled PHP with the --without-pear flag.if you're on *nix, you can install the PEAR base installer via your repository. I know debian/ubuntu/gentoo/freeBSD repositories have it. simply search for "PEAR" in your repositories and install PEAR and PEAR-info because those are dependencies for any PEAR class as all the other classes inherit things such as error handling from them. and once you have pear, you can use it via CLI as i've posted above.if you're on a Win machine and you dont have PEAR, i suppose you could follow these instructions here: [a href=\"http://pear.php.net/manual/en/installation.getting.php\" target=\"_blank\"]http://pear.php.net/manual/en/installation.getting.php[/a]either way, once you have PEAR installed, simply use the commands i've mentioned above to install and in general, manage any PEAR classes because it handles dependencies to an extent.what really happens is, it downloads and copies the packages you request to a folder that is determined in the PEAR configs which in turn was determined by PHP's settings. this path to the PEAR files is appended to php.ini if i'm not mistaken (either that or PEAR only copies these files to a path that exists in php.ini) and this path is defined in the include_path directive of php.iniso everytime you want to include a PEAR class, you don't give the absolute path to it, you simply include it relative to include_path and it will be included in your system.perhaps this link will help as well:[a href=\"http://pear.php.net/manual/en/installation.cli.php\" target=\"_blank\"]http://pear.php.net/manual/en/installation.cli.php[/a]if i have not answered your question then i don't think i understand the question. as i see it, you're trying to install the packages manually which can be messy unless you know a few configuration variables and the PEAR folder structure. just use the base installer and you should be good to go.let me know if i need to further clarify anything. you should really try some of the PEAR classes, SOME of them look pretty sweet. Quote Link to comment https://forums.phpfreaks.com/topic/11367-pear-classes-how-many-of-you-use-it/#findComment-42937 Share on other sites More sharing options...
ober Posted June 8, 2006 Share Posted June 8, 2006 Ok, thanks. I'm just not sure if the webserver I'm using has internet access (it's an internal server). Although when I went through the process of installing it the other day (the included package), it did appear to download some stuff... sooo... ? I'll give it a shot. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/11367-pear-classes-how-many-of-you-use-it/#findComment-43118 Share on other sites More sharing options...
Koobi Posted June 8, 2006 Author Share Posted June 8, 2006 well let me know how it goes.i have a rough idea of the PEAR directory structure, so worse comes to worse, i can give you a hand with that.but if you would find it helpful, here is what my PEAR directory looks like:[code]koobi@ubuntu:~/Desktop$ ls -lh /usr/share/phptotal 232Kdrwxr-xr-x 2 root root 4.0K 2006-05-15 02:55 Archivedrwxr-xr-x 4 root root 4.0K 2006-05-30 01:59 Auth-rw-r--r-- 1 root root 30K 2006-05-30 01:59 Auth.phpdrwxr-xr-x 2 root root 4.0K 2006-05-15 02:55 Consoledrwxr-xr-x 3 root root 4.0K 2006-05-15 02:55 datadrwxr-xr-x 2 root root 4.0K 2006-05-18 08:18 DB-rw-r--r-- 1 root root 39K 2006-05-18 08:18 DB.phpdrwxr-xr-x 10 root root 4.0K 2006-05-30 01:59 docsdrwxr-xr-x 4 root root 4.0K 2006-05-18 08:19 HTML-rw-r--r-- 1 root root 13K 2005-09-02 20:12 HTTP.phpdrwxr-xr-x 2 root root 4.0K 2006-05-15 02:55 Mail-rw-r--r-- 1 root root 7.9K 2005-09-02 20:12 Mail.phpdrwxr-xr-x 3 root root 4.0K 2006-05-15 02:55 Netdrwxr-xr-x 2 root root 4.0K 2006-05-15 02:55 OSdrwxr-xr-x 4 root root 4.0K 2006-05-15 02:55 PEAR-rw-r--r-- 1 root root 10K 2006-03-08 14:18 pearcmd.php-rw-r--r-- 1 root root 33K 2006-03-08 14:18 PEAR.phpdrwxr-xr-x 5 root root 4.0K 2006-05-19 22:14 PhpDocumentordrwxr-xr-x 3 root root 4.0K 2006-04-12 23:48 PHPUnit-rw-r--r-- 1 root root 2.5K 2004-11-06 14:37 PHPUnit.phpdrwxr-xr-x 3 root root 4.0K 2006-05-25 11:49 smarty-rw-r--r-- 1 root root 18K 2006-03-08 14:18 System.phpdrwxr-xr-x 8 root root 4.0K 2006-05-30 01:59 testsdrwxr-xr-x 4 root root 4.0K 2006-05-15 02:55 XML[/code]so i have the PEAR directory which holds all the PEAR base files. it is a dependency for every other PEAR package so you need it. and i have a bunch of directories like DB, Archive, Auth which are all packages simply unzipped to that directory. PEAR installer does this internally. i'm not sure how PEAR registers these paths so that it can keep track. i suppose it has these paths hardcoded into it.but how do i know what my PEAR directory is to even post my structure to you in the first place? i do the following in terminal:[code]koobi@ubuntu:~/Desktop$ pear config-get php_dir[/code]and in my case, the result was /usr/share/php but it can vary depending on your configs. Quote Link to comment https://forums.phpfreaks.com/topic/11367-pear-classes-how-many-of-you-use-it/#findComment-43170 Share on other sites More sharing options...
ober Posted June 8, 2006 Share Posted June 8, 2006 I may have to play with this on my home server. I'm goofing around with this on a server at work right now but I'm leaving this company in 1 week so I don't want to screw up anything before I head out ;-) Quote Link to comment https://forums.phpfreaks.com/topic/11367-pear-classes-how-many-of-you-use-it/#findComment-43184 Share on other sites More sharing options...
jeremywesselman Posted June 9, 2006 Share Posted June 9, 2006 CakePHP is as fast as I need it to be. I haven't really put a large load on it yet. I have just been messing around with it a little. It is very fast to develop with. They built in it on the Ruby on Rails concept, except using PHP. It is very easy to get an application up and running quickly.[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--] Quote Link to comment https://forums.phpfreaks.com/topic/11367-pear-classes-how-many-of-you-use-it/#findComment-43523 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.