stevehof
17th of January 2005 (Mon), 18:26
Pekka,
I tried to email you this but the email was returned as non-deliverable.
I and Tony Gillilan have had double the bandwidth usage since upgrading to 1.5RC4. This anomaly started the exact day of the upgrades. We are both with the same hosting company. The tech guy at our hosting company http://www.networkeleven.com looked into your code and you can read the results of his investigations below. If you’d like to contact him, use support@networkeleven.com. I’m not saying he’s correct in his assumptions but it looks reasonable to me…I'd be very interested to hear your comments on this. The tech support person worked with your code and came up with the following:
""If you want proof that the script is causing the double bandwidth hit from the site's ip, just go here:
http://www.sphoto.com/test-photo.php?photo=825
I commented out the line that pieces together all of the final HTML and displays it - so if you go to view source it is a completely blank page and the only request made for anything on the page is this:
4.27.236.202 - - [17/Jan/2005:11:44:27 -0800] "GET /test-photo.php?photo=825 HTTP/1.1" 200 39 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
However, these two still show up at the exact same time:
66.192.180.232 - - [17/Jan/2005:11:44:27 -0800] "GET /medium/poppiespurpleflwrs7311-419.jpg HTTP/1.0" 200 123148 "-" "-"
66.192.180.232 - - [17/Jan/2005:11:44:27 -0800] "GET /medium/poppiespurpleflwrs7311-419.jpg HTTP/1.0" 200 123148 "-" "-"
(((above is my own fixed IP from my site's access logs - Steve)))
I'm going to continue looking into the script to see if I can find line is actually grabbing the images to create those lines, but hopefully that will at least put to ease any concerns that there is something wrong with the server, considering the page that someone is being displayed there and grabbed by the user's browser doesn't even have a reference to the image showing up in the access logs that is getting hit by the server's ip.
Furthermore, if I then comment out the entire section of php code that is being run by the page, the double requests stop. I will reply again when I find out what is causing it.
The first instance of the 2 accesses by the script is by the calling of the function: ee_checkthumb(0); on line 2086
ee_checkthumb is defined in file fetchsettings.php at line 1299, the culprit is line 1304:
$check = @fopen($url,"r");
At this point it's not hard to see where the problem is, they are calling fopen() using a url to the image rather than a file path, so it is creating a call to the web server.
The second instance is by line 2134 which states:
include($toroot . "viewerstyles/VIEWERSTYLE_default.php");
In order to investiage this further I created a copy of VIEWERSTYLE_default.php named test-VIEWERSTYLE_default.php
Within this file it is caused by line 17 which states:
$sizetag = @getimagesize($url,$info);
Again as above, they are calling a function by accessing the image using the url to the image and not the file path so it is creating a call to the web server.
So there are the two requests that get generated each time a request is served and why it is made. I hope that at least alleviates any concern that there is something wrong with the web server, it is quite obviously an oversight by the programmer. If I were you I would send the above to the programmer and ask them to fix it, it's really not that hard of a fix but I will not go so far as fixing their code for them after just spending over an hour investigating the above.
Just to be clear, where I referenced line 2086 and line 2134 where the calls originated this was in the file photo.php - the other lines I mentioned are in the respective files that I stated.
--
Steven
Network Eleven, LLC
http://www.networkeleven.com""
I tried to email you this but the email was returned as non-deliverable.
I and Tony Gillilan have had double the bandwidth usage since upgrading to 1.5RC4. This anomaly started the exact day of the upgrades. We are both with the same hosting company. The tech guy at our hosting company http://www.networkeleven.com looked into your code and you can read the results of his investigations below. If you’d like to contact him, use support@networkeleven.com. I’m not saying he’s correct in his assumptions but it looks reasonable to me…I'd be very interested to hear your comments on this. The tech support person worked with your code and came up with the following:
""If you want proof that the script is causing the double bandwidth hit from the site's ip, just go here:
http://www.sphoto.com/test-photo.php?photo=825
I commented out the line that pieces together all of the final HTML and displays it - so if you go to view source it is a completely blank page and the only request made for anything on the page is this:
4.27.236.202 - - [17/Jan/2005:11:44:27 -0800] "GET /test-photo.php?photo=825 HTTP/1.1" 200 39 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
However, these two still show up at the exact same time:
66.192.180.232 - - [17/Jan/2005:11:44:27 -0800] "GET /medium/poppiespurpleflwrs7311-419.jpg HTTP/1.0" 200 123148 "-" "-"
66.192.180.232 - - [17/Jan/2005:11:44:27 -0800] "GET /medium/poppiespurpleflwrs7311-419.jpg HTTP/1.0" 200 123148 "-" "-"
(((above is my own fixed IP from my site's access logs - Steve)))
I'm going to continue looking into the script to see if I can find line is actually grabbing the images to create those lines, but hopefully that will at least put to ease any concerns that there is something wrong with the server, considering the page that someone is being displayed there and grabbed by the user's browser doesn't even have a reference to the image showing up in the access logs that is getting hit by the server's ip.
Furthermore, if I then comment out the entire section of php code that is being run by the page, the double requests stop. I will reply again when I find out what is causing it.
The first instance of the 2 accesses by the script is by the calling of the function: ee_checkthumb(0); on line 2086
ee_checkthumb is defined in file fetchsettings.php at line 1299, the culprit is line 1304:
$check = @fopen($url,"r");
At this point it's not hard to see where the problem is, they are calling fopen() using a url to the image rather than a file path, so it is creating a call to the web server.
The second instance is by line 2134 which states:
include($toroot . "viewerstyles/VIEWERSTYLE_default.php");
In order to investiage this further I created a copy of VIEWERSTYLE_default.php named test-VIEWERSTYLE_default.php
Within this file it is caused by line 17 which states:
$sizetag = @getimagesize($url,$info);
Again as above, they are calling a function by accessing the image using the url to the image and not the file path so it is creating a call to the web server.
So there are the two requests that get generated each time a request is served and why it is made. I hope that at least alleviates any concern that there is something wrong with the web server, it is quite obviously an oversight by the programmer. If I were you I would send the above to the programmer and ask them to fix it, it's really not that hard of a fix but I will not go so far as fixing their code for them after just spending over an hour investigating the above.
Just to be clear, where I referenced line 2086 and line 2134 where the calls originated this was in the file photo.php - the other lines I mentioned are in the respective files that I stated.
--
Steven
Network Eleven, LLC
http://www.networkeleven.com""