Welcome Guest, Not a member yet? Register   Sign In
multiple function launching when URL has more than 2 segments (!!!)
#1

[eluser]dmzSmile[/eluser]
hi guys, anyone can tell me why CI is acting wrong, when in url recives more than 2 segments?

part of: controllername.php -sample function
Code:
function xyz(){
     $this->load->view('header');
     $this->load->view('footer');
mail('[email protected]',"",""); //debugging purpose
}

URL: www.somwhere.com/controllername/xyz/anything


when CI gets this url is fireing the xyz() function 6 times.

without the 3rd segment (in this case "/anything") works as expected.

so what is going on there?
i need to pass one variable to my function to store in db, but it is impossible when the function is fired so many times (6 records in db, 6 emails)

regards
#2

[eluser]Colin Williams[/eluser]
You probably have 5 items on those pages where the reference is bad and so CI handles the response (like if it gets malformed paths to images/js/css, etc).

So you're seeing multiple responses because there are multiple requests. To solve, be sure all your images, css files and the like are being served correctly.
#3

[eluser]dmzSmile[/eluser]
well, thank you Collin, you're right
i had 5 images failed to load.

now, is there any way to prevent that kind of behavior of CI in cases like this?
CI is putting the value of "img" in the variable one need to store in db. ANY VARIABLE!!!
i think that's quite important think to fix.

anybody knows if kohana also interits this bug?

regards
#4

[eluser]Colin Williams[/eluser]
It can't really be considered a bug. When you think there is a bug, you need to show code that reproduces the error.
#5

[eluser]dmzSmile[/eluser]
well yes,
something however is wrong there.

i refer that ci somehow is filling random variables with rare values. it's quite easy to provoke this situation, and perhaps with some skills get buffer overflow.


cheers
dmz
#6

[eluser]Colin Williams[/eluser]
Quote:i refer that ci somehow is filling random variables with rare values

Well I asked you to share some code, but that response definitely clears it up. Bye bye now.
#7

[eluser]dmzSmile[/eluser]
bye bye. you stay with CI having problem. no code will be post. i just dont even know where to look for it.

Why CI is accessing variables without any permission? or it is PHP?
#8

[eluser]Colin Williams[/eluser]
I thought your only problem was with referencing images. Fix the references, fix the problem.
#9

[eluser]dmzSmile[/eluser]
sure. but with that issue CI cannot be qualifyed as safe framework.

thanks anyway kid.
dmz.
#10

[eluser]Colin Williams[/eluser]
Alright, dmz. I'd be happy for you to find another framework. Look into CakePHP, Yii, and Symfony. I suppose one of them has discovered a way to detect if they are being referenced by an img tag and cease operation... Not sure how you would serve dynamic images in that case though...




Theme © iAndrew 2016 - Forum software by © MyBB