Problem with obejct in php4 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problem with obejct in php4 (/showthread.php?tid=2212) |
Problem with obejct in php4 - El Forum - 07-23-2007 [eluser]Unknown[/eluser] Hi, I have problem: Quote:Fatal error: Call to a member function on a non-object in (..) system/application/libraries/Access.php on line 34 Line 34: $this->ip1 = $this->obj->session->userdata('ip_address'); Line 35: $this->ip2 = $this->obj->input->ip_address(); File access.php Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); I have php5 in server, but only in .php5 extension(Can`t use .htaccess with "AddType php5-cgi .php") When i rename access.php to access.php5 doesn't work. Can I rename all files to *.php5? Sry for my English EDIT grr.. "function __construct()" ;D Problem with obejct in php4 - El Forum - 07-23-2007 [eluser]James Spibey[/eluser] I think it's because you are getting your pointer to the CI instance (get_instance()) in your constructor which doesn't work on php4 (see http://ellislab.com/codeigniter/user-guide/general/creating_libraries.html for details) |