• 404 in CodeIgniter3 application

    From Jivanmukta@21:1/5 to All on Wed Apr 12 18:25:23 2023
    I am trying to solve a problem of 404 in my COdeIgniter3 application.
    The problem occurs because of problem in core/Codeigniter.php:
    echo 'BEFORE call_user_func_array';
    var_dump($CI, $method, $params);
    call_user_func_array(array(&$CI, $method), $params);

    // Mark a benchmark end point
    $BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_end');
    echo 'AFTER call_user_func_array ';

    BEFORE is displayed, AFTER is not displayed.
    var_dump displays object Main, method index, empty array params.
    I have a controller
    class Main extends MY_Controller {
    public function index() {
    ...

    In folder /home/robert/Projekty/praca/application/controllers I have
    file Main.php
    In file /home/robert/Projekty/praca/application/config/routes.php I have:

    $route['default_controller'] = 'main';
    $route['404_override'] = '';

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From J.O. Aho@21:1/5 to Jivanmukta on Thu Apr 13 07:40:04 2023
    On 4/12/23 18:25, Jivanmukta wrote:
    I am trying to solve a problem of 404 in my COdeIgniter3 application.
    The problem occurs because of problem in core/Codeigniter.php:
    echo 'BEFORE call_user_func_array';
    var_dump($CI, $method, $params);
    call_user_func_array(array(&$CI, $method), $params);

    // Mark a benchmark end point
    $BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_end');
    echo 'AFTER call_user_func_array ';

    BEFORE is displayed, AFTER is not displayed.

    I guess it hard fails at call_user_func_array

    var_dump displays object Main, method index, empty array params.

    If the method called don't need parameters

    I have a controller
    class Main extends MY_Controller {
    public function index() {

    Most likely something that goes wrong when you call index(), debug that one.


    In folder /home/robert/Projekty/praca/application/controllers I have
    file Main.php
    In file /home/robert/Projekty/praca/application/config/routes.php I have:

    $route['default_controller'] = 'main';

    Not sure if it's case sensitive, never used CodeIgniter3, you may need
    to change to Main.

    --
    //Aho

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arno Welzel@21:1/5 to All on Thu Apr 13 09:22:32 2023
    Jivanmukta, 2023-04-12 18:25:

    I am trying to solve a problem of 404 in my COdeIgniter3 application.
    The problem occurs because of problem in core/Codeigniter.php:
    echo 'BEFORE call_user_func_array';
    var_dump($CI, $method, $params);
    call_user_func_array(array(&$CI, $method), $params);

    // Mark a benchmark end point
    $BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_end');
    echo 'AFTER call_user_func_array ';

    BEFORE is displayed, AFTER is not displayed.

    Without any error message it's impossible to tell what the problem is.
    However if you want to do benchmarking this is done in a different way:

    <https://codeigniter.com/userguide3/libraries/benchmark.html>

    To find out what the real problem is, check the error logs of PHP and/or
    the webserver or enable error reporting in php.ini and try to call the
    URL again:

    error_reporting = E_ALL

    Also using XDebug (<https://xdebug.org>) with an IDE like PHPStorm or
    VSCode helps a lot. This is often already included in current Linux distributions and just has to be enabled.


    --
    Arno Welzel
    https://arnowelzel.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jivanmukta@21:1/5 to All on Fri Apr 14 11:24:04 2023
    Address http://localhost/~robert/praca/employee/list_offers works fine.
    Address http://localhost/~robert/praca/main/index doesn't work (404).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Doctor@21:1/5 to jivanmukta@poczta.onet.pl on Fri Apr 14 11:50:16 2023
    In article <u1b63k$vg4p$1@portraits.wsisiz.edu.pl>,
    Jivanmukta <jivanmukta@poczta.onet.pl> wrote:

    Address http://localhost/~robert/praca/employee/list_offers works fine.
    Address http://localhost/~robert/praca/main/index doesn't work (404).


    FYI Localhost gets you nowhere!
    --
    Member - Liberal International This is doctor@nk.ca Ici doctor@nk.ca
    Yahweh, King & country!Never Satan President Republic!Beware AntiChrist rising! Look at Psalms 14 and 53 on Atheism https://www.empire.kred/ROOTNK?t=94a1f39b She didn't want to be evil, but by denying her nature she adopted it. -unknown Beware https://mindspring.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From J.O. Aho@21:1/5 to Jivanmukta on Fri Apr 14 19:12:56 2023
    On 4/14/23 11:24, Jivanmukta wrote:

        Address http://localhost/~robert/praca/main/index doesn't work (404).

    and the logged error message was?

    --
    //Aho

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Angel@21:1/5 to All on Sat Apr 15 11:35:55 2023
    Q2hlY2sgb3V0Og0KDQrioIDioIDioIDioIDioIDioIDioIDioIBrb2h0dW1pc3BhaWsyLmZyZWVo b3N0cHJvLmNvbS9hLnBocA0K4qCA4qCA4qCA4qCA4qCA4qCA4qCA4qCAa29odHVtaXNwYWlrMy42 Nmdoei5jb20vYS5waHANCuKggOKggOKggOKggOKggOKggOKggOKggGtvaHR1bWlzcGFpazQubWVk aWFuZXdzb25saW5lLmNvbS9hLnBocA0K4qCA4qCA4qCA4qCA4qCA4qCA4qCA4qCAYWFhYWFhYWFh YWFhYWFhYXIubWVkaWFuZXdzb25saW5lLmNvbS9maXJzdHBhZ2UucGhwDQrioIDioIDioIDioIDi oIDioIDioIDioIB0aGVtb3N0Y29uZm9ydGFibGV0YWxrcGxhY2UubWVkaWFuZXdzb25saW5lLmNv bS9hLnBocA0KDQoNClNlZSBZb3Ugb24gdGhlIGFkZHJlc3Nlcy4uLi4uLg0KDQoNCk9uIEZyaWRh eSwgQXByaWwgMTQsIDIwMjMgYXQgNzoxMzowNuKAr1BNIFVUQysyLCBKLk8uIEFobyB3cm90ZToN Cj4gT24gNC8xNC8yMyAxMToyNCwgSml2YW5tdWt0YSB3cm90ZTogDQo+IA0KPiA+ICAgICBBZGRy ZXNzIGh0dHA6Ly9sb2NhbGhvc3QvfnJvYmVydC9wcmFjYS9tYWluL2luZGV4IGRvZXNuJ3Qgd29y ayAoNDA0KS4NCj4gYW5kIHRoZSBsb2dnZWQgZXJyb3IgbWVzc2FnZSB3YXM/IA0KPiANCj4gLS0g DQo+IC8vQWhvDQo=

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Angel@21:1/5 to Jivanmukta on Sat Apr 15 11:35:45 2023
    Check out:

    ⠀⠀⠀⠀⠀⠀⠀⠀kohtumispaik2.freehostpro.com/a.php ⠀⠀⠀⠀⠀⠀⠀⠀kohtumispaik3.66ghz.com/a.php ⠀⠀⠀⠀⠀⠀⠀⠀kohtumispaik4.medianewsonline.com/a.php ⠀⠀⠀⠀⠀⠀⠀⠀aaaaaaaaaaaaaaaar.medianewsonline.com/firstpage.php ⠀⠀⠀⠀⠀⠀⠀⠀themostconfortabletalkplace.medianewsonline.com/a.php


    See You on the addresses......


    On Wednesday, April 12, 2023 at 6:25:32 PM UTC+2, Jivanmukta wrote:
    I am trying to solve a problem of 404 in my COdeIgniter3 application.
    The problem occurs because of problem in core/Codeigniter.php:
    echo 'BEFORE call_user_func_array';
    var_dump($CI, $method, $params);
    call_user_func_array(array(&$CI, $method), $params);

    // Mark a benchmark end point
    $BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_end'); echo 'AFTER call_user_func_array ';

    BEFORE is displayed, AFTER is not displayed.
    var_dump displays object Main, method index, empty array params.
    I have a controller
    class Main extends MY_Controller {
    public function index() {
    ...

    In folder /home/robert/Projekty/praca/application/controllers I have
    file Main.php
    In file /home/robert/Projekty/praca/application/config/routes.php I have:

    $route['default_controller'] = 'main';
    $route['404_override'] = '';

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jivanmukta@21:1/5 to All on Thu Apr 27 16:38:00 2023
    W dniu 14.04.2023 o 11:24, Jivanmukta pisze:

        Address http://localhost/~robert/praca/employee/list_offers works fine.
        Address http://localhost/~robert/praca/main/index doesn't work (404).

    My mistake. I was calling 404 in my code. Sorry. Problem solved.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)