SUM: Building PHP Mapscript
Bill Thoen
bthoen at GISNET.COM
Tue Jul 17 10:53:07 PDT 2007
Thanks everyone for helping get PHP MapScript to compile. I managed to
get it to work finally. A word of warning though for anyone else who
might need to do this. Unless you plan to rebuild your copy of PHP, make
sure you use the same version of PHP source that you are running on your
machine. I first tried downloading the latest PHP source, but since that
was a few versions newer than what's running on my machine, the
resulting php_mapscript.so library wouldn't work (the API versions
didn't match). But when I used the same version of PHP source as I have
installed on my machine, everything worked fine. In retrospect, I should
have expected this, but I seem to have to bang my head against the wall
a few times before I realize why I have a headache...
Daniel Morissette wrote:
> Gregor Mosheh wrote:
>>
>> It wants the PHP source code. What I usually do is grab a copy of the
>> source and extract it, then ./configure it the same as my existing
>> installation. Ta-da, a usable source with the same configuration and
>> all.
>>
>> Use phpinfo() to find out what ./configure arguments were used
>> originally, and trim out those annoying ' characters. Easy. :)
>>
>
> R. P. wrote:
>> Not sure about this, but ir your are using yum, the php default
>> install may not include the header files. Instead, you need to
>> install the development version of php. Something like php-devel(??)
>> and that will give you the header files. I think this holds true for
>> other yum installs
>> as well.
>> Rob
>
>
> Bill,
>
> Gregor and Rob are both right. You can point --with-php=DIR either to
> the original source tree that was used to compile PHP or to the
> install directory where the PHP header files are installed by the
> php-devel package or equivalent (e.g. /usr).
>
> Basically what MapServer's configure script needs is the location of
> the PHP header files that were used to compile your PHP installation.
>
> Daniel
More information about the MapServer-users
mailing list