Welcome Guest, Not a member yet? Register   Sign In
Ci execute 2 times script in one request !
#1

[eluser]DesT-GT[/eluser]
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 Wink !
#2

[eluser]wiredesignz[/eluser]
Using .htaccess?

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

[eluser]DesT-GT[/eluser]
Yes, i use .htaccess for URI (ex: http://localhost/xslsv2/standings/overall).

My .htaccess :

Code:
<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

[eluser]John_Betong[/eluser]
&nbsp;
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".
&nbsp;
&nbsp;
&nbsp;
#5

[eluser]tomcode[/eluser]
Try without .htaccess, then You're fixed about that one
#6

[eluser]Colin Williams[/eluser]
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

[eluser]John_Betong[/eluser]
&nbsp;
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.
&nbsp;
&nbsp;
&nbsp;
#8

[eluser]DesT-GT[/eluser]
Hello,


You were right John Wink

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


Thancks !
#9

[eluser]John_Betong[/eluser]
[quote author="DesT-GT" date="1257441311"]Hello,


You were right John Wink

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


Thancks ![/quote]
&nbsp;
&nbsp;
I am pleased you manage to find the error. Just move on now to the next...
&nbsp;
&nbsp;
&nbsp;




Theme © iAndrew 2016 - Forum software by © MyBB