Painful Problem CI-3.0.1: register_long_arrays |
Hello,
I'm getting this error and I can't find a solution I don't even know how to fix it: A PHP Error was encountered Severity: Core Error Message: Directive 'register_long_arrays' is no longer available in PHP Filename: Unknown Line Number: 0 I'm using: HTTP/1.1 500 Internal Server Error Server: nginx/1.5.0 Date: Thu, 01 Oct 2015 20:33:35 GMT Content-Type: text/html; charset=UTF-8 Connection: keep-alive X-Powered-By: PHP/5.5.9-1ubuntu4.6 register_long_arrays is a very outdated config and is no longer available in php.ini I'm using a shared server and I can't turn on or off this option. I would like to know where I can disable it in CodeIgniter core. Thanks for any hint.
"register_long_arrays" has been deprecated as of 5.3.0 and removed as of 5.4.0. I am using CI on PHP 5.6.x and never got such an error, so I can safely assume that your error is not caused by CI core, but by your code. Even searching through CI 3.0.1 tag on GitHub I could not find any trace of use of "register_long_arrays" or its registered predefined variables.
Are you sure you are not using $HTTP_*_VARS instead of $_GET/$_POST/.... ?
Website: http://tomaz.lovrec.eu
GitHub: https://github.com/slax0rr Twitter: https://twitter.com/slax0rr
I did a super find in all files here project & CI for:
$HTTP_*_VARS $HTTP_SERVER_VARS $HTTP Nothing was found. I just get this error on my production server (PHP/5.5.9-1) my development (X-Powered-ByHP/5.3.17) server this error doesn't show up...
core/Common.php
function _error_handler. $is_error = (((E_ERROR | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) & $severity) === $severity); // When an error occurred, set the status header to '500 Internal Server Error' // to indicate to the client something went wrong. // This can't be done within the $_error->show_php_error method because // it is only called when the display_errors flag is set (which isn't usually // the case in a production environment) or when errors are ignored because // they are above the error_reporting threshold. if ($is_error) { echo $severity . "<br>"; echo $message . "<br>"; echo $filepath . "<br>"; echo $line . "<br>"; die(); //set_status_header(500); } OUTPUT: 16 Directive 'register_long_arrays' is no longer available in PHP Unknown 0 And because of that set_status_header(500); return Status Code: 500 to my AJAX and the page do not render. And i was thinking the problem was in my nginx proxy. If I comment set_status_header(500); the page loads like a charm. The problem is: i didn't find yet what is generating the register_long_arrays error. However now I know how to workaround it.
core/Common.php
Code: function _shutdown_handler() RESULTS array(4) { ["type"]=> int(16) ["message"]=> string(62) "Directive 'register_long_arrays' is no longer available in PHP" ["file"]=> string(7) "Unknown" ["line"]=> int(0) }
I found the error:
I did a shell_exec to cat the php.ini of my host provider... and look what I found: register_long_arrays = On this directive should be Off or better: commented. or deleted because: "longer available in PHP" thanks guys for the attention |
Welcome Guest, Not a member yet? Register Sign In |