Visualizzazione dei risultati da 1 a 8 su 8
  1. #1

    criptare un database SQLITE con PHP

    Ciao a tutti.

    chiedo un vostro parere...

    Sto scrivendo dei semplici gestionali con interfaccia PHP e archivi su SQLITE
    volevo sapere se qualcuno ha esperienza e come si puo' rispolvere il problema della sicurezza crittografica dei dati....

    io risolverei con uin encfs al boot del pc/server
    ma mi pare un pochino complicato.. e soparatutto non risponde completamente all'esigenza di sicurezza.....

    qualcuno di voi conosce/ha usato/usa un qualche modulo PHP per criptare i dati e/o i database sqlite ??

    grazie
    Flavio

  2. #2
    IP-PBX management: http://www.easypbx.it

    Old account: 2126 messages
    Oldest account: 3559 messages

  3. #3
    grazie.

    ho trovato la classe
    securesqlite.class.php che semra di facile implementazione (nel mio progetto!!)


    vorrei sapere (ma forse dovrei aprire un treed nel ramo Database) se qualcuno ha già implementato questa funzione anche nel fronttend phplideadmin


    la domanda semmmmbra crogna.. ma in realtà siccome il progetto è in divenire io spesso lavoro con bluefish, e 2 browser puntati uno al sito "amministrativo" ed uno al phplideadmin.php per controllare sia i risultati delle query sia per variare manualmente le tabelle al volo...


    Grassie
    Flavio

  4. #4
    macchè..
    anche la classe securesqlite.class.php
    non mi riesce ne ad installarla ne ad usarla....

    ho provato a sostituire tutti i

    $db = new Database($databases[$_SESSION[COOKIENAME.'currentDB']]);

    con

    $db = new secureSQLite($databases[$_SESSION[COOKIENAME.'currentDB']],'mypassword);

    ma il phpliteadmin.php non da segni ne di vita ne di speranza....

    questi gli E/orrori
    2013-04-22 21:28:57: (mod_fastcgi.c.2676) FastCGI-stderr: PHP Warning: strrpos() expects parameter 1 to be string, array given in /home/www/pr_asso/sqlite_cifer/securesqlite.class.php on line 99
    PHP Warning: substr() expects parameter 1 to be string, array given in /home/www/pr_asso/sqlite_cifer/securesqlite.class.php on line 99
    PHP Warning: strrpos() expects parameter 1 to be string, array given in /home/www/pr_asso/sqlite_cifer/securesqlite.class.php on line 100
    PHP Warning: substr() expects parameter 1 to be string, array given in /home/www/pr_asso/sqlite_cifer/securesqlite.class.php on line 100
    PHP Fatal error: Uncaught exception 'Exception' with message 'Unable to expand filepath' in /home/www/pr_asso/sqlite_cifer/securesqlite.class.php:109
    Stack trace:
    #0 /home/www/pr_asso/sqlite_cifer/securesqlite.class.php(109): SQLite3->open('')
    #1 /home/www/pr_asso/phplite.php(1900): secureSQLite->__construct(Array, 'a1g2n3o4l5e6t7t...')
    #2 {main}
    thrown in /home/www/pr_asso/sqlite_cifer/securesqlite.class.php on line 109


    depressione
    FLavio

  5. #5
    qui dice che gli hai passato un array secureSQLite->__construct(Array, 'a1g2n3o4l5e6t7t...') come primo parametro, probabilmente si aspettava altro?
    IP-PBX management: http://www.easypbx.it

    Old account: 2126 messages
    Oldest account: 3559 messages

  6. #6
    il file completo, che viene dato con la libreria dice cosi
    Codice PHP:
    include('securesqlite.class.php');

    /**
     * connect to encrypted SQLite db
     */
    try {
        
    // if there is no database with this name it will be created
        // it will create a database like yourDatabase.encrypted.db
        // and it will use a decrypted database like yourDatabase.db
        
    $db = new secureSQLite('yourDatabase.db','YourKeyForEn-AndDecryption');
    } catch(
    Exception $e) {
        die(
    dPrint($e->getMessage()));
    }

    // create a table
    $db->query("CREATE TABLE IF NOT EXISTS `test_table` (`name` VARCHAR( 20 ) NOT NULL)");    
                    
    // close and save encrypted db
    // if you close db without parameter "true" it won't save changes
    // YOU SHOULD ALWAYS CLOSE THE CONNECTION TO REMOVE THE DECRYPTED DATABASE
    $db->close(true); 

  7. #7
    nada ? hai provato a metterci la path completa del db che vuoi creare? possibilmente che sia in una cartella con i permessi di scrittura da parte di apache?
    IP-PBX management: http://www.easypbx.it

    Old account: 2126 messages
    Oldest account: 3559 messages

  8. #8
    Yesssss
    io uso Lighttpd non apache
    la cartella è corretamente settata


    quegli errori sono generati costituendo i vari "open"

    $db = new Database($databases[$_SESSION[COOKIENAME.'currentDB']]);

    con

    $db = new secureSQLite($databases[$_SESSION[COOKIENAME.'currentDB']],'mypassword);

    all'interno del file phpliteadmin.php (l'interfaccia simil-phpmysqladmin) per l'amministrazione dei database sqlite....



    Flavio

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.