Currently, I'm working with php 5.4, and would like to move to 5.6 and also PHP 7. I'm checking the code hosted on my server and realized that there is CodeIgniter code that might outdated.
@ini_get("safe_mode")
Because from what I have searched, safe_mode
is no longer supported and deprecated.
I'm not sure about that CodeIgniter code. So wish to ask everyone to confirm whether it's outdated or not. If yes, what is the solution for this?
Example (part of the code):
/*
* ------------------------------------------------------
* Set a liberal script execution time limit
* ------------------------------------------------------
*/
if (function_exists("set_time_limit") == TRUE AND @ini_get("safe_mode") == 0)
{
@set_time_limit(300);
}
From the PHP point of view, @ini_get is a function to get the configuration option.. if it does not find the configuration name, it return
FALSE
as documented hereSo, when you're updating to PHP 5.6 or PHP 7, yes it is outdated, but it won't cause error. It's just CodeIgniter will handle things differently.