Why get a 500 error?

<?php

$add = $_POST['id'];
CModule::IncludeModule("iblock");

$rs = CIBlockSection::GetList(Array("NAME"=-->"ASC"), Array("IBLOCK_ID"=>17, "ACTIVE"=>"Y", "SECTION_ID"=>619));
if($rs->SelectedRowsCount()>0)
{
 echo '<select class="cartridge-series1" id="prodid619" style="border: #d2d2d2 2px solid; margin: 0px 0px 10px; padding: 5px; width: 200px;display:none"><option value>Type</option>';
 while($ar = $rs->GetNext()) { $ID2[] = $ar["ID"]; echo '<option value="'.$ar[" id"].'">'.$ar["NAME"].'</option>'; }
 echo '</select>';
}

There is code in the file, there comes the variable and the result is a 500 error
August 19th 19 at 23:32
1 answer
August 19th 19 at 23:34
I understand what You are doing ajax request to this file and pass the POST ID in a variable ? If this is all the contents of the file, then You forgot at the beginning of the file add:

<?php require($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php');</code-->
Added the following error

Strict Standards: Non-static method CAllIBlockSection::GetFilter() should not be called statically in /home/v/vito1981/public_html/bitrix/modules/iblock/classes/mysql/iblocksection.php on line 38

Strict Standards: Non-static method CIBlock::_Upper() should not be called statically in /home/v/vito1981/public_html/bitrix/modules/iblock/classes/general/iblock.php on line 2348

Strict Standards: Non-static method CIBlock::_Upper() should not be called statically in /home/v/vito1981/public_html/bitrix/modules/iblock/classes/general/iblock.php on line 2348 - Darren_Buckrid commented on August 19th 19 at 23:37
Errors go to the core of Bitrix. There they have trouble using non static methods as static. Just disable in setting up the hosting (server) to show all warnings (E_ALL) and post the output only errors (E_ERROR). - micah.Johnsto commented on August 19th 19 at 23:40

Find more questions by tags 1C-Bitrix