| | |
require_once with remote files
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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.
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.
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 ?
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 ?
![]() |
Similar Threads
- include Vs require (PHP)
Other Threads in the PHP Forum
- Previous Thread: Preg match and replace for img urls
- Next Thread: Session destroy on navigate away
| Thread Tools | Search this Thread |
# 5.2.10 alexa apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date directory display dissertation dropdown dynamic echo echo$_get[x]changingitintovariable... email encode error fairness file files folder form forms function functions google href htaccess html image images include indentedsubcategory insert ip javascript joomla legislation limit link local login mail memberships menu mlm multiple multipletables mysql mysqlquery newsletters oop open paypal pdf persist php problem provider query radio random recursion remote rss script search server sessions sms sockets source space spam sql syntax system table tutorial update upload url validator variable video web youtube





