gple Posted January 14, 2012 Share Posted January 14, 2012 I am running php on one computer at work and want other users on other computers to access the index page by sharing it.after mapping the page, I see no data on the other machine. Does php, as pache need to beer installed on other computers footer it too work properly Quote Link to comment https://forums.phpfreaks.com/topic/255018-loading-php-file-on-another-computer/ Share on other sites More sharing options...
Pikachu2000 Posted January 14, 2012 Share Posted January 14, 2012 You'd access it like any other website, with http://(ip address of server). Quote Link to comment https://forums.phpfreaks.com/topic/255018-loading-php-file-on-another-computer/#findComment-1307668 Share on other sites More sharing options...
SergeiSS Posted January 15, 2012 Share Posted January 15, 2012 Let me add something. I am running php on one computer at work and want other users on other computers to access the index page by sharing it.after mapping the page, I see no data on the other machine. It's correct behavior because of security reason. You may have some secret information inside you PHP page, for example login-password for access to DB. It's not a good idea to send it to another server. Let me assume that you use Apache as web-server. You may say Apache to don't process PHP file but send them like a text. In such a case you may use your scripts at another servers. But you'll have a very big hole in your site's security. Also you are not able to use (process) script at a "root" server 'on one computer at work'. Do you still like to let other servers to use you PHP files in the same way like your server do? Quote Link to comment https://forums.phpfreaks.com/topic/255018-loading-php-file-on-another-computer/#findComment-1307805 Share on other sites More sharing options...
gple Posted January 16, 2012 Author Share Posted January 16, 2012 ok, if its correct behavior, how do i get around this. We have purposely created an internal mysql database and have built a website for security purposes. We want to share the index page to a couple of other users within the small business. Again, one computer has php, apache and mysql installed. the entire website was created on a local machine and is functioning properly. When I map to that folder from another machine and try to load the page, then I get zero data. I was thinking that I may have needed either apache or php installed on that second computer but I didnt see the code display on the webpage. Quote Link to comment https://forums.phpfreaks.com/topic/255018-loading-php-file-on-another-computer/#findComment-1308195 Share on other sites More sharing options...
scootstah Posted January 16, 2012 Share Posted January 16, 2012 I'm a little unsure what you mean by "share" and "map" it. Are you trying to directly access the PHP file in a network folder? You need to browse to the file in a web browser, with the server's IP or domain. Like http://1.2.3.4/script.php If you only want to allow certain people from viewing it you could use Apache's mod_access for that. To do that you need to create an .htaccess file in the docroot of your server with this code: Order Deny,Allow Deny from all Allow from 1.1.1.1 2.2.2.2 3.3.3.3 Change the IP's to the ones you want to view the website, separated by spaces. Quote Link to comment https://forums.phpfreaks.com/topic/255018-loading-php-file-on-another-computer/#findComment-1308202 Share on other sites More sharing options...
gple Posted January 16, 2012 Author Share Posted January 16, 2012 what I mean by share and map it: i have map a network drive to the folder and then I created a shortcut to the desktop of the index page Quote Link to comment https://forums.phpfreaks.com/topic/255018-loading-php-file-on-another-computer/#findComment-1308230 Share on other sites More sharing options...
scootstah Posted January 16, 2012 Share Posted January 16, 2012 That's what I figured. That's not how it works. You need to load the page through the Apache server by accessing the server through a web browser. Quote Link to comment https://forums.phpfreaks.com/topic/255018-loading-php-file-on-another-computer/#findComment-1308232 Share on other sites More sharing options...
gple Posted January 16, 2012 Author Share Posted January 16, 2012 got to this to work. thanks for your help Quote Link to comment https://forums.phpfreaks.com/topic/255018-loading-php-file-on-another-computer/#findComment-1308258 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.