<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Big boring changes incoming (PHP7)</title>
        <description>[i](LUA sandbox changes after some intro story)[/i]

We are working on finalizing something we started 1-2 years ago. Upgrading from PHP 5.6 to 7.x.

The first thing we noticed was that we needed to change our database connection implementations. We did that a long time ago, but left a lot of legacy code everywhere. That was fixed last year. 2-3 weeks alone with rewriting code.

Yesterday I upgraded our development environment to PHP 7.0 and things stopped working, as expected. We are using some not too common PHP modules which started causing issues.

We had already moved away from our old Sphinxsearch implementation and (hopefully) use SphinxQL everywhere. This only needs a mysql compatible client library and therefore works as automatically as it can.

The two biggest tasks was the map generation and the LUA sandbox. The PHP module for map generation (static images, not JS) that we use doesn&#039;t officially support PHP 7.x yet. Though there is a fork. After many hours we have finally made it work, the only downside is that we can&#039;t get GIF-output to work for some reason. We used to store our maps as PNG but noticed they became smaller at no visual loss with GIF. Now we will have to go back to PNG again.

The LUA sandbox was worse. The implementation we have used to connect PHP with LUA has caused us issues before. We have been using a several year old version because newer versions kept segfaulting. Now with PHP 7.x we were forced to upgrade. We still got segfaults with the newer versions. After spending quite a lot of time trying to figure out why, we started looking for other solutions. The fact is, our current LUA sandbox also crashes sometimes, we haven&#039;t figured out if it&#039;s our fault or something else. But maybe there are some memory leaks in it. Maybe it&#039;s good to leave that implementation behind.

Instead we will now use Mediawiki&#039;s implementation if a LUA sandbox. There wasn&#039;t much documentation on the old implementation we used, but the new one has even less. It&#039;s up and running in the development environment though, and it seems stable.

The problem is that it will be a complete new implementation from our side. This will affect you as well. As it&#039;s right now, there is no code taking care of errors and trying to show those to the users. That&#039;s what our next step. The up-side is that we can clean up the current code which is a mess.

With the new Sandbox we don&#039;t control which LUA functions exists. It&#039;s what Mediawiki has considered to be safe. Anything else will need to be implemented in PHP as callbacks. This far we have only tested 2 of over 2000 scripts and therefore don&#039;t know yet how big of a problem this is.

All current functions that begins with PGC_ will in the future be PGC. instead. (PGC_GetFinds will become PGC.GetFinds). This is currently solved with a [i]search and replace[/i] in the LUA source code, which isn&#039;t the best solution.

Also all built in LUA functions will change names. With our old Sandbox we couldn&#039;t expose them with the same name,  therefore tonumber was called ToNumber for example. Or string.byte was called StringByte. With the new Sandbox they will have their correct names. Existing checkers are search-and-replaced for this as well. Most unreliable search-and-replace is that &#039;Type will become &#039;type&#039;. Other terms we search for probably won&#039;t match anything unintentional.


So why PHP 7.x then? Well, it&#039;s supposed to be more than twice as fast. It&#039;s supposed to consume less memory, though my single test I have made increased memory usage with 20%. We of course don&#039;t want to be stuck with old dependencies either. Long-term it&#039;s wise to try to catch up with recent releases.

