Dead Link checking error/blank pages
Version: 5.1.10 beta 2
URL:
|
Jenny
Forum Regular Usergroup: Customer Joined: May 11, 2003 Total Topics: 64 Total Posts: 199 |
Posted 10/28/09 - 2:50 AM:
I found some small issues: when running the dead link check I get a couple of little textboxes with these error messages: Error occurred at http://link-lounge.com/thelinks/ad...mp;sendemails={EMAILS}&amp;amp;amp;checknonrecip={CHECKNONRECIP}&amp;amp;amp;autodelete= on 2009-10-28 10:43:02. Error text: Error #2: 'file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: Couldn't resolve host name' in /home/linkloun/public_html/thelinks/includes/filefunctions.php on line 435. Step 1 of backtrace: File: /home/linkloun/public_html/thelinks/includes/filefunctions.php Line: 435 Function: file_get_contents Arguments: http://www.stephen-dorff.net Resource id #129 Step 2 of backtrace: File: /home/linkloun/public_html/thelinks/admin/linkchecks.php Line: 242 Function: geturl Arguments: http://www.stephen-dorff.net and Error occurred at http://link-lounge.com/thelinks/ad...mp;sendemails={EMAILS}&amp;amp;amp;checknonrecip={CHECKNONRECIP}&amp;amp;amp;autodelete= on 2009-10-28 10:43:02. Error text: Error #2: 'file_get_contents(http://www.stephen-dorff.net) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: operation failed' in /home/linkloun/public_html/thelinks/includes/filefunctions.php on line 435. Step 1 of backtrace: File: /home/linkloun/public_html/thelinks/includes/filefunctions.php Line: 435 Function: file_get_contents Arguments: http://www.stephen-dorff.net Resource id #129 Step 2 of backtrace: File: /home/linkloun/public_html/thelinks/admin/linkchecks.php Line: 242 Function: geturl Arguments: http://www.stephen-dorff.net However the function itself seems to run correctly and some dead links are found and noted. In addition I encountered some blank category pages. I have had this problem before and I was able to fix it by going through every single link and deleting the descriptions although I didn't see anything special about the description text that caused this problem. Since I had the same thing happening again this morning I though I should post the debug output for you: Query 7:[/b] SHOW COLUMNS FROM wsnlinksclone1_members ETA: it looks like a simple ' (as in Jenny's) in the description is screwing it up. As soon as I take that out the page comes back. Edited by Jenny on 10/28/09 - 6:38 AM |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 10/28/09 - 10:20 AM:
A ' doesn't affect descriptions, but special Microsoft characters that look much like ' have been known to mess things up: http://bugs.mysql.com/bug.php?id=21972 The bug report says "this happens if i'm using charset=latin1 in the connectionstring, if set it to utf8 it works fine." WSN recommends utf8 for everyone now, and I believe this was one of the reasons. Are you using utf8? |
|
Jenny
Forum Regular Usergroup: Customer Joined: May 11, 2003 Total Topics: 64 Total Posts: 199 |
Posted 10/28/09 - 10:46 AM:
Paul wrote: A ' doesn't affect descriptions, but special Microsoft characters that look much like ' have been known to mess things up: http://bugs.mysql.com/bug.php?id=21972 The bug report says "this happens if i'm using charset=latin1 in the connectionstring, if set it to utf8 it works fine." WSN recommends utf8 for everyone now, and I believe this was one of the reasons. Are you using utf8? yes, it says utf8. I don't believe I changed this part from the original WSN template. I actually tested this to make sure it's not a weird character that I copied over from a site - the error occurs when I type the ' on my keyboard. |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 10/29/09 - 4:08 PM:
Can you give me more detail? Here's a screenshot of what I thought you meant but it's fine so maybe you mean something totally different... |
|
Jenny
Forum Regular Usergroup: Customer Joined: May 11, 2003 Total Topics: 64 Total Posts: 199 |
Posted 10/30/09 - 1:27 AM:
okay fine, maybe it's just my site again and I screwed up some settings somewhere, or maybe it had to do with the descriptions being pulled from the meta tags... I'll keep an eye out for more cases like this and let you know. |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 10/30/09 - 9:15 PM:
Jenny wrote: maybe it had to do with the descriptions being pulled from the meta tags. Could. Can you give an exact procedure? Tell me whether you're using the plain or WYSIWYG editor as well. |
|
Jenny
Forum Regular Usergroup: Customer Joined: May 11, 2003 Total Topics: 64 Total Posts: 199 |
Posted 01/19/10 - 10:38 AM:
Now we're a few upgrades further down the road (5.1.19) and on a different server (I don't have to manually tweak .htaccess after each setting change anymore *yay*), but this problem just re-appeared. The pages are not blank anymore, but produce some nice error messages and hide the link descriptions. I didn't fix it so you can see it: http://link-lounge.com/thelinks/in...om=yes&TID=custom-newlinks You can see the script is complaining about this description: "A female blogger's take on the geeky. Videogames, software, technology, online media and more." As soon as I replace the ' in blogger's with a ยด the error is gone. When I put it back it's there again. And this is a description that was added by the link owner. I am using the plain editor, WYSIWYG isn't activated. |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 01/21/10 - 4:18 AM:
You have some sort of template php that uses single quotes, and therefore breaks when there's a single quote in the text it's checking. Tell me what you have in your template below the </table> that would be showing up as this: <? echo substr('A female blogger's take on the geeky. Videogames, software, technology, online media and more.', 0, 150); ?> This is not part of the standard templates, so I need to know what you're doing. Edited by Paul on 01/21/10 - 4:20 AM |
|
Jenny
Forum Regular Usergroup: Customer Joined: May 11, 2003 Total Topics: 64 Total Posts: 199 |
Posted 01/21/10 - 9:15 AM:
Now that you're actually pointing it out I feel a bit stupid. It's this line: echo substr('A female blogger's take on the geeky. ...', 0, 150); Obviously the ' in blogger's is breaking it. I just don't know what to replace it with, since both ' and " appear in descriptions. Or is there another way to simply limit the output of the description to 150 characters? Of course I set the limit to the text field on the submission and edit pages, but it seems there are ways around it, like copy&paste the text or use the Meta Tag button, and I get a lot of descriptions that are way longer than this. I thought this was an easy way out... ETA: I just read about the summary switch - that should work, right? I turned it on and set the limit to 150. As no link actually has a summary the descriptions should be limited to 150, no? Edited by Jenny on 01/23/10 - 1:40 PM |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 01/29/10 - 12:20 PM:
Don't use PHP for that, use {LINKDESCRIPTION[150]} http://scripts.webmastersite.net/w.../listing-variables-10.html |
Sorry, you don't have permission to post. Log in, or register if you haven't yet.

Print