Re: Executing PHP files on remote web server



rdyornot wrote:
I'm new at this so go easy!

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.


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.

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.



.



Relevant Pages

  • Re: Executing PHP files on remote web server
    ... 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? ...
    (comp.lang.php)
  • Database Comparison?
    ... after using it that php is built more than anything to easily sit on ... talking to a mysql database and spitting out html to ... use these things better I've made a rudimentary gui designer and some ...
    (comp.lang.php)
  • Re: How to use SQL "LIMIT" keyword against an MDB file
    ... that it will work with an MSAccess MDB file. ... PHP Programmer Guy. ... Except you've just "solved" his issue with a database redesign. ... from MySQL to Access in the first place. ...
    (comp.lang.php)
  • Re: Executing PHP files on remote web server
    ... 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. ... 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. ...
    (comp.lang.php)
  • Re: help me
    ... field automatically assign its self a value of the next auto inc number ... I have a mysql database and i have it displaying whats currently there ... using php, the problem is that I cannot insert into the database ...
    (comp.lang.php)

Loading