How well is pear supported by hosting companies.
If I use Pear calendar to generate month views, will it work flawlessly since it is dependent on other pear libraries to work
My experience with using a plug-in that relies on Pear is:
My host had trouble supporting Pear and the required library module(s) directly
They were helpful in pointing me to a way to install Pear on my own hosting account:
create a PEAR directory in your webroot and chmod it 777 so that PHP can write to it. Then you can put this file in there and do a web-based install of PEAR: http://pear.php.net/go-pear
So, even if you use Pear, there should be a path for hosted sites to make use of it.
I tried the following code with different successes. One should work for you: // check to see if PEAR is installed $x = get_include_path()."PEAR.php"; $z = substr(strrchr($x,";"), 1); echo $x."***"; //$y = print_r(get_defined_constants()); //echo $_SERVER['SERVER_SOFTWARE']; //echo $_SERVER['SERVER_NAME']."/PEAR.php"; //if (!file_exists($_SERVER['DOCUMENT_ROOT']."/PEAR.php")) if (file_exists($z)) { echo "PEAR exists"; include ('Archive/Tar.php'); }
apparently their is a Pear_Info package that will give you all the information of pear and whats installed
tried it on my local server, worked very well. someone with a live host should try it.
Download Pear_Info package and look in the info.php file for an example code. copy past it in a php file and run.
Comments
- My host had trouble supporting Pear and the required library module(s) directly
- They were helpful in pointing me to a way to install Pear on my own hosting account:
So, even if you use Pear, there should be a path for hosted sites to make use of it.// check to see if PEAR is installed
$x = get_include_path()."PEAR.php";
$z = substr(strrchr($x,";"), 1);
echo $x."***";
//$y = print_r(get_defined_constants());
//echo $_SERVER['SERVER_SOFTWARE'];
//echo $_SERVER['SERVER_NAME']."/PEAR.php";
//if (!file_exists($_SERVER['DOCUMENT_ROOT']."/PEAR.php"))
if (file_exists($z))
{
echo "PEAR exists";
include ('Archive/Tar.php');
}