M
M
multifinger2012-05-21 14:57:22
PHP
multifinger, 2012-05-21 14:57:22

How to make a connection to the 1C database from PHP?

I'm exploring the possibility of linking a 1C application (through which records of goods, suppliers, sales, shipments, invoice generation, etc.) is kept with a website.
So that the customer can generate an invoice for payment through the website, find out the availability of goods, etc.

Has anyone faced similar kind of problems? Is it possible to connect to the 1C database directly from php? (I have no idea how 1C works and what databases are used there)

Two programmers with whom I consulted said that it seems like there is a possibility of integration, but no one answered exactly how to do this. Is it possible to make sure that 1C responds to the necessary requests via some interface, for example, gives a list of customers or a list of available products? Or can you only export to a file, which can then be read?

UPD: Thank you all for your help! The question is closed. We will try to connect directly and knock out information about the internal structure of the database from 1C developers

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Mikhail Rozhkov, 2012-05-21
@multifinger

Firstly, it would be nice to voice version 1C. If it is 8, then I recommend digging in the direction of Web services : v8.1c.ru/overview/Term_000000273.htm
as many as 5 different ones:
- MS SQL
- PostgreSQL
- IBM DB2
- Oracle
- File version (own format)
It is almost impossible to work with the latter directly, with the rest - in principle, direct work is possible, but you will have to smoke a lot - there is no official documentation on the structure of tables. Although there is an internal GetDBStorageStructureInfo() method that will help clarify the picture a bit.
In the case of 7.7, everything is more complicated on the one hand, and easier on the other. It’s more difficult because there are no modern integration tools, it’s easier because the table structure has long been opened up and the documentation is quite detailed: www.script-coding.com/v77tables.html
Well, there are fewer DBMS options - DBF and MSSQL, there are no other options.

C
cat_crash, 2012-05-21
@cat_crash

1C can work on several database "engines":
- Postgres (not natively but through crutches)
- MS SQL
- DBase (dbf)
All of the above connection methods are supported in PHP.
Answering the question - yes, you can connect to the database.
1s version 8 already has the concept of web services and you can communicate with 1s through the SOAP interface.
You can export to any text format or through a COM object to any other

I
Ilya Plotnikov, 2012-05-21
@ilyaplot

php.net/manual/en/ref.dbase.php

M
mix2000, 2012-05-22
@mix2000

“We will try to connect directly and knock out information about the internal structure of the database from 1C developers. “
In general, a crazy idea.
If version 8.1 and above, then it makes sense to try web services.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question