I've tried to follow the instructions, with mixed success for the individual steps, and no luck getting mapscript to load. Please see my
results interspersed with the instructions, below, and anyone with insight
into the problems I'm having please let me know.

Are there tools to help understand better what is/is not working when PHP tries to load a DLL? There's got to be something more than "it worked" or "it didn't"...?

Thanks,

Chris

Dirk Jesko wrote:
Hi Chris,

it took me many hours to get cartoweb running under IIS, just to find out that some plugin (I think it was the pdf export) did not work under our IIS configuration. Finally, I switched back to Apache.

Anyway, I install PHP, mapserver and cartoweb the following way:

   1. Get PHP running under IIS or Apache. There is a documentation on
      php.net that works. If you are working with virtual directories
      you *must* either set or not set or not set doc_root in php.ini. I
      can not remember which one is correct - try. If I am not mistaken
      it is the opposite of what some documentation said.
Done - PHP 5.2.3 installed and running under IIS 5.1 (I'm trying this on my
laptop with Windows XP for now) - doc_root is not set.
   2. Setup error logging if it is not in php.ini. I usually log to a
      file, i.e. "log_errors = On" and error_log = "{SOME_PATH}\php.log".
Tried everything - can't get any actual errors to be logged. Created the
file, set both NTFS and IIS permissions to allow anyone to write to it, set
the error_log to this file in PHP.ini (phpinfo() confirms that it's set),
ran various error-throwing codes but get no entries in the logfile - don't
know if logging is working or not, but I suspect not. Is this critical for
mapscript to work, or just a useful debugging tool?
   3. Get a ms4w package from http://www.maptools.org/ms4w/. Make sure
      it fits your PHP version. If you have 5.2.x the current ms4w 2.2.4
      should work. Decompress it into some temp folder.
Done - downloaded and unzipped 2.2.4
   4. Create a folder "Mapserver" somewhere and add it to the Windows
      PATH variable. This way you do not need to put the dlls required
      by mapserver into the Windows system path. Now log out an in again
      or reboot if possible, so Windows rereads the system variables and
      the new PATH is recognized.
Done - created C:\mapserver and put it in the Environment Variables->System
Variables PATH variable - confirmed by seeing it listed in phpinfo()
   5. Now get Dependency Walker from http://www.dependencywalker.com/
      and extract it somewhere. You will need it in step 8.
Done.
   6. Get php_mapscript.dll from the ms4w package. It is located unter
      {MS4W_TEMP_PATH}\Apache\php\ext. Copy it to the ext folder of your
      PHP installation. I usually rename it to something like
      php_mapscript_4.10.2.dll, so I know which version is currently
      installed. Load the extension in the php.ini, e.g.
      "extension=php_mapscript_4.10.2.dll". Make sure, that
      extension_dir is correctly set in php.ini.
Done - but how can one know the version of the php_mapscript.dll - the file
itself has no version info, nor could I find other docs in the ms4w tree
that indicates which version of mascript is being used. I just left it as
php_mapscript.dll for now.
   7. Copy the proj folder from ms4w and its content to C:\.
Done.
   8. Finally, the libraries required by php_mapscript.dll have to be
      copied to the folder created in step 4. In order to do this run
      depends.exe and open php_mapscript.dll. It will tell you which
      dlls are missing. Copy them from {MS4W_TEMP_PATH}\Apache\cgi-bin
      to the folder created in step 4. Refresh the view in Dependency
      Walker after copying, because there might be additional
      requirements. Repeat this until no more missing dependencies are
      reported. You may savely ignore dlls that show the timer, e.g
      DWMAPI.dll, SHLWAPI.DLL.
Done. However, I get this warning for MPR.dll - I think from what I read on the web that I can ignore this warning? "Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module."

Now, php should be able to load the Mapscript extension. Check it with the phpinfo() function.

Nope :( phpinfo() doesn't show anything about "mapscript", and the info() function provided with cartoweb (which just tries to load mapscript and then calls phpinfo) also gives warning that mapscript is not loaded.

The only 2 things that appeared anomalous when following the instructions were my inability to get PHP error logging to work and the warning about MPR.dll in the dependency walker - are either of those likely candidates for why mapscript isn't loading?

If it does not, I have no idea why, could be a
version conflict or a wrong dll. It's difficult to determine without seeing the actual system.

If mapscript is loaded, you should be able to install Cartoweb according to the documentation.

I hope this helps a bit.


Regards,
Dirk




Chris Duncan, GISmatters wrote:
I've been asked to work on an existing Mapserver site, including redeploying it as a Cartoweb project. I have solid if not extensive experience with web application development (PHP, MySQL, Mapserver, ASP, ASP.NET), but not much experience with server setup and maintenance. After a full 2 days of reading and experimenting, I still cannot get a basic Cartoweb demo to run... hope I can get some pointers to get setup.

The existing configuration is Windows Server 2003, IIS 6.0, Mapserver 4.6.0, PHP 5.1.2. There is a functioning Mapserver website running. My first goal is to install Cartoweb and run the demos.

I downloaded cartoweb-withdemo-3.3.0.zip and unzipped it in it's own new directory.

First of all, I cannot get the "prerequisites" going. I have copied php_mapscript.dll to the PHP extensions directory, I have made sure that cgi.force_redirect=0. When I go to cartoweb3 info.php I get the error message "WARNING: can't load mapscript library".

Nonetheless, after wrestling with that problem for too long, I tried to continue with the cartoweb install, hoping that maybe I'd gain some more insight or ideas in the process. I executed the basic setup command:

php cw3setup.php --install --base-url http://umaacorn.provost.ads.umass.edu/acorncw/cartoweb3/htdocs

but I get blank windows when I go to client.php or demoCW3.php... they load but there's no HTML content.

I have tried dozens of other things - messing around with the IIS configuration (currently it seems to be using php5isapi.dll, so I've tried php-cgi.exe with no luck, but maybe I didn't set it up right).

I would love to have a step-by-step or a checklist to go by... but will settle for help of any kind! Hope someone out there with similar setup and/or experience will lend a hand, and I'll be glad to return favors in the future!

Cheers,

Chris

--

Chris Duncan, Ph.D.
President
GISmatters

[EMAIL PROTECTED]
http://www.gismatters.com/

1 Tuckerman Ln
Amherst, MA 01002

Tel: 413-549-2052
Fax: 508-637-2557

_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users


--
NOTE NEW STREET ADDRESS AS OF 1-DEC-2006
--

Chris Duncan, Ph.D.
President
GISmatters

[EMAIL PROTECTED]
http://www.gismatters.com/

1 Tuckerman Ln
Amherst, MA 01002

Tel: 413-549-2052
Fax: 508-637-2557


_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users

Reply via email to