Follow this topic if you want to make sure you don&#039;t miss anything. You can follow it by replying, or clicking the [i]Follow topic[/i] button. When we are done with what we can thing of, we will probably open up the development environment and use it as a staging environment for a few days, to get some feedback, especially around LUA development.</description>
        <link>https://project-gc.com/forum/read?6,17264,17264#msg-17264</link>
        <lastBuildDate>Thu, 30 Apr 2026 02:09:14 +0000</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17641#msg-17641</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17641#msg-17641</link>
            <description><![CDATA[ I am not sure how familiar you are with Git and other version control systems. The tags, as you say, are for a specific version. They are also only a name to make some certain versions easier to recognize. Typically used to mark release versions when developing software. v1.0.0, v1.0.1 and so on.<br />
<br />
The current idea and plan with GitLab is only to provide an alternative online editor of source code, where certain users also can edit other persons scripts. By having it in Git we get historical versions and diffs automatically. We can also keep track of who did what and much easier revert changes if needed.<br />
<br />
If one doesn&#039;t want to work with an online editor, one can also clone the repository and edit the file locally, with ones favorite editor, commit the changes and just push it to origin.<br />
<br />
Next step could be that we move all scripts into a scripts directory and add another directory to version control tags. I don&#039;t know if that&#039;s feasible. As it is now, we validate the JSON on save, I am unsure if we can add such hook to GitLab, especially when content gets pushed towards it.<br />
<br />
We are also considering adding user contributed modules for Profile stats. If/when that happens I can imagine that going via GitLab will be the only alternative. In other words, we might not keep an online source code editor at Project-GC.<br />
<br />
I don&#039;t see why the name of the script writer is needed in the repository at all. Or to be more exact, that name will exists in the commits only.<br />
<br />
What we could (and should) do, is link the GitLab source-code file directly from the Challenge checker page. As it is now, it&#039;s not too easy to find the script number from a script. There could be a link going straight to (for example) <a href="https://gitlab.com/magma1447/PGC-ChallengeCheckers/blob/master/1005.lua"  rel="nofollow">https://gitlab.com/magma1447/PGC-ChallengeCheckers/blob/master/1005.lua</a><br />
<br />
I am also looking into two other ideas for the future, where Git will help us.<br />
1) We could work with branches, so that a script editor can edit the script in a development branch, and also execute the script from there. When done, he just merges it into the master branch and all scripts suddenly uses the new version.<br />
2) If one makes breaking changes to a script and notices it afterwards, and it&#039;s not fixable. A tag could point to a certain version of a script, instead of always pointing to the latest. I am not sure this is a good idea, or worth it. But it&#039;s something that&#039;s easier to do with Git than how we store it now.]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Tue, 13 Mar 2018 10:53:19 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17626#msg-17626</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17626#msg-17626</link>
            <description><![CDATA[ Hi,<br />
I know there is a ton on the plate, so feel free delaying your response.<br />
<br />
I was looking at GitLab today.  Looks to me like it&#039;s just by Script number file name.   I tracked down one of mine and tagged it with my project-gc username.... but i think it only tags the current version, so if i update it in the future, a tag search will return the old one.<br />
<br />
Any suggestion on how best to work with this repository?  Will you somehow migrate the script writer, tags, etc to GitLab?<br />
<br />
-TG]]></description>
            <dc:creator>travelingGeek</dc:creator>
            <category>Checker news</category>
            <pubDate>Mon, 12 Mar 2018 20:08:59 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17538#msg-17538</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17538#msg-17538</link>
            <description><![CDATA[ Seems like a success.<br />
<br />
FYI, there is also a PGC.GetCPUUsage() in Dev. Not available on Live servers, it comes with the new Sandbox.<br />
<br />
It should return number of seconds the Sandbox believes it has been running. When that reaches 60, the Sandbox will timeout.]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 09 Mar 2018 19:24:37 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17537#msg-17537</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17537#msg-17537</link>
            <description><![CDATA[ Live:<br />
Date: 0.00851655 ms<br />
VincentyList: 0.02342321 ms 111420.728 m<br />
Vincenty: 0.02293138 ms 111420.728 m<br />
Haversine: 0.01790795 ms 111195.08 m<br />
Pythagoras: 0.00240524 ms 111420.69881874 m<br />
OsClock: 0.00030678000000002 ms<br />
<br />
Dev:<br />
Date: 0.0125416 ms = slower<br />
VincentyList: 0.0097734 ms 111420.728 m = faster<br />
Vincenty: 0.0099198 ms 111420.728 m = faster<br />
Haversine: 0.0069936 ms 111195.08 m = faster<br />
Pythagoras: 0.0018786 ms 111420.69881874 m = faster<br />
os.clock: 0.0015934 ms = slower<br />
<br />
Only os.clock is slower but not too slow.]]></description>
            <dc:creator>arisoft</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 09 Mar 2018 18:51:26 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17536#msg-17536</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17536#msg-17536</link>
            <description><![CDATA[ I will remove the DistanceVincentyList() and DistanceHaversineList() callbacks.<br />
<br />
I&#039;ll leave them for now, but I won&#039;t commit them tomorrow/on Monday when I clean up my repository.]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 09 Mar 2018 18:45:17 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17535#msg-17535</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17535#msg-17535</link>
            <description><![CDATA[ I found something super interesting. <s>Not sure I will finish this today, seems like a mess.</s><br />
<br />
I currently have 4 PHP-servers running for PGC. All of them are virtual machines.<br />
Dev: 10s (PHP7)<br />
Live: 6.76s (LUA isn&#039;t executed here in reality)<br />
Dedicated LUA server 1: 17.5s (for auto-checkers in the background, likely to be loaded) 7.1s after removing all other running LUA scripts<br />
Dedicated LUA server 2: 1.7s (this is where live runs its lua scripts)<br />
<br />
Virtualization server : instance<br />
2 : dev<br />
3 : Live<br />
1: lua-01<br />
3: lua-02<br />
<br />
Virtualization server 3 has the best hardware, 1 and 2 are identical in CPU.<br />
<br />
<s>What I am considering right now is to move DEV to virtualization server 3 to see if it becomes faster. But in that case I would expect Live to already be faster.</s><br />
<br />
Found the issue! Now I have a billion tabs open and lost track of what I am doing. But I found a tag that seems fast on DEV now.<br />
<br />
There were debug-processing installed on more servers than there should be. I even had it on a TODO-list related to this whole PHP7 thing to remove that! If I only had gotten that far...<br />
<br />
Please confirm that it&#039;s faster now. :)]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 09 Mar 2018 18:41:35 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17534#msg-17534</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17534#msg-17534</link>
            <description><![CDATA[ Penlight library is only sligthly slightly slower. It may be implemented in LUA.<br />
Live Date: 0.00953597 ms<br />
Dev Date: 0.0123386 ms<br />
<br />
<blockquote class="bbcode"><div><small>Quote<br /></small><strong></strong><br />Since that didn&#039;t help I was curious if it was the phpgeo library or not. I then made a small PHP script that calculates Haversine 100,000 times in a loop. 12.141s on DEV and 11.315s on Live. I can&#039;t say if the small difference is due to hardware or software, but I don&#039;t think we care about that small difference. I also only ran it once.</div></blockquote>
<br />
There is something special. 100,000 Haversines should take only 1.745 s in Live - not 11,315 as you get - if you are using compatible method.]]></description>
            <dc:creator>arisoft</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 09 Mar 2018 18:12:51 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17533#msg-17533</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17533#msg-17533</link>
            <description><![CDATA[ I picked the OsClock() for testing because it may be used many times. It is some kind of library function in LUA. Don&#039;t know anything about the implementation but for some reason it is also many times slower without reason.<br />
<br />
What do we know about different type of library functions? Are they all slower? At least Math library does not seem to be slower.]]></description>
            <dc:creator>arisoft</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 09 Mar 2018 17:49:15 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17532#msg-17532</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17532#msg-17532</link>
            <description><![CDATA[ Seems like you got the same conclusion as I did in <a href="https://project-gc.com/forum/read?6,17264,17531#msg-17531"  rel="nofollow">https://project-gc.com/forum/read?6,17264,17531#msg-17531</a><br />
<br />
Requesting a list doesn&#039;t help.<br />
<br />
So, in pure PHP, there is no speed difference between the PHP5.6 version and PHP7 version of Haversine().<br />
There is a huge difference when requesting many times.<br />
There is a huge difference when requesting a list of coordinates.<br />
<br />
Seems quite weird right?]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 09 Mar 2018 17:44:59 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17531#msg-17531</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17531#msg-17531</link>
            <description><![CDATA[ Wrote a test myself.<br />
<br />
-- 11 seconds<br />
for var=1,100000 do<br />
  PGC.DistanceHaversine(10, 12, 11, 13)<br />
end<br />
<br />
--13 seconds<br />
list = {}<br />
for var=1,100000 do<br />
  TableInsert(list, {lat1 = 10, lon1 = 12, lat2 = 11, lon2 = 13})<br />
end<br />
 PGC.DistanceHaversineList(list)<br />
<br />
<br />
I am currently out of ideas.]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 09 Mar 2018 17:40:43 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17530#msg-17530</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17530#msg-17530</link>
            <description><![CDATA[ I added test for / function DistanceVincentyList(list)<br />
<br />
You can now replace the script version with PGC version to compare results.]]></description>
            <dc:creator>arisoft</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 09 Mar 2018 17:40:39 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17529#msg-17529</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17529#msg-17529</link>
            <description><![CDATA[ The DEV server now has a more recent version of that library. I ran your test checker to see the results. Still quite slow.<br />
Vincenty: 0.1489622 ms 111420.728 m<br />
Haversine: 0.1146362 ms 111195.08 m<br />
Pythagoras: 0.0019958 ms 111420.69881874 m<br />
os.clock: 0.0015268 ms<br />
<br />
I had to enable your script and tag meanwhile,hope I didn&#039;t interrupt any editing.<br />
<br />
<br />
Since that didn&#039;t help I was curious if it was the phpgeo library or not. I then made a small PHP script that calculates Haversine 100,000 times in a loop. 12.141s on DEV and 11.315s on Live. I can&#039;t say if the small difference is due to hardware or software, but I don&#039;t think we care about that small difference. I also only ran it once.<br />
<br />
So, it doesn&#039;t seem to be the library. I am thinking maybe it&#039;s the cost of using the callbacks added to the Sandbox. Do you think you can implement a test that asks for a list of distances? So instead of calling DistanceVincenty()/DistanceHaversine() X times in a loop, we build a list of data and call a test function like DistanceVincentyList()/DistanceHaversineList()?<br />
The list should then be something like<br />
{ {lat1 = 10, lon1 = 10, lat2 = 20, lon2 = 20}, {lat1 = 30, lon1 = 30, lat2 = 31, lon2 = 31} ... }<br />
<br />
I prefer to not implement that on Live, but at least we can see if it becomes much faster on DEV.<br />
<br />
EDIT: Such callback exists now (not tested). It will return the results. As it is now, it just returns an array with the distances in the same order as it got the coordinate pairs. Probably not a useful design, but good enough for testing.]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 09 Mar 2018 17:17:41 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17528#msg-17528</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17528#msg-17528</link>
            <description><![CDATA[ For a curiosity I also added OsClock() to the test and it is also about 5 times slower in Dev,]]></description>
            <dc:creator>arisoft</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 09 Mar 2018 17:02:55 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17527#msg-17527</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17527#msg-17527</link>
            <description><![CDATA[ The PHP library used for those algorithms has a much newer version that requires PHP7. I assume it&#039;s a good sign it requires PHP7. Since it does, it&#039;s patched with that in mind, and hopefully at least as fast as well.<br />
<br />
I&#039;ll see of I can upgrade it straight away, then we will run your checker in DEV again to see the results.]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 09 Mar 2018 16:55:24 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17526#msg-17526</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17526#msg-17526</link>
            <description><![CDATA[ ganja1447 Wrote:<br />
-------------------------------------------------------<br />
&gt; To the above, I did not count your script that&#039;s<br />
&gt; slow arisoft<br />
&gt; (https://dev-01.project-gc.com/Challenges//30511).<br />
&gt; Since it works, I didn&#039;t see it as priority 1.<br />
&gt; It&#039;s still slow though.<br />
<br />
Now I have studied this speed problem. My original guess was right. It is a server side problem. <br />
I made a proof of concept checker  <a href="https://project-gc.com/Challenges//32341"  rel="nofollow">https://project-gc.com/Challenges//32341</a><br />
<br />
Live server gives this kind of (debug) results: <br />
Vincenty: 0.02340241 ms 111420.728 m<br />
Haversine: 0.01744844 ms 111195.08 m<br />
Pythagoras: 0.00234117 ms 111420.69881874 m<br />
<br />
Dev server gives this kind of results: <br />
Vincenty: 0.155944 ms 111420.728 m<br />
Haversine: 0.127434 ms 111195.08 m<br />
Pythagoras: 0.0019912 ms 111420.69881874 m<br />
<br />
Two notes:  <br />
<br />
- Both Vincenty and Haversine are about 7 times slower in Dev but my own algorithm, which is used in Cache chains, is slightly faster! That explains why Cache chains is not affected by this problem.<br />
<br />
- My Pythagoras algorithm seems to be faster and more precise than Haversine ;) but it is usable only up to 100km range.]]></description>
            <dc:creator>arisoft</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 09 Mar 2018 16:48:44 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17508#msg-17508</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17508#msg-17508</link>
            <description><![CDATA[ With those server side changes most scripts with issues passed the tests now. I went through my big post and added strikethrough to those that now works.<br />
<br />
If I didn&#039;t miss any script, there are now <b>five</b> scripts with issues. All with a known fix noted close to them. If no one else fixes them before Monday, I will probably fix them then.<br />
<br />
To the above, I did not count your script that&#039;s slow arisoft (https://dev-01.project-gc.com/Challenges//30511). Since it works, I didn&#039;t see it as priority 1. It&#039;s still slow though.]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Thu, 08 Mar 2018 21:31:51 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17506#msg-17506</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17506#msg-17506</link>
            <description><![CDATA[ I believe I have patched every method now to not return anything with index 0. Just hoping I didn&#039;t fix one thing and break something else.]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Thu, 08 Mar 2018 21:14:52 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17505#msg-17505</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17505#msg-17505</link>
            <description><![CDATA[ I think you are onto something. I thought I had checked that GetFinds() actually returned the same amount of caches on both Live and Dev. Either I failed my test, or something else screwed me over.<br />
<br />
I just did a patch on Dev that makes this checker work. Ie, I insert a NULL item first in the list, which will then get index 0. That index 0 item seems to disappear.<br />
<br />
Now I wonder if this is a good solution that I should apply to all the callbacks, or there is some drawback...]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Thu, 08 Mar 2018 21:09:14 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17503#msg-17503</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17503#msg-17503</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong></strong><br />https://project-gc.com/Challenges//984 scriptId: 2486, creator: arisoft<br />
<a href="https://project-gc.com/Challenges//9533"  rel="nofollow">https://project-gc.com/Challenges//9533</a> scriptId: 826, creator: vogelbird<br />
local cache = list[word.codes[word.select]]<br />
word.select becomes 1 and word.codes[word.select] becomes GC1T3TV. However, that gccode does not exist in the variable list.</div></blockquote>
<br />
I checked this and there may be someting wrong with PGC_GetFinds<br />
<br />
I added debug output to show what caches are requested and what caches are received. <br />
<br />
When I tried this with my own id the missing item was cache GCVXQE. Live server returns 115 caches as requested but Dev server returns 114 caches for some reason. The debug output contains &quot;Requested codes:&quot; and &quot;Received codes:&quot; which should be the same but they are not. From the debug output I can not find any rational reason why PGC_GetFinds leaves one cache out. Does it return array with [0] index?]]></description>
            <dc:creator>arisoft</dc:creator>
            <category>Checker news</category>
            <pubDate>Thu, 08 Mar 2018 20:59:21 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17334#msg-17334</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17334#msg-17334</link>
            <description><![CDATA[ Updated information, if you haven&#039;t seen it already: <a href="https://project-gc.com/forum/read?6,17332"  rel="nofollow">https://project-gc.com/forum/read?6,17332</a>]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 02 Mar 2018 21:58:07 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17331#msg-17331</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17331#msg-17331</link>
            <description><![CDATA[ That&#039;s on purpose. There should be an &quot;alert&quot; added to the web that more information is coming soon. I am currently writing that post. Then there will probably be a few hours until scripts can be edited at all.<br />
<br />
Currently pushing all scripts to GitLab.com.]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 02 Mar 2018 21:39:11 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17330#msg-17330</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17330#msg-17330</link>
            <description><![CDATA[ I tried to fix &quot;table&quot; variables from 32368 but I can not save the edited script. Error saving...]]></description>
            <dc:creator>arisoft</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 02 Mar 2018 21:37:31 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17329#msg-17329</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17329#msg-17329</link>
            <description><![CDATA[ <b>I&#039;ll summarize all scripts that needs to be fixed here:</b><br />
<br />
<a href="https://project-gc.com/Challenges//20319"  rel="nofollow">https://project-gc.com/Challenges//20319</a> scriptId: 1307, creator: famv17<br />
Typecasting issue in fixed_length_right<br />
Fix: string = tostring(string) <br />
<br />
<br />
<s>https://project-gc.com/Challenges//984 scriptId: 2486, creator: arisoft</s><br />
<s>https://project-gc.com/Challenges//9533 scriptId: 826, creator: vogelbird</s><br />
local cache = list[word.codes[word.select]] <br />
word.select becomes 1 and word.codes[word.select] becomes GC1T3TV. However, that gccode does not exist in the variable list.<br />
Fixed with server side patch.<br />
<br />
<br />
<a href="https://project-gc.com/Challenges//2580"  rel="nofollow">https://project-gc.com/Challenges//2580</a> scriptId: 528, creator: the Seagnoid<br />
&lt; if TGrid[Letter][CacheType] ~= nil and TResultsTypes[CacheType] == nil then <br />
&gt; if TGrid[Letter] ~= nil and TGrid[Letter][CacheType] ~= nil and TResultsTypes[CacheType] == nil then<br />
<br />
<br />
<a href="https://project-gc.com/Challenges//7295"  rel="nofollow">https://project-gc.com/Challenges//7295</a> scriptId: 767, creator: hampf<br />
<a href="https://project-gc.com/Challenges//24234"  rel="nofollow">https://project-gc.com/Challenges//24234</a> scriptId: 1550, creator: jpavlik<br />
<a href="https://project-gc.com/Challenges//25085"  rel="nofollow">https://project-gc.com/Challenges//25085</a> scriptId: 1679, creator: sloth96<br />
Prints a table, need to remove that print for now<br />
<br />
<br />
<s>https://project-gc.com/Challenges//11986 scriptId: 919, creator: Target.</s><br />
[string &quot;&quot;]:115: attempt to index field &#039;?&#039; (a nil value) <br />
Fixed with server side patch.<br />
<br />
<br />
<s>https://project-gc.com/Challenges//14305 scriptId: 971, creator: jpavlik</s><br />
<s>https://project-gc.com/Challenges//18169 scriptId: 1226, creator: vogelbird (fork of the above)</s><br />
[string &quot;&quot;]:26: attempt to compare nil with number <br />
Fixed with server side patch.<br />
<br />
<br />
<s>https://project-gc.com/Challenges//21705 scriptId: 1287, creator: Target.</s><br />
Typecast issue <br />
[string &quot;&quot;]:207: attempt to perform arithmetic on field &#039;radius&#039; (a string value) <br />
local latadd=point.radius/1000*latconv <br />
local lonadd=point.radius/1000*lonconv<br />
Fixed with server side patch. (wasn&#039;t a typecast issue)<br />
<br />
<br />
<s>https://project-gc.com/Challenges//25004 scriptId: 1623, creator: sloth96</s><br />
[string &quot;&quot;]:284: bad argument #2 to &#039;min&#039; (number expected, got nil) <br />
map.outboundBox[2]=math.min(map.outboundBox[2],list[2])<br />
Fixed with server side patch.<br />
<br />
<br />
<s>https://project-gc.com/Challenges//25151 scriptId: 1690, creator: sloth96</s><br />
<s>https://project-gc.com/Challenges//27426 scriptId: 1690, creator: sloth96</s><br />
<s>Uses a json file (US_State_Capitals) that works in PHP 5.6 but not in 7.0. Most likely invalid in some way.</s><br />
There was a tab character in a key in the JSON (FIXED).<br />
The scripts output is faulty on my name though, because of 0-based indexes and this code:<br />
        local north = poly.rect[1]<br />
        local south = poly.rect[2]<br />
        local east = poly.rect[3]<br />
        local west = poly.rect[4]<br />
Fixed with server side patch.<br />
<br />
<br />
<br />
<s>https://project-gc.com/Challenges//14410 scriptId: 1061, creator: SeekerSupreme</s><br />
0-based index issue?<br />
[string &quot;&quot;]:26: attempt to index field &#039;?&#039; (a nil value) <br />
hides[1] can be nil at line 26 <br />
FIX: if hides[0] ~= nil then .. else .. end<br />
Fixed with server side patch.<br />
<br />
<br />
<s>https://project-gc.com/Challenges//26424 scriptId: 1914, creator: AnnaMoritz</s><br />
<s>https://project-gc.com/Challenges//26933 scriptId: 1996, creator: AnnaMoritz</s><br />
0-based index issue?<br />
[string &quot;&quot;]:1423: attempt to index global &#039;lastFind&#039; (a nil value) <br />
Fixed with server side patch.<br />
<br />
<br />
<s>https://project-gc.com/Challenges//26726 scriptId: 1609, creator: sloth96</s><br />
0-based index issue?<br />
map.outboundBox[1]=math.min(map.outboundBox[1],list[1]) <br />
map.outboundBox[3]=math.max(map.outboundBox[3],list[1]) <br />
map.outboundBox[2]=math.min(map.outboundBox[2],list[2]) &lt;----- 296 <br />
map.outboundBox[4]=math.max(map.outboundBox[4],list[2]) <br />
I assume this is also a 0-based index issue. In that case, it should be 0, 0, 1, 1<br />
Fixed with server side patch.<br />
<br />
<br />
Scripts destroying the class table (scriptId:tagId):<br />
<s>603:2079, 735:5985, 743:6151, 837:9830, 845:10031, 857:10800, 940:12285, 937:12987, 1007:13527, 1021:13839, 1065:14494, 1098:15162, 1109:15561, 1131:15958, 1165:16268, 1315:20367, 1363:20877, 1397:21440, 1503:23224, 1508:23316, 1518:23541, 1524:23672, 1525:23684, 1553:24296, 1466:24856, 1685:25130, 1989:26860, 1538:27817, 2245:28296, 2292:28663, 2385:29146, 2467:29749, 2513:30397, 2514:30511, 2535:30568, 2558:30693, 2581:30849, 2582:30857, 2624:31203, 2704:32366, 2602:32368</s><br />
<br />
<br />
Scripts destroying the class pairs:<br />
<s>https://project-gc.com/Challenges//24247 scriptId: 1552, creator: jpavlik</s><br />
<br />
<br />
<s>When I am more ready, there will be a way for certain users to edit ANY script to help us through this. I&#039;ll get back with more details later, might not be today. Quite tired now, been working double time for a few days.</s><br />
Scripts can now be edited via GitLab.com.<br />
<br />
All 0-based index issues was a server side issue, it was fixed (thanks arisoft for making me realize). That also fixed most of the broken scripts actually.]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 02 Mar 2018 19:26:23 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17327#msg-17327</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17327#msg-17327</link>
            <description><![CDATA[ <a href="https://project-gc.com/Challenges//26726"  rel="nofollow">https://project-gc.com/Challenges//26726</a><br />
[string &quot;&quot;]:296: bad argument #2 to &#039;min&#039; (number expected, got nil)<br />
<br />
map.outboundBox[1]=math.min(map.outboundBox[1],list[1])<br />
map.outboundBox[3]=math.max(map.outboundBox[3],list[1])<br />
map.outboundBox[2]=math.min(map.outboundBox[2],list[2])  &lt;----- 296<br />
map.outboundBox[4]=math.max(map.outboundBox[4],list[2])<br />
<br />
<b>I assume this is also a 0-based index issue. In that case, it should be 0, 0, 1, 1</b>]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 02 Mar 2018 16:38:58 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17326#msg-17326</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17326#msg-17326</link>
            <description><![CDATA[ <b>Another 0-based index issue</b><br />
<a href="https://project-gc.com/Challenges//26424"  rel="nofollow">https://project-gc.com/Challenges//26424</a><br />
[string &quot;&quot;]:1423: attempt to index global &#039;lastFind&#039; (a nil value)<br />
<br />
The issue comes from this function:<br />
<pre class="bbcode">
function getLastFind (profileId)
	lastFinds =  PGC.GetFinds( profileId, { fields = { &#039;gccode&#039;, &#039;visitdate&#039;, &#039;cache_name&#039;}, 
				order = &#039;NEWESTFIRST&#039;, 
				limit = 1} )
	return lastFinds[1]
end</pre>
<br />
<br />
<a href="https://project-gc.com/Challenges//26933"  rel="nofollow">https://project-gc.com/Challenges//26933</a> seems to have the same code.]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 02 Mar 2018 16:32:04 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17325#msg-17325</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17325#msg-17325</link>
            <description><![CDATA[ <a href="https://project-gc.com/Challenges//25151"  rel="nofollow">https://project-gc.com/Challenges//25151</a> uses a json file (US_State_Capitals) that works in PHP 5.6 but not in 7.0. Most likely invalid in some way.<br />
<br />
<a href="https://project-gc.com/Challenges//27426"  rel="nofollow">https://project-gc.com/Challenges//27426</a> uses the same json.]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 02 Mar 2018 16:06:51 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17324#msg-17324</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17324#msg-17324</link>
            <description><![CDATA[ <a href="https://project-gc.com/Challenges//25085"  rel="nofollow">https://project-gc.com/Challenges//25085</a><br />
Cannot pass circular reference to PHP<br />
<br />
Need to remove<br />
PGC.print(extreme)]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 02 Mar 2018 15:54:41 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17323#msg-17323</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17323#msg-17323</link>
            <description><![CDATA[ <a href="https://project-gc.com/Challenges//25004"  rel="nofollow">https://project-gc.com/Challenges//25004</a><br />
[string &quot;&quot;]:284: bad argument #2 to &#039;min&#039; (number expected, got nil)<br />
          map.outboundBox[2]=math.min(map.outboundBox[2],list[2])]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 02 Mar 2018 15:50:50 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17322#msg-17322</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17322#msg-17322</link>
            <description><![CDATA[ <a href="https://project-gc.com/Challenges//24234"  rel="nofollow">https://project-gc.com/Challenges//24234</a><br />
Cannot pass circular reference to PHP<br />
Need to remove Print(years)]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 02 Mar 2018 15:35:16 +0000</pubDate>
        </item>
        <item>
            <guid>https://project-gc.com/forum/read?6,17264,17321#msg-17321</guid>
            <title>Re: Big boring changes incoming (PHP7)</title>
            <link>https://project-gc.com/forum/read?6,17264,17321#msg-17321</link>
            <description><![CDATA[ Typecast issue<br />
<a href="https://project-gc.com/Challenges//21705"  rel="nofollow">https://project-gc.com/Challenges//21705</a><br />
[string &quot;&quot;]:207: attempt to perform arithmetic on field &#039;radius&#039; (a string value)<br />
     local latadd=point.radius/1000*latconv<br />
     local lonadd=point.radius/1000*lonconv]]></description>
            <dc:creator>magma1447</dc:creator>
            <category>Checker news</category>
            <pubDate>Fri, 02 Mar 2018 14:41:32 +0000</pubDate>
        </item>
    </channel>
</rss>
