Codeigniter 3.2.0 problem with php 8.2 |
I have a legacy website originally using CI 3.2 but throwing errors with php 8.2, so I found the website https://github.com/pocketarc/codeigniter/ offering modified files. I have replaced the system files and then got an error:
Warning: include(C:\wamp64\www\SPS\application\views\errors\html\error_php.php): Failed to open stream: No such file or directory in C:\wamp64\www\SPS\system\core\Exceptions.php on line 281 From Google advice I then created a folder/file; views/errors/html/error_php.php with contents '<?php echo "TEST"; ?>' but now the page just shows TEST - and perhaps it should. How can I now get back to normal? I don't understand why the Exceptions.php file is throwing an error at all. Any advice gratefully received...
My advice is to upgrade your site to a CodeIgniter version that has support for that version of PHP. I do not think any development is happening on CI3. If that person actually had a valid solution, he should have submitted it as a PR to be included in the official repo releases.
(07-29-2024, 03:41 AM)Bosborne Wrote: My advice is to upgrade your site to a CodeIgniter version that has support for that version of PHP. I do not think any development is happening on CI3. If that person actually had a valid solution, he should have submitted it as a PR to be included in the official repo releases. Well the solution I mentioned has worked for some of my other sites but they were slightly earlier versions of CI (3.0, 3.1). I'm reluctant to upgrade to CI4 because I suspect it will come with a boatload of issues and I will be on this forum for ever sorting it out. Quoting from the CI site: "CodeIgniter 4 is a rewrite of the framework and is not backwards compatible. It is more appropriate to think of converting your app, rather than upgrading it." I am guessing that there is one small change needed to my CI3.2 site that will fix it but at the moment I am stuck.
I have been running CI below 4.5 with no issues. I am waiting for the bugs to settle down in 4.5 before making the move there.
Why don't you have application\views\errors\html\error_php.php ?
Did you removed? It has been in CI3 since 2013: https://github.com/bcit-ci/CodeIgniter/c...or_php.php https://github.com/bcit-ci/CodeIgniter/b...or_php.php (07-29-2024, 05:07 PM)kenjis Wrote: Why don't you have application\views\errors\html\error_php.php ? That folder and associated file was not in place but I created it. The result was that I then got just the template with no contents except the text from error_php.php - which doesn't really solve the issue.
I added the file you suggested and got a pretty unhelpful error:
Severity: Warning Message: include(C:\wamp64\www\SPS\application\views\errors\html\error_exception.php): Failed to open stream: No such file or directory Filename: core/Exceptions.php Line Number: 228 Severity: Warning Message: include(): Failed opening 'C:\wamp64\www\SPS\application\views\errors\html\error_exception.php' for inclusion (include_path='.;C:\php\pear') Filename: core/Exceptions.php Line Number: 228 What do you think?
Read the error message carefully.
It is quite obvious. You don't have the necessary file "application\views\errors\html\error_exception.php". By default, CI3 has the following files in"application/views/errors/html" folder: https://github.com/bcit-ci/CodeIgniter/t...rrors/html |
Welcome Guest, Not a member yet? Register Sign In |