Nope, that didn't work either. I still ended up with a 0 byte file and then a few minutes later my Apache crashed from the load.
This happens ONLY when it does it automatically every 12 hours. When I do it manually via the admin interface, it works every time and only takes a second to complete.
Well, at links.webmastersite.net I see I can't get that far. On attempting to it in the admin panel, clicking submit yields Warning: file_get_contents(links.webmastersite.net/exp...?number[1]=8&field[1]=rand()& ascdesc[1]=descending&type[1]=links): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /home/wmaster/public_html/links/filefunctions.php on line 126
Which is familiar as something caused by &s or other such character in the url that was fixed a few weeks ago with one of these static things, maybe that was the javascript export one.
Sure you haven't been surpressing errors or something? But you say it works from the admin panel, anyhow, which it doesn't for me.
Seems like it's working on your end. Would size of the database be a possible factor? Although it does work when I do it from the admin panel, so not sure that would affect it.
It reminds me of when a file is opened and not closed properly, which causes it to end up as a 0 byte file. Maybe something like that is going on because of the amount of traffic hitting the page when it's running that routine?
Just checked your test.js file and all it has in it is "document.write('');" Not sure if that's due to there being no data in this specific toplist, or some error. NOTE: checked about 12 hours later and now it looks normal. My static html files would do the same - sometimes work, sometimes not.
However, this is still different from my problem, which leaves me with a 0 byte file instead of an empty list.
An empty file would mean the server had a hiccup at the time it tried to grab, I guess.
I doubt directory size would directly affect it, but perhaps lots of traffic and a slightly slow site. I suppose I could try it on my forums where I have more traffic. But from the nature of the errors, my guess is that it's simply too slow and when it comes to creating static files there's not much that can be done about that since it has to grab a URL.
The only difference I can see is that the manual is about the only thing being done in the page load, while the automatic executes along with the rendering of the possibly-complex index.php.
Oh well, I can live without it. I've just been manually pasting in the url information into the static html page, running the routine, then taking out the info I put in, and doing that every couple of days.
Adam
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Random Links Malfunction
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
Nope, that didn't work either. I still ended up with a 0 byte file and then a few minutes later my Apache crashed from the load.
This happens ONLY when it does it automatically every 12 hours. When I do it manually via the admin interface, it works every time and only takes a second to complete.
Adam
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Well, at links.webmastersite.net I see I can't get that far.
On attempting to it in the admin panel, clicking submit yields
Warning: file_get_contents(links.webmastersite.net/exp...?number[1]=8&field[1]=rand()& ascdesc[1]=descending&type[1]=links): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /home/wmaster/public_html/links/filefunctions.php on line 126
Which is familiar as something caused by &s or other such character in the url that was fixed a few weeks ago with one of these static things, maybe that was the javascript export one.
Sure you haven't been surpressing errors or something? But you say it works from the admin panel, anyhow, which it doesn't for me.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Hm, my problems seem to have been that a space ended up in the url by copy and paste from the forum. So, I'm now generating
links.webmastersite.net/exp...?number[1]=8&field[1]=rand()&ascdesc[1]=descending&type[1]=links
at
http://links.webmastersite.net/javascript/test.js
Check back in 12 hours.
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
Seems like it's working on your end. Would size of the database be a possible factor? Although it does work when I do it from the admin panel, so not sure that would affect it.
It reminds me of when a file is opened and not closed properly, which causes it to end up as a 0 byte file. Maybe something like that is going on because of the amount of traffic hitting the page when it's running that routine?
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
Paul,
Just checked your test.js file and all it has in it is "document.write('');" Not sure if that's due to there being no data in this specific toplist, or some error. NOTE: checked about 12 hours later and now it looks normal. My static html files would do the same - sometimes work, sometimes not.
However, this is still different from my problem, which leaves me with a 0 byte file instead of an empty list.
Adam
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
An empty file would mean the server had a hiccup at the time it tried to grab, I guess.
I doubt directory size would directly affect it, but perhaps lots of traffic and a slightly slow site. I suppose I could try it on my forums where I have more traffic. But from the nature of the errors, my guess is that it's simply too slow and when it comes to creating static files there's not much that can be done about that since it has to grab a URL.
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
Why would it always work with the manual and not with the automatic. Is there a difference between the two routines that would cause this?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
The only difference I can see is that the manual is about the only thing being done in the page load, while the automatic executes along with the rendering of the possibly-complex index.php.
Forum Regular
Usergroup: Customer
Joined: Jun 02, 2004
Total Topics: 32
Total Comments: 142
Oh well, I can live without it. I've just been manually pasting in the url information into the static html page, running the routine, then taking out the info I put in, and doing that every couple of days.
Adam