Q
Q
qpre2018-03-15 20:42:40
PHP
qpre, 2018-03-15 20:42:40

Uploading 2gis data. How to run a script on Open Server?

Greetings, a topic-manual was published on one of the forums, later deleted.
The bottom line was this: a php script that ran on Open Server and uploaded data from the downloaded 2gis shell (.dgdat to .xlsx converter)
Now there was a need to upload the data, the script remained, but I can’t remember how to run it. Share.
5aaab00576887632385788.png5aaab00f2d952064993435.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
maddog670, 2018-03-15
@qpre

This is a console run.
php convert.php

P
PTZ-M, 2022-04-15
@PTZ-M

No way. In this parser of local databases from 2GIS, collegial mind revealed at least 3 jambs:
1. syntax - there are stupidly no <?php .... ?> tags in php 5 files;
2. there are no files from Composer, fortunately, you can still throw composer.phar into the root of the project and run php D:\LocalStorage\www\composer.phar installit in the north console, it will install the old Excel package;
3. Write convert.php in the header

set_time_limit(0);
ini_set('max_execution_time', 0);
ignore_user_abort(true);
ini_set('memory_limit', '3072M');
(although I saw how he ate 4.6 GB - he didn’t choke), increase the OS swap file, use the 64-bit version of the software, disable the antivirus and everything third-party. When you get "Out of memory" in the browser - look at the load in the "Task Manager" on Apache, until it drops to ~ 500MB and / or 1% of the processor, then it still parses and will create files with numbering (I have Msk for 13 files 50k lines each).
PS files for parsing are better to be renamed in the style of the test file, then it does not clean up the pace after itself, but at least the cache does not clog and does not die.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question