I'm trying to automatic cron calls i cPanel in a multisite-Drupal environment. But it seems like the cron tries to use the default database even though I specified the path to the cron like this: domain.com/symlink/cron.php
The symlink points to the root Drupal folder. But when loading the http://domain.com/symlink/ the settings.php located in the sites/domain.com.symlink-folder is calling the correct database.
In cpanel I added the following path to the cron:
php /home/username/public_html/symlink/cron.php
The cron output is as follows:
X-Powered-By: PHP/5.2.6
Content-type: text/html
Warning: include_once(./sites/default/settings.php) [function.include-once]: failed to open stream: No such file or directory in cmsfiles/includes/bootstrap.inc on line 243
Warning: include_once() [function.include]: Failed opening './sites/default/settings.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in includes/bootstrap.inc on line 243
Warning: Cannot modify header information - headers already sent by (output started at includes/bootstrap.inc:243) in includes/common.inc on line 141
Unsupported database type
Unsupported database type
The database type is unsupported. Please use either mysql for MySQL 3.x & 4.0.x databases, mysqli for MySQL 4.1.x+ databases, or pgsql for PostgreSQL databases. The database information is in your settings.php file.
For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.
Comments
Try a Different Cron Job
Did you try using wget or lynx instead of php as your cron command? I think you will find better results using wget or lynx or one of the .sh scripts. See the examples here: http://drupal.org/cron
When cron.php is run
When cron.php is run directly with php, the relative paths which it contains are wrong because the current directory is not your Drupal installation's directory. Try a browser such as wget or lynx.
DRD or Drush
DRD or Drush modules are able to do that: http://drupal.org/node/785226#comment-3586902