Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Location
    California
    Posts
    511
    Thanks
    1
    Thanked 1 Time in 1 Post

    Integrating PhpBB Login but am recieving a parse erorr?

    Hi,
    Ive been working on integrating the phpBB login and registration into my own site, so far ive gotten the registration to work, it even adds the useres to the phpbb database. However the login code is giving me some problems ive followed the tutorial found Here and have included it in my pages, the problem (error can be seen Here is is that (i think) it doesnt like being "pieced" together using the phpinclude function so its thinkin that the < in html isnt supposed ot be there, is there a way to gt around this besides maybe just making the pages one single file instead of 3 (left, middle and right)? Im fairly new to php so i dont know what the deal with it not accepting it is so any help would be appreciated.

    Site Code:
    Attached Files Attached Files
    When traveling down the road of life, Try not to drag your face in the gravel.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Ugh, I would have used templates myself, but your errors are here:
    In left.php on line 39 you have:
    PHP Code:
    include($phpbb_root_path 'includes/page_header.'.$phpEx); 
    if (
    $isauth == '1'

    Change this to:
    PHP Code:
    include($phpbb_root_path 'includes/page_header.'.$phpEx); 
    if (
    $isauth == '1'

    ?> 
    In left.php on approx line 128 you have:
    PHP Code:
    <td class="sideboxback" width="178" height="50" alt=""><center>
    <?php
    Change this to:
    PHP Code:
    <td class="sideboxback" width="178" height="50" alt=""><center>
    <?php
         
    }
    }
    Then it should work for you. Unfortunatly I am missing the files required for the functions, so I now get a session_pagestart() error, but assuming that is user defined I'm not really concerned about that ATM.

    You also have an error in your style.php file. You have not defined a start for php, which I assume you want directly after the </html> section for it. Also, since I'm not certain how it supposed to all go together, there is an error generated by the style when running the register script. Also, I don't believe you can send the header that far into the style.php script, since you have sent out html previous to that, but I could be wrong on that one.
    Last edited by Fou-Lu; 10-14-2004 at 04:22 AM.

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Location
    California
    Posts
    511
    Thanks
    1
    Thanked 1 Time in 1 Post
    Ya now that I change to that it gives me the error that im trying to hack it again and the session_pagestart() error is back too... hmm, what ive got in the files is exactly what i got from the site, about the style being an error because i didnt define a start for php, The site as you notice is made of 3 pieces which are called together using the php include function which basiclly makes 3 pages work as if they are one, that is why I didnt end the php code the first time nor did I define the start in the style because they are part of one script...you know what i mean lol, 'supposedly' your html code or what the site was considering content is supposed to somewhere in the middle of the script so I included the first half in the left.php and the last half in style.php.
    When traveling down the road of life, Try not to drag your face in the gravel.

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    The hacking attempt error is generated probably from your phpBB configurations. Not that they are wrong, but they probably need a class defined for it. I'll check mine here....

    Seems fine for me. All I needed to change to get it to work was my directory for $phpbb_root_path to a relative path. So, if your phpbb is located at http://yoursite.com/phpbb, change the path to ./phpbb and it should work. Also, I would recommend that you change your php start tag from <? to <?php instead. You never know when your host will change their configuration.
    Last edited by Fou-Lu; 10-14-2004 at 06:14 PM.

  • #5
    Regular Coder
    Join Date
    Aug 2004
    Location
    The US of A
    Posts
    767
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Did you add:

    PHP Code:
    define('IN_PHPBB'true); 
    In your script?

  • #6
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Yeah, its in there. I received the same error as well, which was kind of odd. Guess it just kinda requires the relative path, though it could be my environment set up I suppose. Thats the first thing that I thought as well...

  • #7
    Regular Coder
    Join Date
    Sep 2002
    Location
    California
    Posts
    511
    Thanks
    1
    Thanked 1 Time in 1 Post
    Ive heard that it is suppsed to be within the phpBB directory, I would try it out but I dont have any time now days with school and all.
    When traveling down the road of life, Try not to drag your face in the gravel.

  • #8
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    There is a phpBB auth mod so you can use phpbb sessions and user system on your own pages. Search phpbb.com

  • #9
    Regular Coder
    Join Date
    Sep 2002
    Location
    California
    Posts
    511
    Thanks
    1
    Thanked 1 Time in 1 Post
    ya Ive seen that too, its basicly the same exact thing that ive got here, the problem that occured was the same as the above. It would just be really cool if I could figure out a way to make it work lol since ive already got the registration linked to the phpBB database
    When traveling down the road of life, Try not to drag your face in the gravel.

  • #10
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Have you tried to change the path to relative? I mean, I have phpbb installed in my environment under httpdocs/phpbb and placed your files under httpdocs/bryhelp and it worked fine if I changed the path to ./../phpbb/. It should work for you. Though I suppose that the absolute should as well. Otherwise we will have to think of a different method. If your looking at placing each on a different server, may not be possible since phpsessions are server generated.

  • #11
    Regular Coder
    Join Date
    Aug 2002
    Location
    Oregon, United States of America
    Posts
    882
    Thanks
    1
    Thanked 9 Times in 9 Posts
    Im not sure how to fix this really. However, once you guys have this working, if someone could post that it's all fixed, i would like to use this script, (of course applying the fixes suggested here)

    I've been dreading making one of my own. If i dont get a login script working within a week or so, im going to have some issues.
    If I'm postin here, I NEED YOUR HELP!!

  • #12
    Regular Coder
    Join Date
    Sep 2002
    Location
    California
    Posts
    511
    Thanks
    1
    Thanked 1 Time in 1 Post
    Yes ive set the $phpbb_root_path variable to './phpBB2/ and I get the error that you can see now Here incase you dont feel like sifting through all the posts to find the link, Its showing some content of the site but its severly jacked up and still giving an error

    Warning: Cannot modify header information - headers already sent by (output started at /home/triopypg/public_html/left.php:2) in /home/triopypg/public_html/phpBB2/includes/sessions.php on line 188

    Warning: Cannot modify header information - headers already sent by (output started at /home/triopypg/public_html/left.php:2) in /home/triopypg/public_html/phpBB2/includes/sessions.php on line 189
    In the top of the page and at the ver bottom its showing this error

    } else { message_die(GENERAL_ERROR, "You do not have permission to access this page"); } } else { // not logged in header('Location: ' . append_sid($phpbb_root_path.'login.'.$phpEx.'?redirect='.$PHP_SELF, true)); } include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?>
    which looks like code thats not being parsed but is not locaed in any of the 3 pages that form the single page, its having an error on line 188+189 in the sessions.php which is part of phpBB so I dont think I can post a file from it
    When traveling down the road of life, Try not to drag your face in the gravel.

  • #13
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    The bottom is caused by your style.php which has a break in the php start and end tags. I cannot remember which it is missing off hand (I'm at work ATM), but I believe it was the start tag. Add that, and the bottom will go away. However, take a look into that as well, I don't believe you can send that last header without removing your html on there. If someone knows off hand whether header information is caused by html or if its caused by echo, that would be great!

    As with those header information in your left.php, try changing them, and add a comma false to it to see if it will force. Unfortunatly, I don't know off hand what they are, or where they are located, so it could simply be a duplicate header its attempting to send. If that is the case, add the false.
    IE: header("Content-type: whateverhere", false);

    If that doesn't do the trick, I'll post a new section of code for it after.

  • #14
    Regular Coder
    Join Date
    Sep 2002
    Location
    California
    Posts
    511
    Thanks
    1
    Thanked 1 Time in 1 Post
    I guess I forgot to add the <?php to the start of the php in style.php so that got rid of one error and now its saying unexpected } im guessin its because its starting out with an else statement and the } that comes before else is confusing it but I dont know what to do about that. Also I am unsure about what you mean here
    As with those header information in your left.php, try changing them, and add a comma false to it to see if it will force. Unfortunatly, I don't know off hand what they are, or where they are located, so it could simply be a duplicate header its attempting to send. If that is the case, add the false.
    IE: header("Content-type: whateverhere", false);
    Im kinda a noob to php in some ways and what you asking me to do there I guess is one of them...soz.
    When traveling down the road of life, Try not to drag your face in the gravel.

  • #15
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Yeah, I'm not sure whats sending your header problem there. As with the style.php bottom, I'm not sure why it is you have the bottom section at all. It begins its php code with:
    PHP Code:
    <?php
    }
    else
    {
    But I see no point in the script that it is continuing from anything else. Php unlike html cannot just be broken in wherever nessessary, you do need to have each script individually scripted, and so that they will run alone (unless you are making say... a function or global script which all others require, but they are still complete).
    I'll check your site section, and see what the problem is.
    btw, what is your phpbb board path set as in left.php?
    Last edited by Fou-Lu; 10-16-2004 at 08:26 PM.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •