Error accessing an SQLite db from a different location using PHP -
i'm stuck problem. i'm trying access sqlite database different location. far have tried using pdo access such file. i've tried using pdo since read here on easier. want select queries on database.
try{ $dbh = new pdo("sqlite:192.168.48.52/data/log/localdb.db"); echo "connected"; } catch(pdoexception $e) { echo $e->getmessage(); } it outputs error message saying 'sqlstate[hy000] [14] unable open database file'. access location via ssh/putty or manually input directory through web browser. not through php coded location. file resides in gsm gateway interface has -rw-r--r-- permission.
if download file , put in htdocs folder open file , echos 'connected'
$dbh = new pdo("sqlite:localdb.db"); <--- **like this** i tried doing since requires authentication access directory.
$dbh = new pdo("sqlite:admin:admin@192.168.48.52/data/log/localdb.db"); to no avail. in advance.
i think miss 1 colon after ip :
$dbh = new pdo("sqlite:admin:admin@192.168.48.52:/data/log/localdb.db");
Comments
Post a Comment