Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I want build-mapserver with php/mapscrit module, I should use the ./configure --with-php= ../php-4.3.11(the dir of PHP), but I do not know the PHP dir on my OS.

I apt-get install the PHP and I locate php on the shell but I seem to get an unrelated result.

share|improve this question
up vote 1 down vote accepted

Normally you can search for folders and files with the locate command:

locate php5

will print out lots of paths containing php - the "php folder" itself should be the /usr/lib/php5 folder.

share|improve this answer, should be which one as the output? – user1279988 Aug 5 '12 at 9:19
- DIR should be the location of the PHP4 or PHP5 distribution (source or dev package). The module may work with older versions of PHP (4.1.x or 4.2.x), but PHP 4.3.x is strongly recommended. The configure script should automatically detect which version of PHP you are attempting to build with and take the necessary actions. e.g. $ ./configure --with-php=../php-4.3.11, Is the /usr/lib/php5 folder right? – user1279988 Aug 5 '12 at 9:28
yes, as per your pastebin snipplet its /usr/lib/php5, so --with-php=/usr/lib/php5 is right. – Patrick Aug 6 '12 at 12:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.