Answer the question
In order to leave comments, you need to log in
After ftp_get db_query doesn't work, why?
$conn = ftp_connect($this->ftp);
if (ftp_login($conn, $this->login, $this->password)) {
ftp_chdir($conn, $this->folder);
// скачивается XML файл весом в 250mb
//ftp_get($conn, 'temp/' . $server_file, $server_file, FTP_BINARY)
}
ftp_close($conn);
...
// если раскомментировать ftp_get то db_query не добавляет запись
// и даже в sql лог не пишется ничего и db_insert_id = 0
db_query("insert into options (name, sort_order) values('data', '0')");
$optionID = db_insert_id();
Answer the question
In order to leave comments, you need to log in
Or in PHP file try
Either increase the mysql.connect_timeout option in php.ini, by default 60.
Or do a reconnect in the database query function, using, for example, this . At the same time, if ping did not help reconnect, then do a reconnect.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question