I discovered the problem while working withe aggregator.module. In version 1.480 of common.inc drupal_http_request() appends the default port number to the URI.
I have a system set up with two domain names running Drupal 4.6.3 sites from a single code tree. One has a configuration subdirectory, the other uses the settings.php file in the default location. The Drupal aggregator, when accessing either of them, connects to the system set up in the default settings.php.
I thought it was a problem with the change to drupal_http_request() but I just tried accessing the site with the configuration subdirectory with a web browser including a port number in the url. I was connected to default site.
Comments
Comment #1
Prometheus6 commentedThe problem:
Example for a fictitious site installed at
http://www.drupal.org/mysite/test/
the 'settings.php' is searched in the following directories:
1. $confdir/www.drupal.org.mysite.test
2. $confdir/drupal.org.mysite.test
3. $confdir/org.mysite.test
4. $confdir/www.drupal.org.mysite
5. $confdir/drupal.org.mysite
6. $confdir/org.mysite
7. $confdir/www.drupal.org
8. $confdir/drupal.org
9. $confdir/org
10. $confdir/default
Example for the same site accessed as
http://www.drupal.org:80/mysite/test/
the 'settings.php' is searched in the following directories:
1. $confdir/www.drupal.org.80.mysite.test
2. $confdir/drupal.org.80.mysite.test
3. $confdir/org.80.mysite.test
4. $confdir/80.mysite.test
6. $confdir/www.drupal.org.80.mysite
7. $confdir/drupal.org.80.mysite
8. $confdir/org.80.mysite
9. $confdir/80.mysite
10. $confdir/www.drupal.org.80
11. $confdir/drupal.org.80
13. $confdir/org.80
14. $confdir/80
15. $confdir/default
This patch checks the array created by splitting the $_SERVER['HTTP_HOST'], eliminating the port number if the default port is specified before building the paths to be searched.
This problem exists in 4.6 too. You can get around it with a symbolic link or copying $confdir/SERVER/settings.php to $confdir/SERVER.80/settings.php on Windows systems.
Comment #2
Prometheus6 commentedOkay, this is the right patch.
Comment #3
drummDuplicate of http://drupal.org/node/35725
Comment #4
cog.rusty commentedDuplicate or not, after two months the aggregator still only works in the primary site of a multisite.
Cron only triggers the primary site and none of the other sites.
Comment #5
drummPlease open a new issue for the cron trouble. Have you tried running cron at the url for each site? Cron is not meant to trigger every site at once.
Comment #6
cog.rusty commentedMy mistake. I was expecting that one cronjob would be enough. It works fine now.