K
K
kmm design2014-03-14 12:02:23
PHP
kmm design, 2014-03-14 12:02:23

How to solve problems with sending an .xml file from 1C v7.7 to a web server (PHP 5.3)?

There is a server with 1C v7.7, once every two weeks it must generate .xml and send it to the website to update the information.
The 1C developer wrote the code for generating and sending the file to the web server from the 1C side, here is the code:

Процедура Отправить(ИмяФайлаОбмена)
Сервер = "http://my.domen.com/xml.php";
пОбъект=СоздатьОбъект("MSXML2.xmlHttp.4.0");	
пОбъект.Open("POST",Сервер,0);
пОбъект.setRequestHeader("Content-Type","text/xml; charset=Windows-1251");
пОбъект.send(ИмяФайлаОбмена);
Сообщить(пОбъект.ResponseText());
КонецПроцедуры

On the web server side, I wrote the code for checking a successful 1C connection with the web server, here is the code:
$db->insert("INSERT INTO cache (name,text) VALUE ('1c POST',?)",serialize($_POST));
$db->insert("INSERT INTO cache (name,text) VALUE ('1c GET',?)",serialize($_GET));
$db->insert("INSERT INTO cache (name,text) VALUE ('1c SERVER',?)",serialize($_SERVER));
$db->insert("INSERT INTO cache (name,text) VALUE ('1c FILES',?)",serialize($_FILES));

1C successfully connects to the web server, but there is nothing in any of the arrays ($_POST, $_GET, $_FILES). I did not notice anything interesting in the $_SERVER array.
Previously, the webserver was written in Python, and everything worked. When the PHP site was updated, I expected to see the submitted file in the $_FILES array.
When I asked the developer how and what 1C sends, he replied:
1C - does not work with requests. All work goes through
external programs like V7PLUS.dll.
It is impossible to intercept the execution of a component command using 1C tools
, I cannot see what
is being transmitted and how.
In 1C 7.7, it is impossible to form an array of files for transfer,
this is implemented in 1C 8.

Please help me solve this problem, I've been looking for an answer for a week now and I can't find it. Tell me where the problem is - on the side of 1C or the web server?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
z010107, 2014-03-14
@kmm design

Try reading through php://input
Documentation - php.net/manual/en/wrappers.php.php

V
Vladimir Shishmintsev, 2014-03-14
@Pingvi

Well, look at the logs on the web server to see if this request comes at all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question