Re: Executing PHP files on remote web server
- From: The Natural Philosopher <tnp@xxxxxxxxxxxxxxx>
- Date: Sun, 31 May 2009 13:53:31 +0100
rdyornot wrote:
I'm new at this so go easy!I havent totally followed this, but it seems to me that you should use php on the client facing site accessing the mysql server..in house.
We have a web app which uses PHP and MySQL on our in-house Apache web server. It was built by programmers no longer with us. Works great for our in-house users. Now the boss wants to let clients see some of the data in summarized reports that get updated about every 15 minutes during working hours. For security reasons we don't want the external clients remotely accessing our network for these reports. We have a commercial web host servicing our external clients, but we don't want to move the entire app and database to the web host because a lot of the data is sensitive.
By loading the non-sensitive data into the web host's MySQL tables, our external clients can see their reports on the web (once I build web pages for that). Trouble is, our web host put a firewall on the MySQL database so we can't insert data into the remote tables directly from the PHP pages running on our own web server. The web host has it set up so we can only upload data dumps to our web database manually through a web browser after logging into our account. Although it's not much data to upload each time, doing this manually to update the web database tables every 15 minutes is a show-stopper.
The good news is we can access the web MySQL database directly from our domain's web space. Is it possible to move a few of the PHP pages -- the ones needed to do the inserts into the MySQL database -- to the web host and point to those remote files in the PHP pages that remain on our own web server? (From what I can see this needs to include a global variables file besides the SQL insert scripts. The global variables include SSI file paths, db name, user name, etc. that don't match on the two web servers.) The result would be the PHP pages on the web host's server executing the data insert statements into the web database. I think I need to pass session variable values to the web host's server from the session variables on our web server, but I'm a C and Java programmer from way back, not a PHP programmer (until now!) and I don't know if these remote operations can be done.
Is this possible or am I just a wishful thinker? If it's possible, how can I do it?
TIA.
That means punching a hole ion your corprate firewall so that the mysqld process is accessible from the external host (only!), and probably setting up a special mysql user that only has read privileges on the data it needs to see. And making that user the only one that can access the mysqld over the network.
If the php code you want is working in house, all you need to do to make it work on the host is to change the database open calls to open the inhouse database remotely, using the restricted client name and password.
Changes to msyql are
create external user and give read only access to required tables, but allow remote IP access.
configure mysqld to listen on the right IP port.
And change the firewall to let that port be accessible from the hosting centre host.
.
- Follow-Ups:
- Re: Executing PHP files on remote web server
- From: rdyornot
- Re: Executing PHP files on remote web server
- References:
- Executing PHP files on remote web server
- From: rdyornot
- Executing PHP files on remote web server
- Prev by Date: Re: Executing PHP files on remote web server
- Next by Date: Re: Executing PHP files on remote web server
- Previous by thread: Re: Executing PHP files on remote web server
- Next by thread: Re: Executing PHP files on remote web server
- Index(es):
Relevant Pages
|
Loading