<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<span id="result_box" lang="en"><span class="hps">Hi</span><span>, I have finally</span> <span class="hps">found the problem</span> <span class="hps">and solution.</span> <span class="hps">Thanks to</span> <span class="hps">a system administrator</span> <span class="hps atn">ubuntu (</span><span>Sergio)</span> <span class="hps">of Spain</span><span>, we have</span> <span class="hps">refined</span> <span class="hps">the code</span> <span class="hps">of</span> <span class="hps">the libraries</span> <span class="hps">of</span> <span class="hps">Chameleon</span> <span class="hps">and found</span> <span class="hps">out why</span> <span class="hps">there was</span> <span class="hps">"Error</span> <span class="hps">rendering</span> <span class="hps">map".</span><br> <span class="hps">The problem</span> <span class="hps">arose</span> <span class="hps">when the function</span> <span class="hps">fwrite</span> <span class="hps">working</span> <span class="hps atn">in "</span><span>w"</span> <span class="hps">truncated</span> <span class="hps">files</span> <span class="hps">php</span> <span class="hps">session</span><span>,</span> <span class="hps">so the</span> <span class="hps">fread</span> <span class="hps">function</span> <span class="hps">returned</span> <span class="hps">a 0</span> <span class="hps">at times.</span> <span class="hps">We assumed</span> <span class="hps">that was needed</span> <span class="hps">while</span> <span class="hps">a blocking function</span> <span class="hps">fwrite</span> <span class="hps">is writing</span> <span class="hps">so</span> <span class="hps">when looking</span> <span class="hps">at</span> <span class="hps">the code</span> <span class="hps">find</span> <span class="hps">the solution.</span> <span class="hps">Line 85</span> <span class="hps">of</span> <span class="hps">file</span> <span class="hps atn">"</span><span>session.php</span><span>" of</span> <span class="hps">chameleon</span> <span class="hps">says:</span><br><br> <span class="hps">/</span> <span class="hps">* File</span><span>-based</span> <span class="hps">locking</span> <span class="hps">session</span> <span class="hps">based</span> <span class="hps">on</span> <span class="hps">code</span> <span class="hps">Contributed by</span><br> <span class="hps">*</span> <span class="hps">Andreas</span> <span class="hps">Hocevar</span> <span class="hps">ahocevar@hotmail.com</span> <span class="hps">* /</span><br> <span class="hps atn">if (</span><span>isset</span> <span class="hps">($</span> <span class="hps">GLOBALS</span> <span class="hps atn">['</span><span>bLockSession</span><span>']</span><span>))</span><br> <span class="hps">$</span> <span class="hps">GLOBALS</span> <span class="hps atn">['</span><span>bLockSession</span><span>']</span> <span class="hps">= false</span><span>;</span><br><br> <span class="hps">If you change</span> <span class="hps">it to this:</span><br><br> <span class="hps">$</span> <span class="hps">GLOBALS</span> <span class="hps atn">['</span><span>bLockSession</span><span>']</span> <span class="hps">= true</span><span>;</span><br><br> <span class="hps">eliminating</span> <span class="hps">the if</span><span>,</span> <span class="hps">and</span> <span class="hps">there is no</span> <span class="hps">error</span> <span class="hps">anymore</span> <span class="hps">on</span> <span class="hps">ubuntu</span> <span class="hps">server.</span></span><br><br><br><br><br><div><div id="SkyDrivePlaceholder"></div>> From: ms4w-users-request@lists.maptools.org<br>> Subject: MS4W-Users Digest, Vol 97, Issue 3<br>> To: ms4w-users@lists.maptools.org<br>> Date: Sat, 5 May 2012 12:00:01 -0500<br>> <br>> Send MS4W-Users mailing list submissions to<br>>         ms4w-users@lists.maptools.org<br>> <br>> To subscribe or unsubscribe via the World Wide Web, visit<br>>         http://lists.maptools.org/mailman/listinfo/ms4w-users<br>> or, via email, send a message with subject or body 'help' to<br>>         ms4w-users-request@lists.maptools.org<br>> <br>> You can reach the person managing the list at<br>>         ms4w-users-owner@lists.maptools.org<br>> <br>> When replying, please edit your Subject line so it is more specific<br>> than "Re: Contents of MS4W-Users digest..."<br>> <br>> <br>> Today's Topics:<br>> <br>> 1. Mapserver variable session php error in Ubuntu Server<br>> (Fernando S?nchez Garc?a)<br>> <br>> <br>> ----------------------------------------------------------------------<br>> <br>> Message: 1<br>> Date: Fri, 4 May 2012 18:37:17 +0000<br>> From: Fernando S?nchez Garc?a         <nando_gcia@hotmail.com><br>> Subject: [MS4W-Users] Mapserver variable session php error in Ubuntu<br>>         Server<br>> To: "ms4w-users@lists.maptools.org" <ms4w-users@lists.maptools.org><br>> Message-ID: <SNT133-W55205AF82F28823D0BFADCF62C0@phx.gbl><br>> Content-Type: text/plain; charset="iso-8859-1"<br>> <br>> <br>> Hi, I hope you can help me with a problem. Some years ago I developed a <br>> gis with apache + php + mapserver + postgresql + postgis + chameleon. I <br>> had two systems: one in Windows XP <br>> <br>> 32bit and the other with Ubuntu Server 9.10 32bit. I upgraded to v3.0.2 <br>> MS4W with (MapServer 5.6.6, PHP 5.3.6, Apache 2.2.17 with OpenSSL <br>> 0.9.8o) with Chameleon 2.6rc, PostgreSQL 9 and PostGIS 1.5 on <br>> <br>> windows and have installed on the server a Ubuntu Server 11.10 64bit <br>> with Mapserver 5.6.6, PHP 5.3.6-13, Apache 2.2.20, Chameleon 2.6rc, <br>> PostgreSQL 9 and PostGIS 1.5.<br>> <br>> In windows everything works fine without any error, but in linux all the<br>> gis works well except the generation of map images. Chameleon gives me <br>> the following error:<br>> <br>> <br>> <br>> "Error rendering map image:<br>> <br>> A fatal error has occurred restoring your session.<br>> <br>> Please restart the application ".<br>> <br>> <br>> <br>> This error occurs randomly, ie sometimes appear soon after starting the <br>> web that maps samples and sometimes tear good maps and after interacting<br>> with buttons such as zoom, search, select layers, etc.. comes a time <br>> when the error occurs.<br>> <br>> <br>> <br>> I tried to load the maps with various browsers: Internet Explorer 8 and <br>> 9, Firefox 9, 11 and 12, with Chrome, etc and all the error (sometimes <br>> earlier and sometimes later).<br>> <br>> <br>> <br>> I located the error message in the files of Chameleon and occurs when <br>> the session is lost. After questioning the official mailing list <br>> Chameleon I have not responded to or Chameleon Mapserver issue, but the <br>> problem is the PHP session variables in Ubuntu that are not properly <br>> read.<br>> <br>> I looked where the variables that make Ubuntu is in / var/lib/php5 / and when I go into the GIS files are created.<br>> <br>> For example the content of this folder is:<br>> <br>> <br>> <br>> -Rw-r - r - 1 www-data www-data 0 05/02/2012 12:29 DELETEME<br>> <br>> drwxr-xr-x 2 www-data www-data 4096 02/05/2012 13:00 sess_4fa1124a4c1b0<br>> <br>> drwxr-xr-x 3 www-data www-data 4096 02/05/2012 13:03 sess_4fa113d58b836<br>> <br>> drwxr-xr-x 3 www-data www-data 4096 02/05/2012 13:28 sess_4fa11a52ecf87<br>> <br>> drwxr-xr-x 3 www-data www-data 4096 02/05/2012 13:30 sess_4fa11ac13d4a7<br>> <br>> drwxr-xr-x 3 www-data www-data 4096 8:15 sess_4fa22030ecf5a 05/03/2012<br>> <br>> drwxr-xr-x 3 www-data www-data 4096 8:33 sess_4fa2248dd36d3 05/03/2012<br>> <br>> drwxr-xr-x 2 www-data www-data 4096 8:35 sess_4fa2272b9d3c6 05/03/2012<br>> <br>> drwxr-xr-x 3 www-data www-data 4096 8:43 sess_4fa228e314a33 05/03/2012<br>> <br>> drwxr-xr-x 2 www-data www-data 4096 05/03/2012 10:00 sess_4fa23b23bcd80<br>> <br>> drwxr-xr-x 3 www-data www-data 4096 05/03/2012 12:29 sess_4fa25d60a2ea9<br>> <br>> -Rw ------- 1 www-data www-data 185 05/03/2012 12:26 sess_gmi7nemimpfsaf2lppn55m92c2<br>> <br>> <br>> <br>> And for example in the directory sess_4fa25d60a2ea9 / that is created by entering the sig files are:<br>> <br>> -Rw-r - r - 1 www-data www-data 1336040950-15887 3/5/2012 12:29 8569.map<br>> <br>> -Rw-r - r - 1 www-data www-data 1336040951-15887 3/5/2012 12:29 2414.map<br>> <br>> -Rw-r - r - 1 www-data www-data 1336040951-15887 3/5/2012 12:29 3346.map<br>> <br>> -Rw-r - r - 1 www-data www-data 1336040957-15887 3/5/2012 12:29 2107.map<br>> <br>> -Rw-r - r - 1 www-data www-data 1336040957-15887 3/5/2012 12:29 2317.map<br>> <br>> -Rw-r - r - 1 www-data www-data 1336040959-15887 3/5/2012 12:29 3372.map<br>> <br>> -Rw-r - r - 1 www-data www-data 1336040959-15887 3/5/2012 12:29 7593.map<br>> <br>> -Rw-r - r - 1 www-data www-data 1336040960-15887 3/5/2012 12:29 7987.map<br>> <br>> -Rw-r - r - 1 www-data www-data 1336040961-15887 3/5/2012 12:29 4889.map<br>> <br>> -Rw-r - r - 1 www-data www-data 1336040963-15864 3/5/2012 12:29 2339.map<br>> <br>> -Rw-r - r - 1 www-data www-data 1336040963-15864 3/5/2012 12:29 2976.map<br>> <br>> -Rw-r - r - 1 www-data www-data 1336040972-15948 3/5/2012 12:29 4146.map<br>> <br>> -Rw-r - r - 1 www-data www-data 1336040972-15948 3/5/2012 12:29 8593.map<br>> <br>> -Rw-r - r - 1 www-data www-data 128 05/03/2012 12:27 8b4b39babc2d1b7a1b23490574832862.shp<br>> <br>> -Rw-r - r - 1 www-data www-data 108 05/03/2012 12:27 8b4b39babc2d1b7a1b23490574832862.shx<br>> <br>> -Rw-r - r - 1 www-data www-data 14 967 05/03/2012 12:26 mapDHTML_adjust.map<br>> <br>> drwxr-xr-x 2 www-data www-data 4096 05/03/2012 12:29 queryresultdir<br>> <br>> -Rw-r - r - 1 www-data www-data 13 898 05/03/2012 12:29 session_file<br>> <br>> <br>> <br>> I searched the internet error php session variables in linux, but what I find is not related to my problem.<br>> <br>> I installed everything on the server with Ubuntu 10.11 32bit Ubuntu 4.12 and then with 32 and 64bit and error is the same.<br>> <br>> <br>> <br>> Can anyone give me a clue how to fix it?                                            <br>> -------------- next part --------------<br>> An HTML attachment was scrubbed...<br>> URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20120504/8922010f/attachment.html <br>> <br>> ------------------------------<br>> <br>> _______________________________________________<br>> MS4W-Users mailing list<br>> MS4W-Users@lists.maptools.org<br>> http://lists.maptools.org/mailman/listinfo/ms4w-users<br>> <br>> <br>> End of MS4W-Users Digest, Vol 97, Issue 3<br>> *****************************************<br></div>                                            </div></body>
</html>