Author |
Message |
holodyn
Joined: 18 Apr 2013 Posts: 4
|
Posted: Mon Jul 27, 2015 4:18 pm Post subject: Segfault - Encoding under 8.3 - PHP 5.3 |
|
|
The application runs fine un-encoded. The application runs fine when encoded for PHP 5.4. The application is written for 5.3 compatibility. The application encods without error in PHP 5.3. The application fails only on specific pages where several PHP objects are being loaded into memory with null values. Unable to debug since this only happens to the encoded packages.
Jul 27 11:12:32 apollo kernel: php[30661]: segfault at 7f14696840b8 ip 00000000007b8658 sp 00007fff2c4f9270 error 7 in php[400000+740000]
Jul 27 11:12:32 apollo abrt[30669]: Saved core dump of pid 30661 (/usr/bin/php) to /var/spool/abrt/ccpp-2015-07-27-11:12:32-30661 (46407680 bytes)
Jul 27 11:12:32 apollo abrtd: Directory 'ccpp-2015-07-27-11:12:32-30661' creation detected
Jul 27 11:12:32 apollo abrtd: Executable '/usr/bin/php' doesn't belong to any package and ProcessUnpackaged is set to 'no'
Jul 27 11:12:32 apollo abrtd: 'post-create' on '/var/spool/abrt/ccpp-2015-07-27-11:12:32-30661' exited with 1
Jul 27 11:12:32 apollo abrtd: Deleting problem directory '/var/spool/abrt/ccpp-2015-07-27-11:12:32-30661'
PHP 5.4.23 (cli) (built: Dec 29 2013 00:09:49)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader v4.4.1, Copyright (c) 2002-2013, by ionCube Ltd., and
with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies |
|
Back to top |
|
 |
alastair
Joined: 23 Feb 2010 Posts: 407
|
Posted: Mon Jul 27, 2015 4:40 pm Post subject: |
|
|
Hi,
It's generally better to ask about such problems in our Support Help Desk at http://support.ioncube.com
I note that you are using quite an old loader, 4.4.1. Have you tried installing the latest loader (which would be 5.0.12) on that system? Installing the latest loader might cure the problem.
If that does not solve the problem then please do create a ticket in our Support Help Desk. Please include in the ticket your ionCube user name and, also, your encoding options. If you can produce a self-contained test case that reproduces the problem then that would help greatly. _________________ Alastair
ionCube |
|
Back to top |
|
 |
holodyn
Joined: 18 Apr 2013 Posts: 4
|
Posted: Mon Jul 27, 2015 5:03 pm Post subject: |
|
|
I will try the support desk if necessary - I have not opted for the "support" upgrade so I may not be allowed.
This error is happening with both the encoder on our server and other test servers, with loaders as high as 5.0.7 installed reporting the same issue.
I have just installed the latest encoder package v9 - run with the same 8.3 and PHP 5.3 settings - produces the same result.
I will try the ticket route and post the findings here.
Any other suggestions are appreciated. |
|
Back to top |
|
 |
holodyn
Joined: 18 Apr 2013 Posts: 4
|
Posted: Mon Jul 27, 2015 5:43 pm Post subject: Problem Found - Loader handling (string)( |
|
|
After paying $100 for the v9 upgrade to no avail, and before paying another $100 for basic support I did some more digging and believe I've found the problem.
The following line is supported by PHP 5.3.
$attr = $simpleXMLNode->attributes();
$label = (string)(empty($attr['label']) ? $attr['name'] : $attr['label']);
but creates this segfault in the loader...
To fix the problem either solution worked:
$attr = $simpleXMLNode->attributes();
$label = strval(empty($attr['label']) ? $attr['name'] : $attr['label']);
or
$attr = $simpleXMLNode->attributes();
$label = (empty($attr['label']) ? (string)$attr['name'] : (string)$attr['label']);
Both of these seem to be unnecessary. This should be fixed in the loader and / or at the least an error should be reported by the encoder. |
|
Back to top |
|
 |
alastair
Joined: 23 Feb 2010 Posts: 407
|
Posted: Tue Jul 28, 2015 9:30 am Post subject: |
|
|
Hi,
Thanks for investigating the issue further but please would you clarify the following two points:
1. You wrote, "I have just installed the latest encoder package v9 - run with the same 8.3 and PHP 5.3 settings".
By this do you mean that you were encoding in legacy mode (which is version 8.3) or were you encoding with version 9 but using your previous version 8.3 settings? Of course, if you were to use version 9 encoding then it would only work with a version 5 loader.
2. You wrote also that the problem occurs "other test servers, with loaders as high as 5.0.7". Have you tried with the latest loader which is version 5.0.12? _________________ Alastair
ionCube |
|
Back to top |
|
 |
|