CodeIgniter Forums
A PHP Error was encountered - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: A PHP Error was encountered (/showthread.php?tid=62375)



A PHP Error was encountered - omidud - 07-07-2015

Hi

I'm new using codeIgniter and sometimes I see the following error.   [CodeIgniter version 3.0.0]

A PHP Error was encountered

Severity: Core Warning

Message: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/apc.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/apc.so: cannot open shared object file: No such file or directory

Filename: Unknown

Line Number: 0

Backtrace:



This is the code (very simple)

in config/routes.php
PHP Code:
$route['default_controller'] = 'main'


in Main.php \controllers\Main.php
PHP Code:
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');

class 
Main extends CI_Controller
{
    public function 
index()
    {        
        
$this->home();
    }
    private function 
home()
    {
        
$this->load->view('header.php');
        
$this->load->view('homepage.php');
        
$this->load->view('footer.php');
    }


in homepage.php \views\homepage.php
PHP Code:
<?php
echo "<p>This is the home page</p>";
?>

header.php \views\header.php
PHP Code:
<?php 
  echo 
"<h1>Header Here</h1>"
?>

footer.php \views\footer.php
PHP Code:
<?php 
 
echo "<h4>Footer Here</h4>"
?>



RE: A PHP Error was encountered - Avenirer - 07-08-2015

As I see, the problem is with your APC library and not with CodeIgniter