logo
Ask your Symfony questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$10
Why does template die mid-decoration?

So, we are trying to move to the RackSpace Cloud. We are trying to set up our code so that we can have one Symfony project and then have the code shared among hundreds of websites. As a test, I'm trying to set up the first site on the new server. The templates are rendering oddly.

The front page renders correctly:


http://filemakeremergency.com/


but this page dies mid way:

http://filemakeremergency.com/question/step1/

See screen shot. The error only happens when you are logged in.

In the Apache error logs, the only error is:

[Tue Nov 30 21:52:23 2010] [error] [client 209.131.116.82] Action "sf/sf_web_debug" does not exist., referer: http://filemakeremergency.com/question/step1/
[Tue Nov 30 21:52:23 2010] [error] [client 209.131.116.82] Action "sf/sf_web_debug" does not exist., referer: http://filemakeremergency.com/question/step1/
[Tue Nov 30 21:52:23 2010] [error] [client 209.131.116.82] Action "sf/sf_web_debug" does not exist., referer: http://filemakeremergency.com/question/step1/
[Tue Nov 30 21:52:23 2010] [error] [client 209.131.116.82] Action "sf/sf_web_debug" does not exist., referer: http://filemakeremergency.com/question/step1/


There are no recent errors in the Symfony logs.

No errors appear on screen, even when I look using a dev controller.

In layout.php the area of the template looks like this:



<body>


<div id="topbar">
<div class="wrapper">

<form id="filtered-search" action="<?php echo url_for('search/index') ?>" method="get">
<input name="query" class="field" type="text" value="<?php echo $sf_request->getParameter('query') ?>"/>
<input type="button" id="magnify" value="Search" onclick="document.getElementById('filtered-search').submit();" />
</form>



<!-- tailor_made_answer_template_block_2_start -->

<!-- This UL contains the links in the top bar. The links change when the user is logged in -->


<ul id="nav">
<!-- <li><a href="/archives">Archives</a></li> -->
<li><a href="/page/contact">Contact</a></li>
<li><a href="/question/refunded">Refunds</a></li>

<?php if (!$sf_user->isAuthenticated()): ?>

<!-- These links only appear if the user is not logged in -->

<li><a href="<?php echo url_for('sfGuardAuth/signin') ?>">Log In</a></li>
<li><a href="<?php echo url_for('user/register') ?>">Register</a></li>
<?php else: ?>

<!-- These links only appear if the user is logged in -->

<li><a href="<?php echo url_for('sfGuardAuth/signout') ?>">Log Out</a></li>
<li><a href="<?php echo url_for('user/home') ?>">Welcome back, <?php echo $sf_user->getGuardUser()->getProfile()->getNiceName() ?></a></li>
<?php endif ?>
</ul>


<!-- tailor_made_answer_template_block_2_end -->





</div>
</div><!--/topbar-->


<div id="page">





<!-- tailor_made_answer_template_block_3_start -->

<!-- This the HTML for the top part of the page. The TEMPLATE_TAGS here draw values that you, the owner of the site, should have already set from\
the admin page -->

<div id="masthead">
<a id="logo" href="/" title="Back Home"><?php echo sfConfig::get('app_subdomain_specific_info_nice_name_for_site') ?> | Become a <?php echo sfCon\
fig::get('app_subdomain_specific_info_technology_nice_name') ?> Expert and Win Money</a>
<a id="mast-asker" href="/page/static/name/About" title="Read more about <?php echo sfConfig::get('app_subdomain_specific_info_technology_nice_name\
') ?>">Post emergency <?php echo sfConfig::get('app_subdomain_specific_info_technology_nice_name') ?> questions for fast help...</a>
<a id="mast-expert" href="/page/static/name/About" title="Read more about <?php echo sfConfig::get('app_subdomain_specific_info_technology_nice_nam\
e') ?>">...Or answer questions first &amp; win prize money.</a>
</div>



<!-- tailor_made_answer_template_block_3_end -->




