RE: [PHP] security include from remote server
- From: bfuller@xxxxxxxxxxxxxxxx ("Brad Fuller")
- Date: Thu, 14 Sep 2006 10:07:50 -0400
Miguel -
If my solution is not viable, is there any other way of hosting my
files someplace else, but still access the local database?
Yes. Your remotely hosted code would call the database on your local
server. Something like:
<? $link = mysql_connect("foo.com", "bar", "PASSWORD"); ?>
You would also need to allow the connection from the remote host in mysql.
mysql> GRANT ALL ON foo.* TO bar@'202.54.10.20' IDENTIFIED BY 'PASSWORD';
Then you need to open the mysql port on your router to point to your
database server. I believe the default port is 3306.
Hope that helps.
Brad
-----Original Message-----
From: Miguel Vaz [mailto:dante@xxxxxxxxxxxxxxx]
Sent: Wednesday, September 13, 2006 7:48 PM
To: php-general@xxxxxxxxxxxxx
Subject: [PHP] security include from remote server
Hi,
Heres a simple problem:
I am doing a php+mysql website at my office, hosted locally but open
to the web, but i wouldnt like to host my files on our office server.
I could host them somewhere else but our mysql database cant be
accessed from the outside, only from our server.
I thought about having a simple php local file that would include my
files that are hosted someplace else, and therefor be able to access
my local database, would that be possible? My first thought would
probably be no, but i cant really do any tests right now, thats why i
am asking you guys.
If my solution is not viable, is there any other way of hosting my
files someplace else, but still access the local database?
(also thought of using zend guard to protect my code, but that would
imply an install on our office server, which is out of the question)
Thanks.
Pag
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.
- Follow-Ups:
- Re: [PHP] security include from remote server
- From: Jon Anderson
- Re: [PHP] security include from remote server
- References:
- security include from remote server
- From: Miguel Vaz
- security include from remote server
- Prev by Date: Re: [PHP] Pre-printed forms
- Next by Date: Re: [PHP] DOM Question. No pun intended.
- Previous by thread: security include from remote server
- Next by thread: Re: [PHP] security include from remote server
- Index(es):
Relevant Pages
|
|