a-schild / inno-thinyldap

A very thiny LDAP service for Innovaphone PBX
GNU General Public License v3.0
6 stars 0 forks source link

Feature Request #19

Open theoneandonly-vector opened 6 years ago

theoneandonly-vector commented 6 years ago

Add Support for importing additional contacts instead of overwriting everything in web-GUI.

a-schild commented 6 years ago

What is the usecase to import additional contacts? When you have to modify single contacts you can do it via the web ui. When you wish to massimport, then you can upload a complete excel file including all rows

When importing deltas, then you would have to make sure to not import duplicates. Duplicate detection is almost impossible

theoneandonly-vector commented 6 years ago

I can only display the contacts, editing isn't possible through the web ui, it's also not needed.

What I want is add a few contacts which aren't there yet.. not "dublicate detection" but only import the new ones though excel import. instead of overwriting the old ones.

bobobo-git commented 5 years ago

contacts can be added if line 125 (truncate ) is commented

i stumbled upon a memory error when importing more than 350 contacts on a LAP on IP411

i have imported it without truncation of the address-table in some chunks. i'm happy now.

bobobo-git commented 5 years ago

another way to inport an xlsx-file much faster

add behind the lines // Leeren der Tabelle Addresse $conn->query("TRUNCATE address");

$conn->query("Begin Transaction");

and add before the line '// Laden der Worksheets' $conn->query("Commmit Transaction");

bobobo-git commented 5 years ago

sorry, doesn't help. i get 476 datasets before an memory error occurs.

a-schild commented 5 years ago

Can you change this value in the file /etc/php5/cgi/php.ini

; Maximum amount of memory a script may consume (128MB) ; http://php.net/memory-limit memory_limit = 256M

Double it to 512M and then reboot the IP411 and test if it works better

bobobo-git commented 5 years ago

hmm

woudn't it be smart to set this at runtime?

<?php ini_set("memory_limit",-1); ?> sets the memory_limit to unlimited at runtime

bobobo-git commented 5 years ago

oops.

in php `

` <php?

ini_set("memory_limit",-1);

?> ` will set memory_limit to unlimited at runtime

bobobo-git commented 5 years ago

-1 is not a good advice. got a 500 - Internal Server Error when touching the limits

i guess a limit at 512M won't help either

bobobo-git commented 5 years ago

i got another possibility to change add delete export import to mysqltables not excel i fear, but much faster. i took this editor from adminer (https://www.adminer.org/de/editor/) and tuned it a little bit to my purpose.

this enhancement is for using an app that is called by mypbx (callnumbers that don't have a name) that i can't publish (checking the legal-stuff), but the editorpart is handy for everyone using the inno-thinyldap i guess greetz https://github.com/bobobo-git/inno-thinyldap-phonebook-enhancement