local pear installation

This is a discussion on local pear installation within the alt.comp.lang.php forums, part of the PHP Programming Forums category; As my webhost provides the barest of barebones PEAR in their PHP5 setup, I'm installing it in my webspace. ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-13-2006
grant
 
Posts: n/a
Default local pear installation

As my webhost provides the barest of barebones PEAR in their PHP5 setup,
I'm installing it in my webspace. The PEAR install page
(http://www.go-pear.org/manual/en/ins...ion.shared.php) has been a
great help and everything installed perfectly. But I'm having trouble
getting my pages to recognize it. The install page suggests this snippet
on each page:


<?php
ini_set('include_path', '~/pear/lib' . PATH_SEPARATOR
. ini_get('include_path'));

// From PHP 4.3.0 onward, you can use the following,
// which especially useful on shared hosts:
set_include_path('~/pear/lib' . PATH_SEPARATOR
. get_include_path());
?>

I've just popped it on its own into a page called pearinclude.php and I
use "require" to point to it (or maybe I should use "include"?)

Anyway, I think my problem is that I'm not sure of the exact path to
enter for my pear install. It sits on my host in htdocs/pear/. Do I just
replace '~/pear/lib' with 'htdocs/pear'? Probably not, but with what?

Thanks for any help for a noob,


grant
Reply With Quote
  #2 (permalink)  
Old 12-13-2006
Ric
 
Posts: n/a
Default Re: local pear installation

grant schrieb:
> As my webhost provides the barest of barebones PEAR in their PHP5 setup,
> I'm installing it in my webspace. The PEAR install page
> (http://www.go-pear.org/manual/en/ins...ion.shared.php) has been a
> great help and everything installed perfectly. But I'm having trouble
> getting my pages to recognize it. The install page suggests this snippet
> on each page:
>
>
> <?php
> ini_set('include_path', '~/pear/lib' . PATH_SEPARATOR
> . ini_get('include_path'));
>
> // From PHP 4.3.0 onward, you can use the following,
> // which especially useful on shared hosts:
> set_include_path('~/pear/lib' . PATH_SEPARATOR
> . get_include_path());
> ?>
>
> I've just popped it on its own into a page called pearinclude.php and I
> use "require" to point to it (or maybe I should use "include"?)
>
> Anyway, I think my problem is that I'm not sure of the exact path to
> enter for my pear install. It sits on my host in htdocs/pear/. Do I just
> replace '~/pear/lib' with 'htdocs/pear'? Probably not, but with what?
>
> Thanks for any help for a noob,


Just create a php page which outputs servers vars etc. by using phpinfo():


<?php

phpinfo()

?>

No upload the page and view the output with your browser, it should tell
you thet path to your htdocs dir.
>
>
> grant

Reply With Quote
  #3 (permalink)  
Old 12-13-2006
finbogey jones
 
Posts: n/a
Default Re: local pear installation


>> Anyway, I think my problem is that I'm not sure of the exact path to
>> enter for my pear install. It sits on my host in htdocs/pear/. Do I just
>> replace '~/pear/lib' with 'htdocs/pear'? Probably not, but with what?
>>
>> Thanks for any help for a noob,

>
> Just create a php page which outputs servers vars etc. by using phpinfo():
>
>
> <?php
>
> phpinfo()
>
> ?>
>
> No upload the page and view the output with your browser, it should tell
> you thet path to your htdocs dir.
>>



Thanks for the reply. I had already had a look that way, but I couldn't
find what I needed. I think the trouble is that my webhost has pear
installed, but he won't install any packages for me. So when I do
phpinfo() I get all the paths of the webhost's install, not my own.


grant

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:49 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0