xsixer Posted March 30, 2009 Share Posted March 30, 2009 So, i have 2 scripts, one is a script which generates an image and outputs it, another one does little stuff and before the script there is html like this: <img src="another_script.php" attr="" attr2="... /> Everything is OKAY, the image is being generated and dislpayed, but there is a question, in that script which generates an image there is mysql insert statement, which is executed 2-3 times, but is written once and believe me, not in the loop. I've checked apache access logs, and i can see that another_script.php is tryed to get 2-3 times via GET. I can't understand why. It's really a strange problem for me at least Link to comment https://forums.phpfreaks.com/topic/151826-why-does-the-script-call-another-script-a-few-times/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 30, 2009 Share Posted March 30, 2009 Browsers can request pages and images on those pages multiple times and some URL rewriting and redirection will cause browsers to request pages and images on those pages multiple times. What browser are you using and are you doing an URL rewiring or redirection? Link to comment https://forums.phpfreaks.com/topic/151826-why-does-the-script-call-another-script-a-few-times/#findComment-797228 Share on other sites More sharing options...
xsixer Posted March 31, 2009 Author Share Posted March 31, 2009 No, i am not doing those things at all . Btw interesting fact is that, another script outputs the text and writes it into the database. The script is called 2-3 times by the browser, but i still see the very first image, and i know that because i can see it's text in the DB, this is so strange. Link to comment https://forums.phpfreaks.com/topic/151826-why-does-the-script-call-another-script-a-few-times/#findComment-797553 Share on other sites More sharing options...
shortj75 Posted March 31, 2009 Share Posted March 31, 2009 if you post the script might help so ppl can see what they are working with and see if the prob might be in the script and if we can see it we could figure it out quicker sry if sounds rude not trying to be Link to comment https://forums.phpfreaks.com/topic/151826-why-does-the-script-call-another-script-a-few-times/#findComment-797560 Share on other sites More sharing options...
xsixer Posted March 31, 2009 Author Share Posted March 31, 2009 Here is captcha/image generator http://rafb.net/p/fa0Z3268.html and here is the main script http://rafb.net/p/7SVAEb59.html . All it works, except that mysql statement in image generator is executed 2-3 times, and with live-headers addon on firefox i can see that image generator script is called 2-3 times. Except that it displays the very first image. Hope the source code will be helpful, cause it's really a pain in the neck when you don't know why such a thing happens Link to comment https://forums.phpfreaks.com/topic/151826-why-does-the-script-call-another-script-a-few-times/#findComment-797578 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.