0
Answered

Migrating from PHP7.0 to PHP 7.2 (IIS)

Dmitry 2 years ago updated by Vlad R 2 years ago 13

I did a migration to 7.2.3-nts-x64 using your guide:

http://php.filerun.com/php7FileRunIssuePHP72_crop.PNGFileRunIssuePHP72_crop.PNG


Overall it works, but when I am trying to open a folder that contain files I see Error 500. I checked logs, but it also not very useful. No errors in PHP log and error 500 in IIS log:


2018-03-05 17:45:01 127.0.0.1 POST / module=fileman§ion=get&page=grid 443 - 211.32.4.70 Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64;+rv:58.0)+Gecko/20100101+Firefox/58.0 https://filerun/ 500 0 64 450
2018-03-05 17:44:46 127.0.0.1 POST / module=fileman§ion=get&page=grid 443 - 211.32.4.65 Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64;+rv:58.0)+Gecko/20100101+Firefox/58.0 https://filerun/ 500 0 64 454


What should I check to found why the error happens? 

The board always changes the URL to an example like above, so I add a space "module=fileman& section=get&page=grid"

Under review
What should I check to found why the error happens?

The PHP configured "error_log" should contain some related entries, if it's a PHP issue. Sometimes it can be unclear which is the active PHP error log file. One solution is to set "display_errors" to "On" in the PHP configuration and check the error message in the browser, by opening the developer toolbar and checking the network activity tab for the server's response on the XHS request (although might not be necessary and you get that in a popup alert from FileRun).

Thank you, I found the error. I had filetypes.php file encoded using ionCube for older PHP version. And in your guide you dont mention to replace it.

Hm. That particular file shouldn't have been encoded at all, to allow you to edit the filetypes FileRun recognizes. Good that you pointed that out, so that we can fix the update.

Now I have another 500 error when open media files.


min.php?v=2018.02.13:4070 POST https://filerun/?module=fileman§ion=utils&page=file_preview 500 (Internal Server Error)
FR.UI.postToTarget @ min.php?v=2018.02.13:4070
FR.components.ImageViewer.Ext.extend.loadHiRes @ min.php?v=2018.02.13:5822
r @ min.php?extjs=1&v=2018.02.13:2
setInterval (async)
n.delay @ min.php?extjs=1&v=2018.02.13:2
loadFile @ min.php?v=2018.02.13:5914
setFile @ min.php?v=2018.02.13:5939
open @ min.php?v=2018.02.13:5974
showPreview @ min.php?v=2018.02.13:4402
openItem @ min.php?v=2018.02.13:2121
rowdblclick @ min.php?v=2018.02.13:1985
fire @ min.php?extjs=1&v=2018.02.13:2
fireEvent @ min.php?extjs=1&v=2018.02.13:2
processEvent @ min.php?extjs=1&v=2018.02.13:2
processEvent @ min.php?extjs=1&v=2018.02.13:2
onDblClick @ min.php?extjs=1&v=2018.02.13:2
S @ min.php?extjs=1&v=2018.02.13:2



 I also found "PHP Warning:  sizeof(): Parameter must be an array or an object that implements Countable in C:\inetpub\filerun_storage\system\classes\vendor\FileRun\Lang.php on line 207"

It is a known regression bug from the last update. It is limited to PHP 7.2 and doesn't affect any functionality whatsoever. It will be fixed with the next update.

I have also another 500 error when open media files.

"<script src="?module=fileman§ion=utils&page=custom_actions.js&language=english&v=2018.02.13"></script>"

GET https://filerun/?module=fileman§ion=utils&page=custom_actions.js&language=english&v=2018.02.13 500 (Internal Server Error)

"doesn't affect any functionality"

By the way playing media files dont work, because I have 500 error.

Try replacing the file 

system/classes/vendor/FileRun/Files/Plugin.php

with this one: https://goo.gl/Lc3NyX

Setting "display_errors" to "Off" is also a possible workaround, and should be set to "Off" for any production FileRun instance.

Thank you very much, it fixed the problem. So now I dont have 500 errors.