php - Connect to a SQLite database outside /var/www -


current code:

$dir = 'sqlite:/usr/local/teamspeak3/ts3server.sqlitedb'; $dbh  = new pdo($dir) or die("cannot open database"); $query =  "select * clients"; foreach ($dbh->query($query) $row) {     echo $row[0]; } 

i trying open database , echo out information. problem website located @ /var/www , won't let me access folder above that. can't access folders /usr or /var/backups.

does know how can access file anyway? can't move file because gets updated teamspeak.

is php preventing access outside sandboxed environment?

ask administrator place symlink actual database folder can access work around security restriction.

this in place prevent compromised (or plain buggy) page providing access client databases should not able see.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -