mapscript, php, fedora core 4 problem

Gavin Simpson gavin.simpson at UCL.AC.UK
Wed Aug 31 10:31:37 EDT 2005


Hi,

I moved one of our servers from Fedora Core (FC) 2 to FC4 yesterday. I
re-did everything I had done before with the old system to get
mapserver/php_mapscript installed and working. I grab a new source
tarball, configured it like:

./configure --with-php=/usr/include/php --with-ogr=/usr/bin/gdal-config
--with-gdal=/usr/bin/gdal-config --with-geos=/usr/bin/geos-config --
with-proj

and then compiled with make. I moved mapserv and php_mapscript.so to the
required places and convinced php to load the .so, and then convinced
apache to send .phpms files via the php cgi by adding some directive to
httpd.conf pointing these files at cgi-bin/php.sh, which is:

#!/bin/bash
export SCRIPT_FILENAME=$PATH_TRANSLATED
/usr/bin/php

and it is no parsing these files. I installed the workshop demo and got
it working. I then turned my attention to an existing .phpms file (a php
page to draw a simple map and add some points from a MySQL database)
that used to work just fine under FC2.

When I view this page in my browser I get a 500 error. In the error_log
I see:

Premature end of script headers: php.sh

Which I believe is a problem with my script, so I check this by sending
it directly to the php cli - resulting in this error stream:

PHP Notice:  Undefined index:  tool in - on line 87
PHP Warning:  [MapServer Error]: msSaveImageGD(): Unable to open file /var/www/html/maps/tmp/112549634051221.gif for writing
 in - on line 106
PHP Fatal error:  Failed writing image to /var/www/html/maps/tmp/112549634051221.gif in - on line 106

The directory that it is trying to open and save to/from is writeable by
the httpd daemon as evidence by the workshop demo working correctly - I
set the directory to be the same for both applications.

I'm surprised by the .gif production, before I got png files - which I
prefer - is this the cause of my problems?

If anyone can offer any suggestions as to how to proceed?

Ps: for other FC4 users, I did not experience any of the SELinux related
problems posted earlier in the month using the latest
selinux_policy_targeted update.

All the best,

Gavin 
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [T] +44 (0)20 7679 5522
ENSIS Research Fellow             [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC                 [E] gavin.simpsonATNOSPAMucl.ac.uk
UCL Department of Geography       [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way                    [W] http://www.ucl.ac.uk/~ucfagls/
London.  WC1H 0AP.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the mapserver-users mailing list