K
K
Kirill Gorlov2015-06-03 09:47:53
PHP
Kirill Gorlov, 2015-06-03 09:47:53

How to connect to 1C file database from PHP?

I'm trying to connect to the 1Cv8.2 configuration of the Tavern Fron Office 3 version via PHP using the COM interface.
The PHP extension libraries are on the Apache server. Everything is in the configs. COM itself is being initialized.
I connect like this

$app = new COM("V82.COMConnector") or die("Невозможно создать COM соединение");  

        $path = "G:/SoftBalance/TraktirFOv3_Premium";  
        $user = "user"; 
        $password = "password"; 

        //Подсоединяемся к нужной базе  
        $con = $app->Connect("File=\"$path\";Usr =\"$user\";Pwd= \"$password\"");

Gives the following:
object variant(0) {
}

If I change the version of the connector to 83 or 81 it gives the following results
com_exception [ -2147352567 ]: <b>Source:</b> V83.COMConnector.1<br/><b>Description:</b> , , . .

According to the 1C documentation, this method should work. But in practice nothing happens
Who knows how to do it? tell

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Kostin, 2015-06-03
@Chetson

Does the launch of the configuration through the platform 1s 8.2 pass? Connector 8.3 registered? Judging by the description, it should be 8.2 "... Traktir: Front-Office v.3 works on any component of the 1C: Enterprise 8.2 software system..."
Error "-2147352567" indicates that the class is not registered.
Register connector (8.3):
regsvr32 "C:\Program Files\1cv8\8.3.5.***\bin\comcntr.dll"
Or better reinstall connector or platform.

R
Roman Webs, 2015-06-03
@roman_vebs

I could be wrong, but before there was support for SOAP, I did this:
1. Implemented a web service on 1C SOAP with authorization and all the functionality that is needed.
2. From PHP just connected and received data.
The whole hemorrhage was only in authorization, but in principle, with the help of 1C blogs, it was solved, and everything else was not difficult.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question