Re: Pear Auth, a couple of questions
| From: | Site Resources | Date: | Sat, 15 May 2004 17:03:47 +0000 |
| Subject: | Re: Pear Auth, a couple of questions | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12516@lists.php.net to get a copy of this message | ||
Thank you so much! I hit reply_all on this and I only included the last address; not used to mailing
lists like this.
Ok, if someone could confirm the first solution, that'd be great. I did not incorperate pear
Auth into my site yet, so I'd like to know about this beforehand. How about in the case that
you use an array for the second argument?
On the second point, that will be so helpful! Where do I find that web installer? So you are saying
I create an includes file, say, in /home/username/public_html/includes? or of course whatever
directory name I suppose would be fine. Then I put the installer script within that includes
directory and run it? then /home/username/public_html/includes/pear will be created?
then how do I add that to the include path. Thanks so so much.
----- Original Message -----
From: Norbert Mocsnik
To: pear-general@mocsnik.hu ; pear-general@lists.php.net ; PHPDiscuss - PHP Newsgroups and mailing
lists
Sent: Saturday, May 15, 2004 8:37 AM
Subject: Re: [PEAR] Pear Auth, a couple of questions
Hello Brandon,
> 1.
>
> Is there any way to make Auth use an already existing db connection to do
> whatever it needs to do? On my page I already have a db connection open,
> but when I create the auth object, won't that create a new connection?
> that is not what i want; but I would like for it to use the already
> existing one. is there a way to do so?
I'm not an Auth expert, however, according to the comments in the Auth DB Container source
the value that you pass as $options can be either "Connection data or DB object". Try
passing your DB object instead.
> 2.
>
> With any pear package but this one especially, is it possible to use it
> even if it has not been installed as a pear package? I want to use this on
> the host where my site is, and they do have pear, but not the Auth
> package. Will it work if I put Auth.php in a directory and also the Auth
> directory and set the include path so that I can include Auth/auth.php?
It *may* work but it's not guaranteed. Instead, you may use the web installer of PEAR so you
can install the needed PEAR stuff under your documentroot. Just create let's say an
'include' folder on your account, grab the source of http://go-pear.php (without www!) and upload it to this directory.
Make sure it is writable by php. Point your browser to this script on your account on the web and
install the packages you need. After that, you'll need to set the include_path to include the
directory 'include/PEAR' (NOT 'include'!). The best practice is to put this to
the beginning of include_path so that your packages will get included first instead of the old ones
on the server. This is cool because you'll be able to upgrade your packages whenever you want,
regardless of the sysadmin.
Regards,
Norbert