Welcome Guest, Not a member yet? Register   Sign In
CI 3 overloaded function Codeigniter.php line 86
#1

Hi,

I upgraded from CI 2 to CI 3 a few weeks ago. All has been working well, until today when I get this error.

Fatal error: Cannot call overloaded function for non-object in ../system/core/CodeIgniter.php on line 86

The function on that line is is_php. I restarted my web server and it did not help.

Any ideas what could be causing this?
Reply
#2

is_php is a function in system/core/Common.php, which is required on line 77. Because it was required, the file must exist, because if it didn't execution would have stopped on line 77. Is the Common.php corrupt? Try uploading a new Common.php file to your system/core directory.
Reply
#3

(07-17-2015, 04:26 PM)skunkbad Wrote: is_php is a function in system/core/Common.php, which is required on line 77. Because it was required, the file must exist, because if it didn't execution would have stopped on line 77. Is the Common.php corrupt? Try uploading a new Common.php file to your system/core directory.

HI,

That function is in Common.php, but it is also in Codeigniter.php, on line 86 which is where my problem lies. I have never heard of a function being "overloaded". I was able to resolve this issue by re-uploading the entire System/Core directory. I have had other issues in the past where a clean upload of System/Core resolved the issue. This itself baffles me. How could files in this directory become corrupt? Next time I will do one file at a time so see which is specifically the issue and then examine it and see what has happened.
Reply
#4

If you've already tried replacing Common.php with a fresh copy, and you're still having problems, I don't know what to tell you. What is your version of PHP?
Reply
#5

PHP doesn't have function overloading ...

Google for "cannot call overloaded function for non-object" and you'll see that most first-page results point to a caching issue with older PHP versions. Disabling APC or upgrading to PHP 5.5+ should solve it, if that's indeed the case.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB