try without : -with-php-regex-dir=/root/wms/php/php-4.3.7/regex I have exactly the same problem on debian and that solve it. Now I make double build, one for binarys such as mapserv without php and another one for php_mapscript.so with php as apache DSO. Thomas