Page 1 of 1

Warning: parse_url(/http:/domainname.com/) [function.parse-u

PostPosted: May 25th, 2011, 12:33 am
by lordjoshua
Hi - I am using s2member, and I am getting the following error on any post (pages are fine, just posts):

Warning: parse_url(/http:/domainname.com/) [function.parse-url]: Unable to parse URL in /home/content/29/4848629/html/domainname.com/wp-content/plugins/s2member/includes/classes/systematics-sp.inc.php on line 50

The error appears in the (s2) column and also under the ID. Please help! (I have modified the actual domain name to say "domainname" instead of the actual domain because the owner doesn't allow me to publish it here. (sorry.)

After publishing the post, the permalink is automatically:

Permalink: http://domainname.com/http:/domainname.com/

Does anyone know why this is happening to me?

Re: Warning: parse_url(/http:/domainname.com/) [function.par

PostPosted: May 25th, 2011, 1:18 am
by Cristián Lávaque
That's weird, it's the first time I see that error mentioned.

Maybe re-installing the plugin does the trick. Follow this guide viewtopic.php?f=36&t=247

Re: Warning: parse_url(/http:/domainname.com/) [function.par

PostPosted: May 25th, 2011, 1:20 pm
by lordjoshua
So it turns out that this error appeared because of the way the admin set up the permalink.

The admin put in the following: http://domainname.com/ when the admin should have done something different.... it looks like it made s2member go into some kind of logic loop. perhaps you can benefit from learning about this bug which happens if someone puts in the "wrong" thing as the permalink...

Re: Warning: parse_url(/http:/domainname.com/) [function.par

PostPosted: May 25th, 2011, 7:19 pm
by Cristián Lávaque
Oh ok. So he entered the blog URL instead of something like /%year%/%monthnum%/%day%/%postname%/? Got it.

Thanks for reporting it! I'll let Jason know about it, although it seems a problem with WordPress rather than s2Member.

Re: Warning: parse_url(/http:/domainname.com/) [function.par

PostPosted: May 25th, 2011, 7:25 pm
by Jason Caldwell
Thanks. The development release suppresses errors with parse_url(), using @parse_url(). FYI: PHP v5.3 now supresses warnings generated by @parse_url() automatically because many people have complained about this. The function really should fail silently, but in PHP 5.2.x it does not.

Anyway, thanks for reporting this. Much appreciated!