943,513 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1083
  • PHP RSS
Jan 22nd, 2009
0

require_once with remote files

Expand Post »
The project specs requires that I send some data to a remote server, where records based on the data that I send will be searched from a MySQL db, and returned to the caller. I developed a class that resides in the remote Web server with MySQL. The local php pages includes that class, sends the data via the member function of the class, and receive the result. The remote Web Server is Apache 2.2

But when I am trying to include the file with a

require_once ("http://www.remoteserver.com/Remote/Remoteclass.php");

I am getting the error: URL file-access is disabled in the server configuration. For the directory that has the file, I have specified "Allow from all" in the httpd.conf file.

How do I get access to the remote file ? I think this is most probably an Apache issue, but I am not sure what changes are required and where ? Do I have to specify anything in the php.ini file ? I have checked the "allow_url_fopen" setting in the php.ini file and it is set to on.
Last edited by aparnesh; Jan 22nd, 2009 at 3:58 pm.
Similar Threads
Reputation Points: 20
Solved Threads: 10
Junior Poster
aparnesh is offline Offline
193 posts
since Jul 2005
Jan 22nd, 2009
0

Re: require_once with remote files

If i can try to figure out this correctly, you have to have both permissions from the current server AND the remote server. One should be allowed to retrieve from another server and the other to accept and send to remote server but I'm not sure.
Reputation Points: 10
Solved Threads: 4
Light Poster
jrdark13 is offline Offline
38 posts
since Jan 2009
Jan 22nd, 2009
0

Re: require_once with remote files

I am testing this now on a single machine, using 2 different sites (folders under htdocs) and the server is same. I also checked that the allow_url_include setting is "on" in php.ini. I am getting the error:
failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Failed opening required 'http://localhost:8080/Remote/RemDColl.php' (include_path='.;c:\php\includes; http://localhost:8080/Remote/;')

Any idea of what other settings I have to check ?
Reputation Points: 20
Solved Threads: 10
Junior Poster
aparnesh is offline Offline
193 posts
since Jul 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Preg match and replace for img urls
Next Thread in PHP Forum Timeline: Session destroy on navigate away





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC