ubuntu include paths - why is pear in the default and php documention

February 3, 2015 1.1k views

First of all, I am just going to say, the include paths worked then stopped working for no reason I know.. I will sort it out sooner or later.

My questions is about why PEAR is so prominent a part of the include situation. First off, I have no idea what PEAR is. I never asked for it. It is bad enough that is involved with making include paths work, because it is in the default of this ubuntu server I built a minute ago. But PEAR also appears in the very brief, but room-for-PEAR explanation in the always-horrible php documenation at php.net.

If the first example, they are talking adding PEAR to the include path, in case you don't already have it in your default I guess.

I never use PEAR. What is the big deal about PEAR that is is all over php include path and documentation.?

Finally, i am going to comment about php docmentation at php.net. It is horrible. It never includes the obvious easy examples you need to try something, it only includes weird, esoteric examples that I am sure are of interest in some situations but for mere mortals who don't already know everything, it is ridiculous.

This include path problem is an example. I bet I have I have written successful include statements 10,000 times. It works like tnis

include 'path to file';
never a problem, I guess because I was lucky to be working on servers here the weirdness was worked out. I have had to deal with openbase directory and had other headaches, so I am saying I am not a nubie.

It is not working on the server I am setting up, and it should not be so hard. I get it this is part of setup, and I am learning about that. But what does PEAR have to do with it.

So, my question is: why is PEAR in the default include path on unbuntu, and why is PEAR so important that it is the first example given on include_dir in the php.net official documentation, and if PEAR is so important, how come I have programed tons of php and never had to deal with it or know what it is.

Thank you.

1 Answer

I think I figured out how to make includes work. The solution

  1. involved removing execute permissions from the files to be included, which makes no sense, since the do need to execute,
  2. No clue of the fix was in the php.net documentation
  3. Pear had nothing to do with it.

Is there a conspiracy to make this stuff confusing? It really seems that way.

Have another answer? Share your knowledge.