Delaran Posted June 4, 2007 Share Posted June 4, 2007 Hey guys, It's been a while since I've posted here but I've got a question that I hope someone can help me with. I'm very close to figuring out the syntax for this command, but can't seem to get it to work. My problem is, my company has moved our admin page to an internal server so no one can tamper with it externally. However, our database is still running externally on another server. By figuring out this "login" or "connection" issue I'm having here, than we could even move the database to an internal site. This is what I am using to open my db: // set path of database file $db = $_SERVER['SERVER_ADDR']."68.178.4.77/../wantdb.sdb"; $handle = sqlite_open($db) or die("Could not open database"); It returns result: Could not open database So I feel as if I am getting closer, maybe it has something to do with a username/password used to log in to the remote server? Anyone have a suggestion as to how or what $_SERVER command I should use? I get the feeling it is not SERVER_ADDR I should be using but I'm not sure. ~del Quote Link to comment https://forums.phpfreaks.com/topic/54141-solved-remote-sql-server/ Share on other sites More sharing options...
trq Posted June 4, 2007 Share Posted June 4, 2007 Sqlite is not a database server. As fare as I know, you couldn't connect to it remotely unless you NFS mount the partition it is on to a local directory. Quote Link to comment https://forums.phpfreaks.com/topic/54141-solved-remote-sql-server/#findComment-267688 Share on other sites More sharing options...
trq Posted June 4, 2007 Share Posted June 4, 2007 PS: To top that off. The manual does NOT recommend using sqlite databases mounted via NFS. Why not just copy the database over locally? Quote Link to comment https://forums.phpfreaks.com/topic/54141-solved-remote-sql-server/#findComment-267692 Share on other sites More sharing options...
Delaran Posted June 4, 2007 Author Share Posted June 4, 2007 Well, I had thought about doing that, but the problem is that the server it is currently on is available for the public to access. We have a php page that I've created that pushes POST data to the next page "action.php", which inserts the data into the database on the external server (public server). One of my co-workers suggested putting the admin page I've created on an internal server that the public cannot access to prevent them from tampering with the database. So, if I was to move the database from the external (public) to the internal (private), than "action.php" would not insert data correctly because the database has been moved to another server, right? I tried using some of the $_SERVER functions to the action page so that it would insert the data to the remote internal server and have gotten nothing so far. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/54141-solved-remote-sql-server/#findComment-267867 Share on other sites More sharing options...
trq Posted June 4, 2007 Share Posted June 4, 2007 Only the one Ive already suggested. Quote Link to comment https://forums.phpfreaks.com/topic/54141-solved-remote-sql-server/#findComment-267903 Share on other sites More sharing options...
Delaran Posted June 4, 2007 Author Share Posted June 4, 2007 well, I suppose we may as well close this topic and say it is solved since the resolution is that I can't. Quote Link to comment https://forums.phpfreaks.com/topic/54141-solved-remote-sql-server/#findComment-267904 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.