php require_once() with a remote file [php 5.0, Windows Server 2003]
Posted on 2010-01-12
I have a remote (hosted) windows server 2003 that is our primary development test web server. On a local machine here at the office, Windows XP Pro, I want to include a remote file in a php script with the database credentials so the local user can interact with the db, but never see the username/password.
Something like this:
<?php require_once("http://www.domain.com/databaselogin.php"); ?>
I have allow_url_include directive set to On in php.ini, but I still seem unable to include the remote file. I was thinking perhaps permission/connection issues on the remote server, but I'm able to include the file properly in plain text (.txt) form and it works. Is it simply that I'm unable to include .php extension files from a remote location for rendering reasons? If so, is there another, secure way to maintain credentials remotely without giving local users access to them?