Re: [PHP] Remote MySQL connection via PHP file

2006-12-01 Thread cajbecu
i suggest you: database.conf (the file on another server) host=localhost user=test pass=test anothervar=anothervalue on your script: $temp = file(http://../database.conf); foreach($temp as $val) { $temp2 = explode(=,$val); $$temp2[0] = $temp[1]; } after that, you`ll have: $host =

RE: [PHP] Remote MySQL connection via PHP file

2006-12-01 Thread Ray Hauge
That seems like it wouldn't be very secure at all. Maybe it's just because I don't understand the reason for *having* to do it that way. My first suggestion would be to see if there's any way you don't have to do that. If you have to do it, I would suggest maybe having it on an NFS share, or

Re: [PHP] Remote MySQL connection via PHP file

2006-12-01 Thread Paul Novitski
At 12/1/2006 10:17 AM, Scott wrote: For a project of mine, I need to keep the connection information to a MySQL server database on another server. I'm sure there are more efficient ways to do this, but here's a fall-back: Write a PHP program (web service) to run on the server where the

Re: [PHP] Remote MySQL connection via PHP file

2006-12-01 Thread clive
cajbecu wrote: i suggest you: database.conf (the file on another server) host=localhost user=test pass=test anothervar=anothervalue have you thought of the security implications of this, a text file with user names/passwords, thats rather insecure I would say, on your script: $temp =

Re: [PHP] Remote MySQL connection via PHP file

2006-12-01 Thread clive
Scott wrote: Hi all, I've been searching around for a while, but cannot find a solution. For a project of mine, I need to keep the connection information to a MySQL server database on another server. ?php include http://www.remoteserver.com/remote_file.php;; // Use variables $user and $pass

Re: [PHP] Remote MySQL connection via PHP file

2006-12-01 Thread Richard Lynch
On Fri, December 1, 2006 12:17 pm, Scott wrote: I've been searching around for a while, but cannot find a solution. For a project of mine, I need to keep the connection information to a MySQL server database on another server. Example remote file: ?php $user = joe; $pass = 1234; ?