dtu15253 2014-12-01 04:45
浏览 384
已采纳

Cygwin上的Symfony2 - PHP分段错误

I struggle to be able to run PHP client line interface on Cygwin. I receive constantly Segmentation fault error. But some of functions are correctly done - I cannot say when does it happen.

If somebody had this error, please give me any clue to correctly run PHP CLI under cygwin.

Thanks in advance!

EDIT

I Receive stackdump, but I don't know if it tells anything:

Exception: STATUS_ACCESS_VIOLATION at eip=603B7AC6
eax=0000000A ebx=FFE42FFF ecx=002853E0 edx=FFE43000 esi=00000000 edi=FFE43000
ebp=002853E2 esp=00285240 program=C:\cygwin\bin\php.exe, pid 10056, thread main
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame     Function  Args
002853E2  603B7AC6 (022A018F, 02D40284, 0348030B, 0374034D)
00040002  00F30055 (00340000, 01E00000, 020C0000, 00360000)

Moreover I tried to limit in php.ini

pcre.recursion_limit=1000    
  • no effect.

It crashes every time when I work with client line interface. If I run it through Apache2 there is no problem.

How can I debug it effectively?

EDIT

I run it with php-cgi, where I receive the html output with error description:

ContextErrorException: Warning: Invalid argument supplied for foreach() in ...

Having this information I guess that there is a problem with input arguments. If I run scripts without arguments from console I don't receive segmentation fault.

This is Symfony framework and those scripts run like a charm on windows and ubuntu on console. So I guess: - there is something wrong with PHP settings - there is something wrong with console on Cygwin

Any idea how can I debug it more?

  • 写回答

1条回答 默认 最新

  • douhun7609 2014-12-02 22:16
    关注

    After long hours of useless research I end up with removing php5 and php from Cygwin and mapping there standalone PHP for Windows.

    For anyone facing this problem:

    1. Uninstall all "PHP" group of extensions for cygwin
    2. Run cygwin
    3. rm -f /usr/bin/php.exe
    4. rm -rf /usr/share/php
    5. Download and install brand new PHP for Windows
    6. ln -s /cygdrive/c/your/path/to/php/php.exe /usr/bin/php.exe

    So I don't know why this issue occured to me, but fresh native php for windows installation helped.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题
  • ¥15 Python时间序列如何拟合疏系数模型