multi site warning

DNM - May 6, 2008 - 21:35

I get these error on the install page when i go to the subdomain but they dont show when i go to the main domain

Warning: preg_match() expects parameter 2 to be string, array given in /home/dnm4ever/public_html/maindomain.com/includes/bootstrap.inc on line 670

Warning: Cannot modify header information - headers already sent by (output started at /home/dnm4ever/public_html/maindomain.com/includes/bootstrap.inc:670) in /home/dnm4ever/public_html/maindomain.com/includes/common.inc on line 141

any ideas?

weird i just uploaded

DNM - May 6, 2008 - 22:44

weird i just uploaded another blank settings file and it works fine. maybe i copied one that wasnt blank. there was one i was messing with maybe i uploaded the wrong one...

ok this happens every time i

DNM - May 7, 2008 - 13:53

ok this happens every time i change the prefixes array.
I doubt something is wrong with my code considering im just copying and pasting it from above.

<?php
$db_url
= 'mysql://username:password@localhost/databasename';
$db_prefix = array(
     
'default' => 'main_',
     
'users' => 'shared_',
     
'sessions' => 'shared_',
     
'authmap' => 'shared_',
     
'sequences' => 'shared_',
    );
?>

is there something im missing. i have read the entire thing. i can install both multisites just fine without sharing databases just using one for sub and one for main but every time i modify it then try to install it does this.
Step by step this is what I did.
created subdomain with cpanel and pointed it to the main directory that domain is in.

1 Installed both seperatly(they worked fine)

2 I drop all the tables from the db and replace the settings.php files with fresh ones and tried to edit them to share the users.

Then i get this at the top of the install page...

Warning: preg_match() expects parameter 2 to be string, array given in /home/dnm/public_html/*.com/includes/bootstrap.inc on line 670

Warning: Cannot modify header information - headers already sent by (output started at /home/dnm/public_html/*.com/includes/bootstrap.inc:670) in /home/dnm/public_html/*.com/includes/common.inc on line 141

lines 666(ha) through 671 of bootstrap.inc

<?php
function drupal_validate_utf8($text) {
if (
strlen($text) == 0) {
return
TRUE;
}
return (
preg_match('/^./us', $text) == 1); //line 70
}
?>

lines 134 through 145 of common.inc

<?php
function drupal_set_header($header = NULL) {
// We use an array to guarantee there are no leading or trailing delimiters.
// Otherwise, header('') could get called when serving the page later, which
// ends HTTP headers prematurely on some PHP versions.
static $stored_headers = array();

if (
strlen($header)) {
header($header);
$stored_headers[] = $header; // line 141
}
return
implode("\n", $stored_headers);
}
?>

well I guess I was doing

DNM - May 7, 2008 - 14:04

well I guess I was doing something wrong.
I keep updating this topic cause I searched for my problem and couldn't find it.

I simply added the login info and it installed automatically when I browsed to the install page.

<?php
$db_url
= 'mysql://my_user_id:my_pass@localhost/my_db';
$db_prefix = array(
'default' => 'main_',
'users' => 'shared_',
'sessions' => 'shared_',
'authmap' => 'shared_',
'sequences' => 'shared_',
);
?>

ok I get how it works now.

 
 

Drupal is a registered trademark of Dries Buytaert.