Web server test fails

spflanze - April 30, 2009 - 23:59
Project:Subdomain
Version:5.x-1.5
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I am installing the subdomain module on my local development computer. So I have pointed the domain name I am developing with to the loopback address 127.0.0.1. The stack on my development computer is Windows XP, lighttpd 1.4.22 fast cgi, Postgresql, and PHP 5.2.8. When I migrate to a production server I intend the OS to be Fedora.

In lighttp I am using LUA to rewrite the URLs.

Because the Windows XP hosts file does not have wild cards I have a separate entry in it for each possible subdomain, including the testing ones used in Subdomain Prerequisites. All of these point to the loopback IP address.

The Webserver test at "Administer › Site configuration › Subdomain settings" is failing because the "file_get_contents()" call in the function subdomain_check_apache() in the file "subdomain_debug.inc" returns false. In spite of this the Lighttpd access logs show that it serves a page with code 200 and the expected number of characters in the body when "file_get_contents()" is called. When I enter the test URL http://subdomain-test.mydomain.xcom/subdomain/test directly in the browser I get the expected result. (xcom is a tld I use to differentiate domains set to the loop back IP address from those that point to the outside web.). So the the Firefox and MS IE browsers can get this page but "file_get_contents()" call in the module cannot.

In the PHP.ini file the "allow_url_fopen" variable is set to On.

I have experimented by altering the url argument in file_get_contents() call in the module and find that this function can get static html files on my local machine. It can also get PHP web pages from the outside web, which was discovered by testing with the url "http://drupal.org." What it cannot seem to do is get local php pages in spite of the Lighttpd access file showing it had served the page.

I need my local development computer to function as closely as possible as it would on the production server. So I need to know where to go form here to get this working.

 
 

Drupal is a registered trademark of Dries Buytaert.