473,809 Members | 2,660 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PEAR: is it really necessary?

Hi all,

I've been using PHP for a while now but I haven't actually used PEAR. I
have just read half a chapter in a book, it sounds alright but haven't
actually used it. I was just wondering, is it really necessary to use
PEAR? I usually get things done using PHP/MySQL. I don't know if I'm
really missing out on something by not using PEAR. How highly is it
recommended? On most job ads, i don't even see them mentioning PEAR.
They mostly just say PHP/MySQL.. Why is that? Don't people like PEAR
much?

Thanks
Ben

Jul 28 '06 #1
5 1505
Rik
cr*********@yah oo.com wrote:
Hi all,

I've been using PHP for a while now but I haven't actually used PEAR.
I have just read half a chapter in a book, it sounds alright but
haven't actually used it. I was just wondering, is it really
necessary to use PEAR? I usually get things done using PHP/MySQL. I
don't know if I'm really missing out on something by not using PEAR.
How highly is it recommended? On most job ads, i don't even see them
mentioning PEAR. They mostly just say PHP/MySQL.. Why is that? Don't
people like PEAR much?
It's just a way to avoid coding something that already has been coded better
& more dynamic by others. It's not necessary to use it, but in big projects
it will save you a lot of time.

Grtz,
--
Rik Wasmus
Jul 28 '06 #2
>
It's just a way to avoid coding something that already has been coded
better
& more dynamic by others. It's not necessary to use it, but in big
projects
it will save you a lot of time.
I agree that sharing knowledge and ready-to-use class can be usefull. But it
is not necessary "coded better" nor more "dynamic" :). Moreover, the danger
is that in case of a bug, you have to learn how it works before you can do
correction.

So PEAR is to be used carefully in my opinion :)
Jul 28 '06 #3
If you're working in PHP 4.x PEAR is a separate piece of the puzzle,
and is basically just a bunch of code written in an Object Oriented
fashion. There's also PECL ("pickle") that re-creates much of the PEAR
objects in C, so they're compiled and run faster.

PEAR is built into PHP 5 from what I understand (just starting to work
in it now) so it's not "necessary" but it's available if you want to
use it for things like emailing, database connection (PDO), performance
monitoring, etc.

I didn't come from an OO background when I started with PHP, so I
didn't mess with PEAR or much of the OO model in 4. Since I've heard
good things about 5's implementation, I'm trying to wrap my brain
around it now.

HTH.
D.
cr*********@yah oo.com wrote:
Hi all,

I've been using PHP for a while now but I haven't actually used PEAR. I
have just read half a chapter in a book, it sounds alright but haven't
actually used it. I was just wondering, is it really necessary to use
PEAR? I usually get things done using PHP/MySQL. I don't know if I'm
really missing out on something by not using PEAR. How highly is it
recommended? On most job ads, i don't even see them mentioning PEAR.
They mostly just say PHP/MySQL.. Why is that? Don't people like PEAR
much?

Thanks
Ben
Jul 28 '06 #4

DonO wrote:
If you're working in PHP 4.x PEAR is a separate piece of the puzzle,
and is basically just a bunch of code written in an Object Oriented
fashion. There's also PECL ("pickle") that re-creates much of the PEAR
objects in C, so they're compiled and run faster.

PEAR is built into PHP 5 from what I understand (just starting to work
in it now) so it's not "necessary" but it's available if you want to
use it for things like emailing, database connection (PDO), performance
monitoring, etc.

I didn't come from an OO background when I started with PHP, so I
didn't mess with PEAR or much of the OO model in 4. Since I've heard
good things about 5's implementation, I'm trying to wrap my brain
around it now.

HTH.
D.
It should be noted almost none of PEAR is written in PHP5. This means
that it doesn't take advantage of any of the really new and nifty
object constructs. The advantage is it is backwards compatible with
almost any PHP version.

