• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot call functions of Controllers with "ajax" in the name of the Controller

#1
[eluser]Unknown[/eluser]
When trying to use a Controller named "Ajax.php" i ran into the following strange thing:
When i try to call a function in a Controller with "Ajax" in the Name, i get the following error message:

Quote:Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

The URL i called:
Code:
http://[SERVERNAME]/index.php/fooajaxbar/fnord

The Controller ( system/application/controllers/fooajaxbar.php ) :
Code:
<?php
class Fooajaxbar extends Controller{
    
    function __construct(){
        parent::Controller();
        $this->output->enable_profiler(TRUE);
        echo('construct<br />');
    }
    
    function index(){
        echo('in index');
    }

    function fnord(){
        echo('in fnord');
    }
}
?&gt;

Constructor and index page work well. If i rename the class to Fooajbxbar (and the file to fooajbxbar.php), all works fine, and i can call the function fnord successfully.
( URL:
Code:
http://[SERVERNAME]/index.php/fooajbxbar/fnord
)


Messages In This Thread
Cannot call functions of Controllers with "ajax" in the name of the Controller - by El Forum - 04-29-2009, 08:19 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.