ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Ci execute 2 times script in one request !

October 31, 2009 9:44am

Subscribe [3]
  • #1 / Oct 31, 2009 9:44am

    DesT-GT

    2 posts

    Hello,

    After checking log, i see CI execute 2 times my script in one request !?!

    Check my log (this log is generated in one page request) :

    DEBUG - 31/10/2009 13:48:51—> Config Class Initialized
    DEBUG - 31/10/2009 13:48:51—> Hooks Class Initialized
    DEBUG - 31/10/2009 13:48:51—> URI Class Initialized
    DEBUG - 31/10/2009 13:48:51—> Router Class Initialized
    DEBUG - 31/10/2009 13:48:51—> Output Class Initialized
    DEBUG - 31/10/2009 13:48:51—> Input Class Initialized
    .....
    DEBUG - 31/10/2009 13:48:53—> File loaded: application/views/template/forms/radio_obj.php
    DEBUG - 31/10/2009 13:48:53—> File loaded: application/views/template/forms/radio_obj.php
    DEBUG - 31/10/2009 13:48:53—> File loaded: application/views/template/forms/radio.php
    DEBUG - 31/10/2009 13:48:53—> File loaded: application/views/template/forms/select.php
    DEBUG - 31/10/2009 13:48:53—> File loaded: application/views/template/forms/button.php
    DEBUG - 31/10/2009 13:48:53—> File loaded: application/views/template.php
    DEBUG - 31/10/2009 13:48:53—> Final output sent to browser
    DEBUG - 31/10/2009 13:48:53—> Total execution time: 1.9616
    DEBUG - 31/10/2009 13:48:53—> Config Class Initialized
    DEBUG - 31/10/2009 13:48:53—> Hooks Class Initialized
    DEBUG - 31/10/2009 13:48:53—> URI Class Initialized
    DEBUG - 31/10/2009 13:48:53—> No URI present. Default controller set.
    DEBUG - 31/10/2009 13:48:53—> Router Class Initialized
    DEBUG - 31/10/2009 13:48:53—> Output Class Initialized
    DEBUG - 31/10/2009 13:48:53—> Input Class Initialized
    .....
    DEBUG - 31/10/2009 13:48:57—> File loaded: application/views/template/forms/radio_obj.php
    DEBUG - 31/10/2009 13:48:57—> File loaded: application/views/template/forms/radio_obj.php
    DEBUG - 31/10/2009 13:48:57—> File loaded: application/views/template/forms/radio.php
    DEBUG - 31/10/2009 13:48:57—> File loaded: application/views/template/forms/select.php
    DEBUG - 31/10/2009 13:48:57—> File loaded: application/views/template/forms/button.php
    DEBUG - 31/10/2009 13:48:57—> File loaded: application/views/template.php
    DEBUG - 31/10/2009 13:48:57—> Final output sent to browser
    DEBUG - 31/10/2009 13:48:57—> Total execution time: 3.9604

    How its possible ? (generated HTML ok // all ajax request off)

    Thx 😉 !

  • #2 / Oct 31, 2009 9:57am

    wiredesignz's avatar

    wiredesignz

    2882 posts

    Using .htaccess?

    Browser requests for missing asset files will be passed back to your application.

  • #3 / Oct 31, 2009 10:24am

    DesT-GT

    2 posts

    Yes, i use .htaccess for URI (ex: http://localhost/xslsv2/standings/overall).

    My .htaccess :

    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /xslsv2/
        
        #Removes access to the system folder by users.
        #Additionally this will allow you to create a System.php controller,
        #previously this would not have been possible.
        #'system' can be replaced if you have renamed your system folder.
        RewriteCond %{REQUEST_URI} ^system.*
        RewriteRule ^(.*)$ index.php/$1 [L]
    
        #Checks to see if the user is attempting to access a valid file,
        #such as an image or css document, if this isn't true it sends the  
        #request to index.php
        RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php/$1 [L,QSA]
    </IfModule>
    
    <IfModule !mod_rewrite.c>
        # If we don't have mod_rewrite installed, all 404's
        # can be sent to index.php, and everything works as normal.
        # Submitted by: ElliotHaughin
    
        ErrorDocument 404 /index.php
    </IfModule>

    i hate .htaccess lol !

  • #4 / Oct 31, 2009 12:17pm

    John_Betong's avatar

    John_Betong

    690 posts

     
    I have experienced similar problems and found that it is due to an error in the code which is not showing in the errorlog.

    The way get to rid of this is to rem out each section of code until the problem disappears, then re-introduce the code and then look at the code to tty and see where the problem is.

    One problem I had which produced the error was a missing “favicon.ico”.
     
     
     

  • #5 / Oct 31, 2009 4:13pm

    tomcode

    654 posts

    Try without .htaccess, then You’re fixed about that one

  • #6 / Oct 31, 2009 7:15pm

    Colin Williams's avatar

    Colin Williams

    2601 posts

    Let me restate wiredesignz: Browser requests for missing asset files will be passed back to your application.

    Have you looked for such a thing yet. No need to dive into code before doing this.

  • #7 / Nov 02, 2009 3:11am

    John_Betong's avatar

    John_Betong

    690 posts

     
    I have just tracked down the problem once again. This time it was due to a missing background-url image in the CSS file.

    The CodeIgniter error log, PHP error log, Apache error log and none were showing any problems.
     
     
     

  • #8 / Nov 05, 2009 7:15am

    DesT-GT

    2 posts

    Hello,


    You were right John 😉

    Favicon doesnt found ! (finded error in apache error log).


    Thancks !

  • #9 / Nov 05, 2009 8:23am

    John_Betong's avatar

    John_Betong

    690 posts

    Hello,


    You were right John 😉

    Favicon doesnt found ! (finded error in apache error log).


    Thancks !

     
     
    I am pleased you manage to find the error. Just move on now to the next…
     
     
     

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases