Can not upgrade modules, get 500 Internal Server Error from mirror1.freepbx.org

I have a new Asterisk / FreePBX server using

  • CentOS 7
  • Asterisk 13.6.0
  • FreePBX 12.0.76.2

I am unable to upgrade modules from Module Admin or from the command line. After much investigation, I see that I get “500 Internal Server Error” as a reply to the download POST request in modulefunctions.class.php:1366. I see that there is a long and complicated POST string (quoted below). If I remove that string from the request the download succeeds.

Please can you help me understand why the POST string causes your server to fail?

installid=f06c5d3710e45494709876869aa47078&type=vmware&modules%5Bbuiltin%5D%5Bversion%5D=2.3.0.2&modules%5Bbuiltin%5D%5Bstatus%5D=2&modules%5Bbuiltin%5D%5Brawname%5D=builtin&modules%5Bbuiltin%5D%5Blicense%5D=unknown&modules%5Bcallrecording%5D%5Bversion%5D=12.0.4&modules%5Bcallrecording%5D%5Bstatus%5D=2&modules%5Bcallrecording%5D%5Brawname%5D=callrecording&modules%5Bcallrecording%5D%5Blicense%5D=AGPLv3%2B&modules%5Bcdr%5D%5Bversion%5D=12.0.22&modules%5Bcdr%5D%5Bstatus%5D=2&modules%5Bcdr%5D%5Brawname%5D=cdr&modules%5Bcdr%5D%5Blicense%5D=GPLv3%2B&modules%5Bcore%5D%5Bversion%5D=12.0.41&modules%5Bcore%5D%5Bstatus%5D=2&modules%5Bcore%5D%5Brawname%5D=core&modules%5Bcore%5D%5Blicense%5D=GPLv3%2B&modules%5Bcustomappsreg%5D%5Bversion%5D=12.0.3.2&modules%5Bcustomappsreg%5D%5Bstatus%5D=2&modules%5Bcustomappsreg%5D%5Brawname%5D=customappsreg&modules%5Bcustomappsreg%5D%5Blicense%5D=GPLv3%2B&modules%5Bdashboard%5D%5Bversion%5D=12.0.32&modules%5Bdashboard%5D%5Bstatus%5D=2&modules%5Bdashboard%5D%5Brawname%5D=dashboard&modules%5Bdashboard%5D%5Blicense%5D=AGPLv3%2B&modules%5Bfeaturecodeadmin%5D%5Bversion%5D=12.0.2&modules%5Bfeaturecodeadmin%5D%5Bstatus%5D=2&modules%5Bfeaturecodeadmin%5D%5Brawname%5D=featurecodeadmin&modules%5Bfeaturecodeadmin%5D%5Blicense%5D=GPLv3%2B&modules%5Bframework%5D%5Bversion%5D=12.0.76.2&modules%5Bframework%5D%5Bstatus%5D=2&modules%5Bframework%5D%5Brawname%5D=framework&modules%5Bframework%5D%5Blicense%5D=GPLv2%2B&modules%5Binfoservices%5D%5Bversion%5D=12.0.3.2&modules%5Binfoservices%5D%5Bstatus%5D=2&modules%5Binfoservices%5D%5Brawname%5D=infoservices&modules%5Binfoservices%5D%5Blicense%5D=GPLv2%2B&modules%5Blogfiles%5D%5Bversion%5D=12.0.6&modules%5Blogfiles%5D%5Bstatus%5D=2&modules%5Blogfiles%5D%5Brawname%5D=logfiles&modules%5Blogfiles%5D%5Blicense%5D=GPLv3%2B&modules%5Bmusic%5D%5Bversion%5D=12.0.1&modules%5Bmusic%5D%5Bstatus%5D=2&modules%5Bmusic%5D%5Brawname%5D=music&modules%5Bmusic%5D%5Blicense%5D=GPLv3%2B&modules%5Bsipsettings%5D%5Bversion%5D=12.0.16&modules%5Bsipsettings%5D%5Bstatus%5D=2&modules%5Bsipsettings%5D%5Brawname%5D=sipsettings&modules%5Bsipsettings%5D%5Blicense%5D=AGPLv3%2B&modules%5Bucp%5D%5Bversion%5D=12.0.24&modules%5Bucp%5D%5Bstatus%5D=2&modules%5Bucp%5D%5Brawname%5D=ucp&modules%5Bucp%5D%5Blicense%5D=AGPLv3%2B&modules%5Buserman%5D%5Bversion%5D=12.0.27&modules%5Buserman%5D%5Bstatus%5D=2&modules%5Buserman%5D%5Brawname%5D=userman&modules%5Buserman%5D%5Blicense%5D=AGPLv3%2B&modules%5Bvoicemail%5D%5Bversion%5D=12.0.40&modules%5Bvoicemail%5D%5Bstatus%5D=2&modules%5Bvoicemail%5D%5Brawname%5D=voicemail&modules%5Bvoicemail%5D%5Blicense%5D=GPLv3%2B&astver=13.6.0&phpver=5.4.16&distro=unknown-Linux&distrover=3.10.0-229.20.1.el7.x86_64&pbxver=12.0.76.2&ucount=0&core_udmode=extensions