Fatal error: Call to undefined function: - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Fatal error: Call to undefined function: (/showthread.php?tid=22972) |
Fatal error: Call to undefined function: - El Forum - 09-25-2009 [eluser]bengal[/eluser] Ok peeps, here is one for ya. While migrating code from my development environment to my hosting site I ran into issues with calls to base_url. "Fatal error: Call to undefined function: base_url() in..." In order to sort out what might be happening, I wiped the slate on my hosting environment and re-installed the base code of CI v1.6.3 and modified the config file to reflect the hosted URL. After I got the base install working and the welcome message displays correctly. I added the following debug code to the welcome view. <hr> <?php echo base_url() ; ?> <hr> <p><br />Page rendered in {elapsed_time} seconds</p> I did some other tests, and found that calls to index_page(), site_url() also fail. I have confirmed that the url_helper.php file is where it should be. My config file isn't defining any strangeness for instance: $config['base_url'] = "http://www.mydomain.com/admin/"; $config['index_page'] = "index.php"; $config['uri_protocol'] = "QUERY_STRING"; And I am not using an .htaccess directives. Wacky stuff no? I welcome any feedback, support. Thanks Fatal error: Call to undefined function: - El Forum - 09-25-2009 [eluser]wabu[/eluser] You may have confirmed this already, but is the URL helper definitely (auto)loaded? Fatal error: Call to undefined function: - El Forum - 09-25-2009 [eluser]bengal[/eluser] OK so now I feel silly. That was it. I forgot that I needed to auto_load the helper files. Thanks!! |