tags:

views:

85

answers:

3
$dbhost = "10.21.47.198"; 
$dbuser = "xxxxx"; 
$dbpass = "xxxxx"; 
$dbname = "xxxxxx"; 
$prefix = "art_"; // you can change this prefix but not necessary 
$cdomain = $_SERVER['SERVER_NAME']=='xxxxxxxxx' ? '' : ".$_SERVER[xxxxxxxxxxx]"; //.yoursite.com $date_format = "F d, Y"; 
$admin_email = "[email protected]";

the above code is part of an article publisher script. It is the next line after the standard database info,

(db=database name, username= username, etc.)

It seems to install okay, but when I try to go to the home page or admin page this kicks in. What does it mean by server name and then server? I thought they were the same unless server name is like the public_html.

this is the error I get:

Parse error: syntax error, unexpected '.', expecting ']' in /home2/seobook/public_html/articlepublish/config.php on line 28
+3  A: 

The problem is with the dot in $_SERVER[seoinabook.com]. Try quoting the key, $_SERVER['seoinabook.com'].

Ewan Todd
@Ewan: +1 for you.
Moshe
Ewan your answer is wrong. 'seoinabook.com' is not a key in the $_SERVER array.
Jeffrey Hines
+1  A: 

I think the right code will be:

## set domain prefix if current domain is not main
$cdomain = $_SERVER['SERVER_NAME']=='seoinabook.com' ? '' : "seoinabook.com";
Ivan Nevostruev
A: 

It looks like to me that the code should look like this...

$cdomain = $_SERVER['SERVER_NAME']=='seoinabook.com' ? '' : $_SERVER['SERVER_NAME'];

it says that $cdomain should equal '' if the $_SERVER['SERVER_NAME'] equals 'seoinabook.com' else it will equal $_SERVER['SERVER_NAME']

Jeffrey Hines
ls:Table 'seobook_oneadmin.art_styles' doesn't existNow it says this after wh at seems to be a good install
SEO in Texas