how to access PEAR In my hosting environment

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • NotGiven

    how to access PEAR In my hosting environment

    My hosting company has pre-intalled PEAR in a directory out of the web
    directory (and not in php-includes).

    I've tried including the absolute /to/path/ in the requre statement but it
    does not work.

    How would I access the PEAR packages?

    Many thanks.


  • Janwillem Borleffs

    #2
    Re: how to access PEAR In my hosting environment

    NotGiven wrote:[color=blue]
    > My hosting company has pre-intalled PEAR in a directory out of the web
    > directory (and not in php-includes).
    >
    > I've tried including the absolute /to/path/ in the requre statement
    > but it does not work.
    >
    > How would I access the PEAR packages?
    >[/color]

    Check the open_basedir directive in the php.ini file. Chances are that it
    doesn't include the path to the PEAR installation.

    When this is the case and you are unable to edit the php.ini file yourself,
    all you can do is asking your hosting provider to include this path.


    JW



    Comment

    • Tim Van Wassenhove

      #3
      Re: how to access PEAR In my hosting environment

      In article <4139b999$0$880 18$1b2cd167@new s.euronet.nl>, Janwillem Borleffs wrote:[color=blue]
      > NotGiven wrote:[color=green]
      >> My hosting company has pre-intalled PEAR in a directory out of the web
      >> directory (and not in php-includes).
      >>
      >> I've tried including the absolute /to/path/ in the requre statement
      >> but it does not work.
      >>
      >> How would I access the PEAR packages?
      >>[/color]
      >
      > Check the open_basedir directive in the php.ini file. Chances are that it
      > doesn't include the path to the PEAR installation.
      >
      > When this is the case and you are unable to edit the php.ini file yourself,
      > all you can do is asking your hosting provider to include this path.[/color]

      or use http://www.php.net/ini_set

      --
      Tim Van Wassenhove <http://home.mysth.be/~timvw>

      Comment

      • Michael Vilain

        #4
        Re: how to access PEAR In my hosting environment

        In article <2pts9jFp1vtgU1 @uni-berlin.de>,
        Tim Van Wassenhove <euki@pi.be> wrote:
        [color=blue]
        > In article <4139b999$0$880 18$1b2cd167@new s.euronet.nl>, Janwillem Borleffs
        > wrote:[color=green]
        > > NotGiven wrote:[color=darkred]
        > >> My hosting company has pre-intalled PEAR in a directory out of the web
        > >> directory (and not in php-includes).
        > >>
        > >> I've tried including the absolute /to/path/ in the requre statement
        > >> but it does not work.
        > >>
        > >> How would I access the PEAR packages?
        > >>[/color]
        > >
        > > Check the open_basedir directive in the php.ini file. Chances are that it
        > > doesn't include the path to the PEAR installation.
        > >
        > > When this is the case and you are unable to edit the php.ini file yourself,
        > > all you can do is asking your hosting provider to include this path.[/color]
        >
        > or use http://www.php.net/ini_set[/color]

        I followed the instructions in PROGRAMMING IN PHP to access the PEAR DB
        class, but my web hosting ISP's php configuration didn't allow it. Just
        using the

        require_once("D B.php");

        would fail, even though the php variable include_path was set correctly
        in the php.ini file. For some reason, the require will _work_ if I
        include the following _before_ the require:

        ini_set('includ e_path', ini_get('includ e_path')); # lets PEAR work

        Why is this required? This is php 4.3. Is there some internal bug that
        doesn't correctly access the include_path until it's "set" by ini_set?
        I didn't see anything in the docs on http://www.php.net

        --
        DeeDee, don't press that button! DeeDee! NO! Dee...



        Comment

        • Tim Van Wassenhove

          #5
          Re: how to access PEAR In my hosting environment

          In article <vilain-553B6A.13415304 092004@comcast. dca.giganews.co m>, "Michael Vilain <vilain@spamcop .net>" wrote:[color=blue]
          > would fail, even though the php variable include_path was set correctly
          > in the php.ini file. For some reason, the require will _work_ if I
          > include the following _before_ the require:
          >
          > ini_set('includ e_path', ini_get('includ e_path')); # lets PEAR work
          >
          > Why is this required? This is php 4.3. Is there some internal bug that
          > doesn't correctly access the include_path until it's "set" by ini_set?
          > I didn't see anything in the docs on http://www.php.net[/color]


          It's always handy to have a look at http://bugs.php.net in that case.
          And it also handy to know that on a windows platform you have to
          separate values with ; and on a unix platform with :

          As in: include_path=.; c:/libs/pear VS include_path=.:/usr/lib/pear


          --
          Tim Van Wassenhove <http://home.mysth.be/~timvw>

          Comment

          • Michael Vilain

            #6
            Re: how to access PEAR In my hosting environment

            In article <2puog8Fpaq0cU2 @uni-berlin.de>,
            Tim Van Wassenhove <euki@pi.be> wrote:
            [color=blue]
            > In article <vilain-553B6A.13415304 092004@comcast. dca.giganews.co m>, "Michael
            > Vilain <vilain@spamcop .net>" wrote:[color=green]
            > > would fail, even though the php variable include_path was set correctly
            > > in the php.ini file. For some reason, the require will _work_ if I
            > > include the following _before_ the require:
            > >
            > > ini_set('includ e_path', ini_get('includ e_path')); # lets PEAR work
            > >
            > > Why is this required? This is php 4.3. Is there some internal bug that
            > > doesn't correctly access the include_path until it's "set" by ini_set?
            > > I didn't see anything in the docs on http://www.php.net[/color]
            >
            >
            > It's always handy to have a look at http://bugs.php.net in that case.
            > And it also handy to know that on a windows platform you have to
            > separate values with ; and on a unix platform with :
            >
            > As in: include_path=.; c:/libs/pear VS include_path=.:/usr/lib/pear[/color]

            Not relevant really. The ISP runs Debian Linux. My MacOS X system is
            10.3.5. Both php implementations have this problem. The bugs section
            didn't give anything. The php.ini file on the ISP has

            include_path=.:/usr/lib/pear

            which is correct. But it only works if you use the ini_set function in
            a script. Should this be logged as a bug on 4.x?

            --
            DeeDee, don't press that button! DeeDee! NO! Dee...



            Comment

            • Janwillem Borleffs

              #7
              Re: how to access PEAR In my hosting environment

              Tim Van Wassenhove wrote:[color=blue]
              > or use http://www.php.net/ini_set[/color]

              open_basedir can only be set in the php.ini file...


              JW



              Comment

              Working...