[mapserver-users] Re: Compiling PHP MapScript on an ISP's server

Daniel Morissette morissette at dmsolutions.ca
Thu Jan 17 20:18:59 EST 2002


Hi Shreepad,

I'm sure you're not the only one who run into that kind of situation, so
I'll CC: my reply to the mapserver-users list for the benefit of other
users...


Shreepad wrote:
> 
> hi
> i am using PHP MapScript on linux
> the mapserver is loaded at my ISP (Internet service provider ) 's
> server
> the isp is   http://phpwebhosting.com
> i am trying to load phpmap script , as the isp  server has php4.06
> version i have loaded the mapserver 3.5 so that they can match
> but whenever i tried to do
> ./configure --with-php=/usr/local/bin
> it gives me error
> 
> [valuecad at walnut mapserver_3.5]$ ./configure
> --with-php4.06=/usr/local/bin/
> configure: error: php4.06: invalid package name
> [valuecad at walnut mapserver_3.5]$ ./configure
> --with-php=/usr/local/bin/

...

> checking for PHP/MapScript module options...
> checking whether 'perl -V' works... yes
> checking for location of config.h or php_config.h... configure: error:
> !!! Could not find config.h or php_config.h in
> /usr/local/bin/.          !!!
> !!! Has PHP been configured yet?
> !!!
> [valuecad at walnut mapserver_3.5]$
> it is isp server so i do not have any control over the config.h file
> please let me know how can i go about it
> what should i tell my isp to do to get map script work
> 

The way MapServer's configure works at the moment, you have to point
--with-php to the location of the PHP source tree where you configured
and compiled PHP and where php_config.h can be found.  We also need
access to all the PHP development headers in order to build/compile.  So
you have 2 options:

1- Ask your ISP to give you access to a copy of the PHP source that they
configured and used to compile PHP.  Most ISP would say no to that
request.

2- Try to make one up yourself:
  - dowload the php 4.0.6 source and extract it in your account
  - create a small test.php that calls <?php phpinfo(); ?> and 
    look for the configure options in the phpinfo output.
  - call PHP's configure in your account with exactly the same
    configure options that you found in the phpinfo output
    You may have to take out some PHP configure options in order
    to complete this step as you may not have full access to all
    the packages that your ISP compiled with, but hopefully the most
    important options (regex, apxs, ttf) will work.
  No need to recompile PHP in your account... you just need to
  configure it.  Then reconfigure MapServer and point it to the
  properly configured PHP source in your account.  That should get
  you rolling.

Good Luck!
-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.




More information about the mapserver-users mailing list