Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symfony 2.0.9 crashes with php 5.3.9 #3216

Closed
lrdevries opened this issue Jan 30, 2012 · 12 comments
Closed

Symfony 2.0.9 crashes with php 5.3.9 #3216

lrdevries opened this issue Jan 30, 2012 · 12 comments

Comments

@lrdevries
Copy link

@lrdevries lrdevries commented Jan 30, 2012

With a clean symfony 2.0.9 without vendors and the vendors installed with "php bin/vendors install"
Gives a apache 2.2.21 crash ( [notice] Parent: child process exited with status 3221225477 -- Restarting. )

The version with vendors included works without a problem, the problem only occurs with commandline installed vendors on php 5.3.9 (php 5.3.8 hasn't the problem).

Tried with USBWebserver v8.5 and own configuration.

@sstok

This comment has been minimized.

Copy link
Contributor

@sstok sstok commented Jan 30, 2012

This problem is related to PHP not Symfony.

http://www.apachelounge.com/viewtopic.php?t=2856

Make sure all the DLL files are up-to-date.

If this happens again try googling with the status code.
https://www.google.com/search?q=status+3221225477&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:nl:official&client=firefox-a

@lrdevries

This comment has been minimized.

Copy link
Author

@lrdevries lrdevries commented Jan 30, 2012

I've googled the problem, and tried to add the libmysql.dll or even disable the mysql plugin, that didn't work.
I also used a clean version of the php redistributial. It could be a php error, but i don't know whats wrong. I debugged with xdebug, and after the $this->render("...") (including the twigengine file) it crashes.

What are the differences between the vendors loaded bij commandline or default provided?

@bendavies

This comment has been minimized.

Copy link
Contributor

@bendavies bendavies commented Feb 8, 2012

TwigEngine is 4096 bytes in 2.0.9

https://bugs.php.net/bug.php?id=60758

@bendavies

This comment has been minimized.

Copy link
Contributor

@bendavies bendavies commented Feb 8, 2012

Actually, TwigEngine is 3957, but on windows, when vendors are pulled, something is converting all line breaks to CRLF, which bumps it to 4096 extactly. Excellent bug!

I realise this it not your bug, but it would be good to just bump the file size somehow, as you guys will fix it faster than php will.

Occurs on 5.3.10 also.

@stof

This comment has been minimized.

Copy link
Member

@stof stof commented Feb 8, 2012

@bendavies the conversion is done by git depending of your config. And this did not occur for any of the core devs working on Windows as we all configured git not to do this conversion when getting the code.

@stof

This comment has been minimized.

Copy link
Member

@stof stof commented Feb 8, 2012

Le 08/02/2012 14:03, bendavies a écrit :

@stof can you elaborate on "depending on your config". How do I stop git doing this?
git config core.autocrlf can have 3 values:

  • true: always convert to CRLF when pulling and convert back to LF
    when commiting (your value)
  • input: convert to LF when commiting but keep as is when pulling
    (our value so that we work with LF in the code and avoid sending some
    CRLF in the repo by mistake)
  • false: no conversion (beware: you could send CRLF in the repo)

To set the value, run the command git config core.autocrlf input to
change the value for a repo. You can add the --global flag to impact
all your repo (except the repo having an explicit config)

Christophe | Stof

@bendavies

This comment has been minimized.

Copy link
Contributor

@bendavies bendavies commented Feb 8, 2012

@stof It might have been handy if you pointed everyone in the direction of the setting, but nevermind.

http://progit.org/book/ch7-1.html

git config --global core.autocrlf input

will fix it for windows users

@vicb

This comment has been minimized.

Copy link
Contributor

@vicb vicb commented Feb 8, 2012

@sstok

This comment has been minimized.

Copy link
Contributor

@sstok sstok commented Feb 8, 2012

I always configure my .gitattributes with.

* text=auto
core.autocrlf=lf

This will ALWAYS force Line feeds. And yes that also works on Windows.
It may not be the recommended way, but it works much better then autocrlf.

Edit: Whoops the f got missing.

lf = line-feed aka \n.

I have had numerous problems with this, only setting the LF explicitly solved this.
Really would like for MS drop the usage of CR (\r)

@fabpot

This comment has been minimized.

Copy link
Member

@fabpot fabpot commented Mar 7, 2012

Closing this issue as this is not related to Symfony and a workaround exists.

@fabpot fabpot closed this Mar 7, 2012
@leek

This comment has been minimized.

Copy link
Contributor

@leek leek commented Mar 8, 2012

Rather than closing this bug - would it really have been that hard to add 1 character to the file (in the phpDoc for example)?
I have fought with this all day not realizing the 4096 bug.

Especially since Github recommends autocrlf be set to true and not input for Windows machines.

@aderuwe

This comment has been minimized.

Copy link
Contributor

@aderuwe aderuwe commented May 16, 2012

I just spent some 30 minutes with this... Maybe we could document this somewhere? It's not like the perceived error is obvious, at all.

And I do agree with @leek ... Really? Out of principle?

aderuwe added a commit to aderuwe/symfony that referenced this issue May 16, 2012
fabpot added a commit that referenced this issue May 16, 2012
Commits
-------

6341de0 Be more specific in phpdoc (Fixes #3216)

Discussion
----------

Modify TwigEngine.php's signature (#3216)

This fixes the "line-ending issues" in TwigEngine.php responsible for connection reset errors on windows (which do still occur on 2.0.13, when ```core.autocrlf``` is set to GitHub's recommendation rather than Symfony's), caused by factors out of Symfony's control.

I acknowledge the comments on the above issue, but it seems this is trivial to do and it will save a bunch of time for people who find themselves in this situation.

Bug fix: [no]
Feature addition: [no]
Backwards compatibility break: [no]
Symfony2 tests pass: phpdoc changes
Fixes the following tickets: [#3216]
License of the code: MIT

---------------------------------------------------------------------------

by travisbot at 2012-05-16T19:35:55Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1348808) (merged 6341de0 into 980a062).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.