L#1847: Unable to parse URL error

Discussions about the phpBB3 Forum. How to get the best from this powerful script.
Note that there is no official support for phpBB3 here, a place to share more than to ask for.

Moderator: Moderators

L#1847: Unable to parse URL error

Postby Sebastiaan » Thu Jul 31, 2008 12:02 pm

Hello, i have a problem when users login on the forum, they get this error on the very top of the website:

Code: Select all
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 1847: parse_url(http:///ps3life.nl?sid=2fda890d00fafdd3af2c91b184cfec9e) [function.parse-url]: Unable to parse URL


I looked at the line, but i cannot see the fault there, i think somewhere (maybe during installation) something is wrong, can you help me fix this?
Last edited by Sebastiaan on Thu Jul 31, 2008 2:50 pm, edited 1 time in total.
Sebastiaan
 
Posts: 2
Joined: Thu Jul 31, 2008 11:56 am

Advertisement

Postby SeO » Thu Jul 31, 2008 2:21 pm

This means that redirect() was called with a malformed url.
As the error seems related to this line in function.php :

Code: Select all
   // Determine which type of redirect we need to handle...
   $url_parts = parse_url($url);


or this one maybe, still in the redirect() code :

Code: Select all
   // Now, also check the protocol and for a valid url the last time...
   $allowed_protocols = array('http', 'https', 'ftp', 'ftps');
   $url_parts = parse_url($url);


It's hard to tell froms where this came from, you could try to activate debug in config.php, replace :
Code: Select all
// @define('DEBUG', true);
// @define('DEBUG_EXTRA', true);


with :
Code: Select all
@define('DEBUG', true);
@define('DEBUG_EXTRA', true);


To see if logged as admin you can find out more about this error with the back trace (try to login using a bogus user account).

You can safely replace :

Code: Select all
   // Determine which type of redirect we need to handle...
   $url_parts = parse_url($url);


with :
Code: Select all
   // Determine which type of redirect we need to handle...
   $url_parts = @parse_url($url);


To shut down the error (if from there, but I think so), buggy user wil just be redirected to forum index when the error occurs, instead of the eventually different bogus url.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Sebastiaan » Thu Jul 31, 2008 2:49 pm

Thanks for the fast reply.

The codes you showed me look the same in my file, so i dont see a problem there...

I've checked all the lines that this mod adds, and i couldn't find a difference anywhere.

I have used the @ sign in front of the function as a temporary fix for now, if anyone figures out this problem after all id be happy to hear the solution.

Thanks again for the support :)
Sebastiaan
 
Posts: 2
Joined: Thu Jul 31, 2008 11:56 am

Postby SeO » Thu Jul 31, 2008 3:43 pm

Nothing showed up with debug on ?

I don't think this can come from url rewriting if this is what you are mentioning.

Other mods using redirect() could.
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm


Return to phpBB Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Baidu [Spider] and 46 guests