Answer the question
In order to leave comments, you need to log in
Why 500 error?
Guys, I'm not very good at administration, there is such a problem: the site gives a 500 error, I looked at the logs there is spamming this error:
ri Apr 22 04:07:31.657989 2016] [:error] [pid 16512] [client 85.14.245.175:48527 ] PHP Fatal error: Namespace declaration statement has to be the very first statement in the script in /var/www/maxkondaurov/data/www/maxkondaurov.ru/bitrix/modules/main/lib/db/mysqlcommonconnection.php on line 2
[Fri Apr 22 04:07:33.244247 2016] [:error] [pid 16513] [client 85.14.244.114:48794] PHP Fatal error: Namespace declaration statement has to be the very first statement in the script in /var/www/ maxkondaurov/data/www/maxkondaurov.ru/bitrix/modules/main/lib/db/mysqlcommonconnection.php on line 2
I entered this file on the second line there
namespace Bitrix\Main\DB;
Answer the question
In order to leave comments, you need to log in
Hmm, it seems that the encoding is changing here /bitrix/php_interface/dbconn.php , in general, there is such a code
<?
define("DBPersistent", false);
define("BX_UTF", true);
$DBType = "mysql";
$DBHost = "localhost";
$DBLogin = "***";
$DBPassword = "***";
$DBName = "mkpr";
$DBDebug = false;
$DBDebugToFile = false;
define("DELAY_DB_CONNECT", true);
define("CACHED_b_file", 3600);
define("CACHED_b_file_bucket_size", 10);
define("CACHED_b_lang", 3600);
define("CACHED_b_option", 3600);
define("CACHED_b_lang_domain", 3600);
define("
define("CACHED_b_agent", 3660);
define("CACHED_menu", 3600);
define("BX_UTF", true);
define("BX_FILE_PERMISSIONS", 0644);
define("BX_DIR_PERMISSIONS", 0755);
@umask(~BX_DIR_PERMISSIONS);
@ini_set("memory_limit", "512M");
define("BX_DISABLE_INDEX_PAGE", true);
?>
define("BX_UTF", true); - I added this line, but the site also gives an error 500, are the other parameters normal?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question