Jump to content

[SOLVED] Pear include


jas4

Recommended Posts

Hi looked for a seperate PEAR board but didnt see any so not sure if im posting this in the right place:

 

I've installed pear onto my windows (not my choice), installed all the packages that I need etc, the problem is that i dont have access to change the include_path so in every script I need to include something like this (i think):

 

<?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());
?>

 

so i tried both parts of this code but it doesnt seem to work, has anyone else had any of these problems and solved them succesfully?

 

cheers

Link to comment
Share on other sites

still not sure if this is the right place, but i've managed to solve my problem (eventually)

 

$path = "C:\path_to";
set_include_path('~/pear/lib' . PATH_SEPARATOR
                 . $path);

 

Its basically what I already had but I just needed to find the path that I needed to include.

 

For anyone needing to install pear on a shared windows host, and you dont have access to directly change the include_path, then this snipet of code needs to be used

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.