<div id="main">

<div id="content">
<?php if ($sf_user->hasFlash('notice')): ?>
<p class="alert"><?php echo $sf_user->getFlash('notice') ?></p>
<?php endif ?>
<?php if ($sf_user->hasFlash('uploadError')): ?>
<p class="alert"><?php echo $sf_user->getFlash('uploadError') ?></p>
<?php endif ?>
<?php echo $sf_content ?>
</div><!--/content-->




Any thoughts about how I might be able to get an error message that gives me useful information?


This problem happens to me in Chrome and FireFox on a Mac. Have not tested on the a PC.

I'm guessing the problem has something to do with being logged in, or with some kind of shared session data, or the fact that we've got one cache folder for the whole server (though we've turned off most forms of caching). The software works fine on our other servers, such as the one you are looking at now. So it has to be something specific to the way we've got it set up on this server.

This question has been answered.

Lawrence Krubner | 11/30/10 at 10:16pm Edit

Previous versions of this question: 11/30/10 at 10:29pm

(8) Responses

See a threaded view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    11/30/10
    10:47pm
    Nate Flink says:

    DO you have enough memory to render the page? Check php.ini. I think the default is something like 8m.

    Here is possibly a useful like for doing this: http://drupal.org/node/29268

    This is usually a setting that always needs to be increased for some symfony apps.

  • avatar
    Last edited:
    12/01/10
    12:13pm
    José Nahuel Cuesta Luengo says:

    Two guesses:

    1) You haven't made the symlink for 'sf' web dir: you should add a symbolic link (or copy, otherwise) to %SF_DATA_DIR%/web/sf named 'sf' in your web dir. That will stop the errors in your apache logs stating 'sf/sf_web_debug does not exist'.

    2) Have you taken a look at the HTML page rendered with your browser? Sometimes, when PHP errors occur inside a hidden HTML tag or something like that, such errors won't show up directly in the browser, but if you take a look at the last part of the source code of the rendered HTML, they might appear.

  • avatar
    Last edited:
    11/30/10
    10:57pm
    Lawrence Krubner says:

    How can I get an error message that tells me what the problem is?

    I could guess a hundred things, but I'd rather not.

    I would rather get a good error message.

  • avatar
    Last edited:
    11/30/10
    11:04pm
    Lawrence Krubner says:

    By the way, memory limit is 128 megs, which should be enough. Its the same as this server, which is handling the software just fine.

  • avatar
    Last edited:
    11/30/10
    11:06pm
    Nate Flink says:

    Php usually complains when it runs out of memory but it depends what the error settings are.

    To view errors in php:

    <?php
    error_reporting(E_ALL);
    ini_set('display_errors', '1');
    ?>

    just drop that in as the first two lines in the suspect template.

  • avatar
    Last edited:
    12/01/10
    11:18am
    Lawrence Krubner says:

    I've looked at the source code. Please go look at it yourself. You can create an account.

    The crazy part is, the form works. You can go all the way through and get to PayPal. So the code in the actions works.

    And then something strips out the top of the template.

  • avatar
    Last edited:
    12/01/10
    11:34am
    José Nahuel Cuesta Luengo says:

    It doesn't seem to be an error that kills PHP. If that was the case, you'd get everything from the top of the page (including the <head> element and everything else) until the line in which the error killed PHP. But that's not this case. Are you testing this in a 'dev' environment? That would give you some info on possible errors and which views are being rendered.

    The form will still work, as the whole <form> tag is being rendered, so I wouldn't give that part much more thinking..

    I'm thinking of a view configuration problem, but if the code for your layout.php view is the one you pasted before it shouldn't be randomly stripped by symfony. Have you changed something in your view.yml file for that module/action?

  • avatar
    Last edited:
    12/01/10
    12:13pm
    Lawrence Krubner says:

    Good thought! Somehow the module view.yml never made it into Subversion and was not being deployed! Thanks for thinking of that!

This question has expired.





Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.