Problems in production mode


I move my application to my production server and it doesn’t work.

Both, prod and dev application are under webroot/projectName.

My problems are:

  • When I load my backend index, I get a blank page.

  • Login page works, but when I try login, I get a bad request(#400).

My app.log is :


2015-06-18 00:26:32 [][-][-][warning][yii\debug\Module::checkAccess] Access to debugger is denied due to IP address restriction. The requesting IP address is 


2015-06-18 00:33:45 [][-][-][error][yii\web\HttpException:400] exception 'yii\web\BadRequestHttpException' with message 'Incapaz de verificar los datos enviados.' 


Should I change any configuration?



Whenever I received a blank page with PHP code it was most of the time something wrong in the php.ini of the server configuration.

For example when use use short tags in your backend somewhere like:


// php code


Then you have to enable short-tags in php ini.

So a good start would be:

  1. Enable error reporting.
  1. Compare your production and development php configuration with for example phpinfo();



In my php.ini display_errors is sets to on and error_reporting is sets to 24567 (E_ALL + …).

Anyway, I wrote this into SiteController:



And it still is showing a blank page.


The problem on loginForm is csrf.

If I disable csrf in SiteController, it works, but I don’t want to disable csrf.

What’s the problem? In my dev server csrf works correctly and not in my prod server.

I don’t know why I get a blank page for my backend/index.


Have you checked server logs?

I’m a shared host and I haven’t access to log files.

If I disable csrf:

$this->enableCsrfValidation = false;

I can see login view. If I loggin, I get a blank page. This is because my site/index page shows as blank page.

If I change redirection once I login to country/index (for example), It shows correctly.

Moreover, if I have a view called action/myView, it shows a page not exist error. But if I write action/myview (without capital letter) it works but I get a blank page. My view file have the capital letter. In my local server the opposite occurs. I don’t understand what I happen.

If I go to country/index, the view shows correctly but my navbar menu losts elements, like a sub-dropdown menu.

I dont’t know what happens.

Server requirements are OK.


I don’t use composer to upload my project, just I made a zip and upload it.[/b][/u]


Is your dev server Windows and production Unix? This might explain case sensitive issues.

Yes, but I do the action calls by writing the exact name.