| [resolved] When SF_DEBUG is false Content-Length is null :/ [message #17841] |
Wed, 13 December 2006 18:51  |
j0k3r Messages: 44 Registered: December 2006 Location: France - Paris |
Member |
|
|
Hi all !
I have install sf 1.0.0beta2 "by hand" and I use it with xampp 1.5.5a (with apache on 8080).
I have init a new project and add an app frontend. When i go to "/frontend_dev.php" i have the sf debug bar with all images, and the beautiful page "Congratulations" .
But, when i want to see on "prod", i go to "/index.php" and here i have noting display and firefox allow me to download an empty file index.php.
When i take a look to the header request, all seems to be fine except :
| Quote: | X-Powered-By: PHP/5.2.0
Content-Length: 0
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/x-httpd-php
|
After some investigation, i discover that the problem comes from SF_DEBUG. When it is to true, the page is display fine and when it is to false ... doesn't work :/
If someone knows something about that, it will be very cool 
And thanks for your answers
[Updated on: Wed, 10 January 2007 18:01]
|
|
|
|
|
| Re: When SF_DEBUG is false Content-Length is null :/ [message #18155 is a reply to message #17841 ] |
Tue, 19 December 2006 11:20   |
halfer Messages: 9514 Registered: January 2006 Location: West Midlands, UK |
Faithful Member |
|
|
Can you turn on symfony logging and see what that puts in the symfony log?
Remember Palestine
|
|
|
|
| Re: When SF_DEBUG is false Content-Length is null :/ [message #18175 is a reply to message #17841 ] |
Tue, 19 December 2006 14:06   |
halfer Messages: 9514 Registered: January 2006 Location: West Midlands, UK |
Faithful Member |
|
|
I'd find the php source of the debugging stuff, take a backup, and then add echo statements in there until the culprit is tracked down. As Fabien says, there is something in there that is causing a fatal error before symfony gets a chance to render anything.
Remember Palestine
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: [resolved] When SF_DEBUG is false Content-Length is null :/ [message #35381 is a reply to message #17841 ] |
Wed, 12 September 2007 10:04   |
halfer Messages: 9514 Registered: January 2006 Location: West Midlands, UK |
Faithful Member |
|
|
Hmm, 32M of memory per PHP instance seems rather high for a base symfony install. Anyway according to the manual, since PHP 4.3, compiled binaries have needed to have been specifically built with --disable-tokenizer in order for the tokeniser functions to be unavailable. I guess some distros have used that, perhaps because it is a rarely used set of functions.
With the assumption that the absence of the tokenizer is the problem, I've raised a ticket for you:
http://trac.symfony-project.com/trac/ticket/2231
Remember Palestine
|
|
|
| Re: [resolved] When SF_DEBUG is false Content-Length is null :/ [message #35454 is a reply to message #35381 ] |
Thu, 13 September 2007 08:53   |
fabien Messages: 484 Registered: October 2005 |
Faithful Member Administrator |
|
|
I'm just unable to reproduce the error. It really drives me crazy. I can lower my memory limit to just 1Mo and everything just works fine (I've tested with PHP 5.1.6 and PHP 5.2.0), even if I force symfony to use the regex in the sfToolkit::stripComments() method.
I've just commited a patch (in http://trac.symfony-project.com/trac/changeset/5061) to sfCompileConfigHandler to call all the regexes and the tokenizer stuff for each file instead of doing those transformations on one big string.
Please, can you try it and tell me if it fixes the problem for some/all of you?
If you don't use the /branches/1.0 subversion repository, you can change the sfCompileConfigHandler.class.php by this one here: http://trac.symfony-project.com/trac/browser/branches/1.0/li b/config/sfCompileConfigHandler.class.php?format=txt
Before being able to test it properly, you will need to remove all your cache files.
Thanks
[Updated on: Thu, 13 September 2007 08:54]
|
|
|
| Re: [resolved] When SF_DEBUG is false Content-Length is null :/ [message #35476 is a reply to message #29684 ] |
Thu, 13 September 2007 12:27  |
alanz Messages: 1 Registered: September 2007 |
Junior Member |
|
|
I am not 100% familiar with the regular expression engine used in the strip-comments code, but it seems to me that no provision is made for end of comment delimiters appearing in string literals, which should be ignored.
This is probably unrelated to the issue at hand, but can cause problems.
|
|
|