Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Getting a blank page on deployed website

Hi guys,

Just trying to deploy my first app but having a lot of trouble, i'm on digital ocean and got phalcon installed on debian 7.0

PHP Version 5.4.4-14+deb7u12

I have done some manual tracing so far and it seems that

echo $application->handle()->getContent();

is returining an empty string, and no errors appear in the error logs or any exceptions thrown.

I printed after this echo and it worked fine, not sure what else I can do to find out why it's not working, it works on my local machine, buit i am developing on a mac.

Help would be appreciated. thanks!

edited Jul '14

Could you try change the controller's view directory to camelize? For example if you have UsersController and loginAction, please put the view into /views/Users/login.volt. I had the similar issue (on mac works good, on ubuntu server doesn't work).

edited Jul '14

Hmm, well it isn't loading anything by default, I will try that when I get to that point as I kinda got it working but now got another error, Phalcon wasn't able to write to the folders so I did a chmod to the compiled-templates folder, but now getting this:

Warning: Phalcon\Mvc\View\Engine\Volt\Compiler::compileFile(../app/compiled-    templates/ failed to open stream: No  such file or directory in /var/www/ on line 33
PhalconException: Volt directory can't be written#0 [internal function]: Phalcon\Mvc\View\Engine\Volt\Compiler->compileFile('/var/www/kiwiso...',     '../app/compiled...', false)
#1 [internal function]: Phalcon\Mvc\View\Engine\Volt\Compiler->compile('/var/www/kiwiso...')
#2 [internal function]: Phalcon\Mvc\View\Engine\Volt->render('/var/www/kiwiso...', NULL, true)
#3 [internal function]: Phalcon\Mvc\View->_engineRender(Array, 'index/index', true, true, NULL)
#4 [internal function]: Phalcon\Mvc\View->render('index', 'index', Array)
#5 /var/www/ Phalcon\Mvc\Application->handle()
#6 {main}

Do you use apache? Maybe you must change file/directory owner, try:

chown www-data:www-data you_project_dir/ -R

edited Jul '14

Thanks, that seems to have worked initially just got one issue now which is the same as the problem you had about the views being ucfirst, any way around it?

After fixing my blank screen problem, which was caused by permissions issue on the writeable folders, I solved the semi blank screen issue by setting git to be case sensitive with the following command:

git config core.ignorecase false

Then changed the folders for each of my views to Ucfirst, as per Marcins example above, FYI for anyone else who experiences this issue!