• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
multiple function launching when URL has more than 2 segments (!!!)

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
function xyz(){
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)


[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.

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?


[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.

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.


[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.

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?

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

sure. but with that issue CI cannot be qualifyed as safe framework.

thanks anyway kid.

[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...

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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