PEAR is not built into PHP. I believe a few packages are included in
the default download, but most aren't. The pear installer does come
with php, though, and you can use that to download andinstall any of
the pear packages. If possible, I suggest using PECL, since the speed
and quality is generally much better (the downside is there aren't as
many packages that aren't beta or alpha).

BTW - please don't top post

Jul 28 '06 #5
*** Richard Levasseur escribió/wrote (28 Jul 2006 09:00:33 -0700):
PEAR is not built into PHP. I believe a few packages are included in
the default download, but most aren't. The pear installer does come
with php, though, and you can use that to download andinstall any of
the pear packages.
I've recently installed latest PHP 5 release under Windows and the bundled
PEAR script didn't even work correctly: I had to get a working one from
PEAR web site.
--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Aug 2 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1878
by: Dan Finn | last post by:
usinng php-4.3.4 using this for my configure script; ../configure --with-pear=/usr/local/lib/pear --with-mysql --with-apxs=/usr/sb in/apxs --enable-track-vars --with-mysql-sock=/tmp/mysql.sock then make; make install output says it installed pear: : make install
8
2560
by: red | last post by:
I have PHP Version 5.0.1 installed on my computer, and according to the pear manual pear is already installed. But how do I tell if it is installed ? for example, how do I get this line, which I found in the pear manual to work: require_once "HTML/Table.php"; Warning: main(HTML/Table.php) : failed to open stream: No
0
1850
by: Chris | last post by:
Hi, i have been trying to install PEAR PHP package on my windows XP system but i am having some problems. I am running PHP 5.0.0, with Apache 2.0.50, and i am using the go-pear.php install script to install PEAR. It installs ok, but when i click on the pear installer link (which is installed in c:\www\pear\index.php), all the links are strange, they seem to have additional quotes and slashes in, for example:
3
3553
by: Sandro Dentella | last post by:
I need to use a class to handle mbox files that uses PEAR. Since I'm using Debian (both woody and, I simply apt-get(ed) php4-pear but I can't use it becouse I get the error: Warning: dl(): Unable to load dynamic library '/usr/lib/php4/20020429/PEAR.so'- /usr/lib/php4/20020429/PEAR.so: cannot open shared object file: No such file or directory in /home/sandro/src/php/mbox/PEAR.php on line 11 in fact PEAR.so is not there, nor it seems...
1
2051
by: DJ Majestik | last post by:
OK, I am new to the whole PEAR/Smarty templating thing. I am trying to setup my directory structure correctly. If someone could weigh in and see if I have this setup "right", I would appreciate it. Directory structure: pear/ db/ db/ DB/ doc/
1
2151
by: webguynow | last post by:
I'm trying to build a good DB Layer on top of Pear::DB Are there any forums or knowledge base sites on this direct topic ? I've been using the documentation at: http://pear.php.net/package/DB/docs But since I'm not always online, is there a way I can download this ? Or if the documentation is derived from the classes, How can I build it?
2
1222
by: Alan Little | last post by:
I'm starting to look into PEAR, and it looks like there's some interesting stuff in there. I'm wondering how much I can rely on it for a distributed app. If I understand correctly, it's now included in the PHP distro, and installed by default. What version did this start with? Is the default installation just the base class, or are some of the packages included as well? The tricky question is: does anyone have any idea of how commonly it's...
0
1222
by: Nichu | last post by:
Hello Lately I started to "bravely fight" with Postfix + Squirrelmail everything works great (PHP also :)) but I want to have possibility to change passwords (from MySql database) through the webside SM has a plugin (change_sqlpass) - but it needs Pear DB installed # rpm -q php-pear php-pear-1.4.9-1.2 # rpm -q php-pear-DB
3
3509
by: mpar612 | last post by:
I am stumped. Below is my code and it doesn't work (I removed the $login info for posting). PHP Code: require 'PEAR/DB.php'; // Connect to the database $db = DB::connect($login); if (DB::isError($db)) { die ("Can't connect: " . $db->getMessage()); }
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10387
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5689
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.