PHP MapScript, ms_newMapObj error, Failed to open map file

Doug B ummmmm22 at GMAIL.COM
Mon Feb 19 15:21:15 EST 2007


I'm setting up a new machine to run the same applications as an
existing one, but on newer versions of
MapServer/MapScript/Postgres/PostGIS/PHP.  My new versions:

RHEL 4
MapServer 4.8.4
PHP 4.4.5
Postgres 7.4.16
PostGIS 1.2.1

[Mon Feb 19 14:14:57 2007] [error] [client 32.86.231.32] PHP Warning:
[MapServer Error]: getString(): Parsing error near (none):(line 109)
[Mon Feb 19 14:14:57 2007] [error] [client 32.86.231.32]  in
/var/www/html/offender/map.php on line 75
[Mon Feb 19 14:14:57 2007] [error] [client 32.86.231.32] PHP Warning:
Failed to open map file ./sows.map in /var/www/html/offender/map.php
on line 75
[Mon Feb 19 14:14:57 2007] [error] [client 32.86.231.32] PHP Fatal
error:  Call to a member function on a non-object in
/var/www/html/offender/map.php on line 121

This particular error persists despite everything I've tried.  As far
as I can tell, permissions to the file and directories are sufficient
and are identical to those on the working system.  I've even tried
copying the file to the root of the filesystem and changing its owner
to apache, so I don't think it's a simple permissions error.

I've also tried with both relative and absolute paths, copying and
pasting the file location from the error message to be sure there's no
typo, and the .map file definitely exists where I'm trying to access
it.

The same MapServer installation works fine for a different .map file
that we access directly via cgi, and the phpinfo() function after
loading the php_mapscript.so library does show MapScript loaded.

I've tried removing the .map file altogether, and the error message is
identical, so I guess the first question is whether that error message
could occur due to something in the file in addition to actually being
unable to access it entirely.

I removed the PostGIS layers in case those weren't yet configured
correctly on the new system, but that didn't change the error either.

Again, the exact same .php and .map files work fine on an older
installation (MapServer 4.2, I think, PHP 4.3.8, Postgres 7.4.3,
PostGIS 0.9).

Thanks in advance for any ideas on what to check.
Doug



More information about the mapserver-users mailing list