Go Back   Pligg Forum > Pligg Development > Bug Report
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-29-2005, 12:46 PM
tfeonline tfeonline is offline
New Pligger
 
Join Date: Dec 2005
Posts: 15
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Category Faults, Site Hangs and Errors when Submitting Stories

http://www.poptorrent.co.uk/info.php

I get the following errors on the Beta 4 installation:

* Categories links do not work (am using a modified htaccess file found on the old forum:

RewriteEngine on
RewriteRule ^story/([A-Za-z0-9-]+)/?$ story.php?id=$1 [L]
RewriteRule ^category/([A-Za-z0-9-]+)/?$ ?category=$1 [L]
RewriteRule ^category/([A-Za-z0-9-]+)/digg/?$ shakeit.php?category=$2 [L]
RewriteRule ^story/([A-Za-z0-9-]+)/edit/([0-9-]+)?$ edit.php?id=$1&commentid=$2 [L]

* When submitting a story, the following error messages appear after a looong delay getting to the second stage of a story submission:

Warning: fsockopen(): unable to connect to www.google.com:80 in /home/poptorrentuk/public_html/libs/link.php on line 454

Warning: fwrite(): supplied argument is not a valid stream resource in /home/poptorrentuk/public_html/libs/link.php on line 455

Warning: fclose(): supplied argument is not a valid stream resource in /home/poptorrentuk/public_html/libs/link.php on line 458

Pligg is installed here http://poptorrent.co.uk/index.php not at just http://www.poptorrent.co.uk. It is installed behind my blog.

Any help would be greatly appreciated!
Reply With Quote
Sponsored Links
Check out the New Templates at the Pligg Pro Shop.
  #2 (permalink)  
Old 12-29-2005, 01:26 PM
AshDigg's Avatar
AshDigg AshDigg is offline
Mayor of PliggVille
 
Join Date: Dec 2005
Posts: 1,623
Downloads: 34
Uploads: 10
Thanks: 237
Thanked 346 Times in 207 Posts
It appears your host has fsockopen disabled. You could ask them about it, but you may end up having to switch hosts.
Reply With Quote
  #3 (permalink)  
Old 12-29-2005, 01:28 PM
AshDigg's Avatar
AshDigg AshDigg is offline
Mayor of PliggVille
 
Join Date: Dec 2005
Posts: 1,623
Downloads: 34
Uploads: 10
Thanks: 237
Thanked 346 Times in 207 Posts
I did find this....

PHP 4.3.x
has known bugs with file handle and socket leak issues. This is true
up to PHP 4.3.3. The only solution for now is to revert to PHP 4.2.x.
I'm told that this issue only affects systems with 250+ SquirrelMail
sites.
Reply With Quote
  #4 (permalink)  
Old 12-30-2005, 03:04 AM
tfeonline tfeonline is offline
New Pligger
 
Join Date: Dec 2005
Posts: 15
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
http://poptorrent.co.uk/info.php

The problem with the fsock looks lke its going to be a bit of a problem. According to my hosts support forum "you need to ask support to open up the firewall for any URLs (domains) you might wish to access. You'll need to give them a valid reason too for why you need it."

This sounds unfeasible if the firewall has to be opened for each and every website pligg needs to visit. Is there any way of switching this feature off? I'm not even sure what pligg is doing when its going out like that. Forgive my ignorance please!

I'm still having problems with the categories. Story links work (http://poptorrent.co.uk/story/15/) but the categories don't (http://poptorrent.co.uk/category/1/)

Would this be a problem with my .htaccess file or do I need to edit a line somewhere and if so where?

Any help would be appreciated and thanks in advance!

Last edited by tfeonline : 12-30-2005 at 03:07 AM.
Reply With Quote
  #5 (permalink)  
Old 12-30-2005, 03:26 AM
tfeonline tfeonline is offline
New Pligger
 
Join Date: Dec 2005
Posts: 15
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Not sure if this is related to the fsock issue, but no links to the actual sites are produced in the main story links. They all link to http://www.poptorrent.co.uk/1
Reply With Quote
  #6 (permalink)  
Old 02-04-2006, 12:03 AM
LG-2 LG-2 is offline
New Pligger
 
Join Date: Feb 2006
Posts: 15
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 1 Time in 1 Post
I own a server and I dont have that disabled nor firewall... The error still shows up.

EDIT.

Ok I fixed it...

Quote:
As of PHP 4.3.0, if you have compiled in OpenSSL support, you may prefix the hostname with either 'ssl://' or 'tls://' to use an SSL or TLS client connection over TCP/IP to connect to the remote host.
In link.php it said SSL and many sites dont allow SSL connection.. so I changed it to tls and then it worked. Now, it does NOT work when its a broken link which is supposed to be obvious but I am suggesting a "else" or something that says the link is broken instead of a PHP error.

Last edited by LG-2 : 02-04-2006 at 12:13 AM.
Reply With Quote
  #7 (permalink)  
Old 02-05-2006, 09:28 PM
LG-2 LG-2 is offline
New Pligger
 
Join Date: Feb 2006
Posts: 15
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 1 Time in 1 Post
Well I did my best on this thing. Has it's pros and cons... Pros are, gets rid of annoying errors and doesnt allow script to execute if bad URL. cons, whole page stops loading if the URL is broken or invalid. (Template stops loading)

Line 483 to 485

Quote:
error_reporting(E_ERROR);
// fetch
$this->_fp = fsockopen(($this->_protocol == 'https' ? 'tls://' : '') . $this->_host, $this->_port) or die("Invalid URL. Please go back and enter a non-broken and valid URL.");
Reply With Quote
  #8 (permalink)  
Old 02-05-2006, 09:59 PM
AshDigg's Avatar
AshDigg AshDigg is offline
Mayor of PliggVille
 
Join Date: Dec 2005
Posts: 1,623
Downloads: 34
Uploads: 10
Thanks: 237
Thanked 346 Times in 207 Posts
Ahhh, thanks!

I was working on it a bit, but was having trouble. I was missing the "error_reporting(E_ERROR);" part.
__________________
- Ash
Reply With Quote
  #9 (permalink)  
Old 02-06-2006, 06:07 AM
LG-2 LG-2 is offline
New Pligger
 
Join Date: Feb 2006
Posts: 15
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 1 Time in 1 Post
Quote:
Originally Posted by AshDigg
Ahhh, thanks!

I was working on it a bit, but was having trouble. I was missing the "error_reporting(E_ERROR);" part.
No problem :-D. Yea that error reporting thing is a great error handler since the normal error it outputs is a "cant find website" is not worth to display since is not an error on the code itself.
Reply With Quote
Reply



Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks Enabled by vBSEO 3.0.0