2

This is my first multi locale Craft setup and everything is cool on my local/dev environment. However running into difficulty on the production server (Digital Ocean/ServerPilot). My default (EN) version plays nice but my German locale returns a 500 when isSystemOn => 'true'. When set to false it displays the appropriate 'Unavailable' (503) template. So it looks like everything is setup fine as far as Digital Ocean, ServerPilot, domain, etc... so I'm wondering if there's something amiss in my config?

I have 2 "apps" setup in ServerPilot for my default (EN) and German sites. My German app contains a public folder with an index.php that contains the server path:

$craftPath = '../../sitenamecom/craft';

I've also tried a full server path but the above seems to work fine anyway.

Then in my config/general.php I've got all the usual stuff, plus:

// production (DE)
'sitename.de' => array(
    'backupDbOnUpdate'                  => true,
    'devMode'                           => false,
    'environmentVariables' => array(
        'baseUrl'                       => 'https://sitename.de',
        'basePath'                      => realpath(dirname(__FILE__)) . '/../../public',
    ),
    'isSystemOn'                        => false,
    'siteUrl'                           => 'https://sitename.de/',
),

So as I say, everything working fine on my local server but with isSystemOn set to true on production I get an Internal Server Error. Anyone got any suggestions on how best to debug this?

1 Answer 1

1

Okay I'm all set now. Turns out it was a production environment/MySQL issue, and it's cropped up before on Digital Ocean. See Brad's fix here.

I just added

'initSQLs' => array("SET SESSION sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';")

to my config/db.php and good to go.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.