小编Mad*_*ddy的帖子

PHP7中的分段错误

我们遇到过PHP 7.0这个奇怪的问题.我们在PHP 7.0上运行Magento2的索引器,并且在不同的环境中有不同的结果.如果我们使用CentOS,并从Remi的RepoWebtatic Repo获得PHP 7.0 ,我们会得到如下的分段错误:

Program received signal SIGSEGV, Segmentation fault.
zend_mm_alloc_small (size=<optimized out>, bin_num=<optimized out>, heap=<optimized out>) at /usr/src/debug/php-7.0.1RC1/Zend/zend_alloc.c:1291
1291                    heap->free_slot[bin_num] = p->next_free_slot;
Missing separate debuginfos, use: debuginfo-install openssl-libs-1.0.1e-51.el7_2.1.x86_64
(gdb) backtrace
#0  zend_mm_alloc_small (size=<optimized out>, bin_num=<optimized out>, heap=<optimized out>) at /usr/src/debug/php-7.0.1RC1/Zend/zend_alloc.c:1291
#1  zend_mm_alloc_heap (size=<optimized out>, heap=<optimized out>) at /usr/src/debug/php-7.0.1RC1/Zend/zend_alloc.c:1358
#2  _emalloc (size=3, size@entry=32) at /usr/src/debug/php-7.0.1RC1/Zend/zend_alloc.c:2442
#3  0x0000555555666840 in zend_string_alloc (persistent=0, len=4) at /usr/src/debug/php-7.0.1RC1/Zend/zend_string.h:121
#4  php_pcre_replace_impl (pce=pce@entry=0x555555e76e40, subject_str=subject_str@entry=0x7fffd72fec68, subject=subject@entry=0x7fffd72fec80 "TypeId", subject_len=subject_len@entry=6, replace_val=replace_val@entry=0x7fffd2a393b0,
    is_callable_replace=is_callable_replace@entry=0, …
Run Code Online (Sandbox Code Playgroud)

magento2 php-7 magento-2.0

6
推荐指数
1
解决办法
1774
查看次数

在python中压缩键值对

我需要将输出从数字 1 = 0 更改为 (1:0) 或 ('1':0)。我想更改为键值对。下面是我正在使用的代码。

numberlist = [1]
val_list = [0]
for (number, val) in zip(numberlist, val_list):
    print 'number ', number, ' = ', val
Run Code Online (Sandbox Code Playgroud)

输出:number 1 = 0 所需的输出是:('1':0) or (1:0)

python

5
推荐指数
1
解决办法
7796
查看次数

在Magento2中以编程方式删除块

我们可以用unsetBlock()方法删除Magento1中的块,但是在Magento2中它不起作用.那么,请帮助如何以编程方式删除Magento2中的块?

magento2

2
推荐指数
1
解决办法
2890
查看次数

标签 统计

magento2 ×2

magento-2.0 ×1

php-7 ×1

python ×1