PEAR vs PHPLIB

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mohammad
Forum Newbie
Posts: 24
Joined: Tue Jul 26, 2005 5:31 am

PEAR vs PHPLIB

Post by Mohammad »

Hello

I want to which one of these libraries outstands the other one, which one is best for what? and is it possible to use both?

thanx in advance
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Yes, it is possible to use both, and it depends on a package vs package basis of which is better suited to your requirements.
Mohammad
Forum Newbie
Posts: 24
Joined: Tue Jul 26, 2005 5:31 am

Post by Mohammad »

I need more info on both of them!!!
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

How about neither.

I didn't know that anyone used PHPLib anymore. As for PEAR, there are some good classes there but the design and code quality is uneven.

There is a lot of good code around. What functionality do you need?
(#10850)
Mohammad
Forum Newbie
Posts: 24
Joined: Tue Jul 26, 2005 5:31 am

Post by Mohammad »

well actually I'm loooking for a good code for an authentication system, I checked the internet, there are tons of methods out there, and I dont know which one is the best to choose?

I need a system where I need sessions, and have user levels such as admin, normal user and etc..

can you refer me to some good php scripts which I dont need to reinvent the wheel?

!!!!!!!!!

one more thing, are there any good frameworks for PHP design? if yes refre me to them... thanx
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

If I need PEAR code I tend to copy it out of the PEAR class into my own and then remove all the PEAR stuff. I've found that you can't really rely on PEAR being up-to-date, or even installed, with some web hosts, so the only alternative is to duplicate.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

A general Authentication and Access Control system is a difficult thing to build. But a specific one is not that difficult. You might be better off just building something that specifically meets your needs. Are you clear about the design of such a system? Are you clear about the difference between Authentication and Access Control?

As for frameworks I hear good things about Symphony and Prado, but there are many and it is partly a matter of taste. I hear that WACT will have a long overdue release as well.

And remember that there will be a preview release of the Zend Framework this month. That should change the PHP framework landscape considerably (depending on how good it is).
(#10850)
Mohammad
Forum Newbie
Posts: 24
Joined: Tue Jul 26, 2005 5:31 am

Post by Mohammad »

well I understand the concept of access control and authentication.. I have read alot of code samples... but as you said there are hundreds of ways to do that.... Im gonna give it a try to build my own system, with my specs..

here my thoughts on the authentication system:

1- Need a table to have the username, passwords and their respective user level inside ( question which I have is, should the password be encrypted and kept in the database, like a md5 or crypt encryption? )

2- there needs to be a table to contain the session control

can you explain the best way to have session control, I have heard the theme mixing session control and cookies toegther? how to implement it... can you explain the plain procedure from login in till loging out????
Post Reply