Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

problem with Parse error: syntax error, unexpected T_GLOBAL


Go to End
Reply


11 Posts   6922 Views

Avatar
irka

Community Member, 9 Posts

17 April 2008 at 12:08am

Hi! I'm absolutely newbie here ,,..and I need some help to upload my ready website on the web server. I completed my website on my computer , and now im trying to upload it to my web server. I created database, and copied all files into folder.
I also changed my database name and other options which were different on the live server in _config.php
but now when I'm trying to connect with my website I'm getting this message:
Parse error: syntax error, unexpected T_GLOBAL in /home/naszemiasto/ftp/polishculturalweek3/mysite/_config.php on line 7

please help :) my site must be online today .. :///

many thanks!

Avatar
Fuzz10

Community Member, 787 Posts

17 April 2008 at 12:32am

What does you config file look like ?

And no , don't post your DB password.. ;-)

Avatar
irka

Community Member, 9 Posts

17 April 2008 at 12:47am

<?php

ini_set('memory_limit', '32M');

Director::set_environment_type('dev')

global $project;
$project = 'mysite';

global $databaseConfig;
$databaseConfig = array(
   "type" => "MySQLDatabase",
   "server" => "sql.naszemiasto.nazwa.pl",
   "username" => "naszemiasto",
   "password" => "",
   "database" => "naszemiasto",
);

// Sites running on the following servers will be
// run in development mode. See
// http://doc.silverstripe.com/doku.php?id=devmode
// for a description of what dev mode does.
Director::set_dev_servers(array(
   'localhost',
   '127.0.0.1',
));

// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.com/cms-themes-and-skin
SSViewer::set_theme('higherground');

?>

Avatar
Fuzz10

Community Member, 787 Posts

17 April 2008 at 1:01am

Director::set_environment_type('dev')

needs a ;

Avatar
irka

Community Member, 9 Posts

17 April 2008 at 1:10am

thanks, problem sorted :)
but now I've got another ones..
http://www.naszemiasto.nazwa.pl/polishculturalweek3/ just check there if you dare :)
thanks:)

Avatar
Fuzz10

Community Member, 787 Posts

17 April 2008 at 1:12am

You forgot to do a db/build

I did that for you , now it seems to run...

Avatar
irka

Community Member, 9 Posts

17 April 2008 at 1:14am

THANKS!!
you just saved my job :)

Avatar
Fuzz10

Community Member, 787 Posts

17 April 2008 at 1:14am

Edited: 17/04/2008 1:15am

Good to hear ! ;-)

Oh.. by the way, do not forget to change the development environment on your live site...

Go to Top