vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Help with log-in from non-VB page hack (https://vborg.vbsupport.ru/showthread.php?t=32930)

Viper220 12-04-2001 10:48 AM

Hi, my question is in regard to RobAC's hack that allows me to place a login box on a non-VB page.

In order to use a hack that allows me to place a log-in form box on a non-VB page, I need to use the REQUIRE function to call to global.php. Presumably that checks to see if the VB cookie is in place. If the cookie is found, then it displays the "hello [username.] If it's not, then it displays the log-in fields.
My proble mis this: no matter if the user is logged in it still shows the login field, meaning it isn't checking to see if the cookie works.

There are two things associated with this that may be causing it. (1) the REQUIRE statement inside the hack that calls to global.php. Should I be using absolute server path to call to this? I'm not sure, I tried to still doesn't work or I get an error.

(2) The INCLUDE statement in my non-VB page that calls to the hack. Can someone give me a sample what it should be? I've tried absolute server path and the regular URL path and if it does call to it correctly, it still doesn't check for the cookie.

I'm just not sure what the problem is and why it won't check to see if the cookie is there. Can anyone give me some solutions? Thanks in advance.

Best,
Brian

amykhar 12-04-2001 11:17 AM

I am assuming it's the same domain?

Don't use urls, use paths. If you use http://www.yourserver.com/global.php or http://www.yourserver.com/loginfile.php it will NOT work.

It must be server paths like /home/login/www/forum/global.php

Amy

Viper220 12-04-2001 11:26 AM

[QUOTE]Originally posted by amykhar
I am assuming it's the same domain?

Don't use urls, use paths. If you use http://www.yourserver.com/global.php or http://www.yourserver.com/loginfile.php it will NOT work.

It must be server paths like /home/login/www/forum/global.php

Amy

amykhar 12-04-2001 11:46 AM

The problem now is the path to the config.php and other files in your global.php is not absolute.

I don't know what others would tell you to do, but I simply changed all the paths for the includes and requires in my global.php file to represent the actual paths.

Amy

Viper220 12-04-2001 12:09 PM

Your solution worked perfectly! Thanks so much for your help.

Best,
Brian

Viper220 12-04-2001 09:22 PM

[QUOTE]Originally posted by amykhar
The problem now is the path to the config.php and other files in your global.php is not absolute.

I don't know what others would tell you to do, but I simply changed all the paths for the includes and requires in my global.php file to represent the actual paths.

Amy

Viper220 12-06-2001 07:27 PM

Anybody? This error is driving me crazy.

Thanks,
Brian

amykhar 12-06-2001 07:47 PM

make sure there are no spaces or carriage returns after the closing ?> of you external login file and your test.php file. Other than that, I can't think of anything offhand.

Amy

amykhar 12-06-2001 07:50 PM

<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=32753&highlight=Cannot+ add+header+information" target="_blank">https://vborg.vbsupport.ru/showt...er+information</a>

Goldfinger 12-06-2001 10:10 PM

either what amy said or make sure your DOMAIN is cookied not just your board. In the your Admin control panel in the options there is a spot for cookies. make sure it says..

.yourdoman.com

note the postions of the dots. I had this problem with pluh news.

Viper220 12-07-2001 12:53 AM

First off, let me just say I appreciate the help that everyone has given me. If people can bear with me just a tad longer I'd appreciate it.

To update: I have configured the cookies in control panel to go to all of my domain (.slushfactory.com). Unfortunately, this hasn't resolved the problem.

To get back to the basics I am using the original loginfile.php file that RobAC included with his hack. I made two websites, my regular index (indextest.php) that also has a regular header and HTML code in it, and then a 2nd page (test.php) that only contains the INCLUDE file that calls to loginfile.php. I don't get the warning header error on the test.php page, but I still get it on the indextest.php one.

Full URLs:
http://www.slushfactory.com/indextest.php
http://www.slushfactory.com/test.php

Because the test.php works, it's obvious that the problem exists in my indextest.php page. However, I'm not sure where. The include file that calls to loginfile.php is after the header information and is someways down the page. The exact line I use is:
<?php
include("/home/slush/public_html/forum/loginfile.php");
?>

Aside from that, all the rest of the page is written in regular 'ol HTML. Could this be the problem? I assumed all I had to do was throw in the php include statement.

Am I missing something? I'm willing to post whatever code someone needs if they're willing to look at it.

Thanks,
Brian

FWC 12-07-2001 01:01 AM

I just tried both pages and didn't get any errors on either.

Viper220 12-07-2001 01:07 AM

[QUOTE]Originally posted by FWC
I just tried both pages and didn't get any errors on either.

FWC 12-07-2001 02:13 AM

[QUOTE]Originally posted by Viper220


Interesting. Unfortunately the error still exists for most visitors.
-Brian

Goldfinger 12-07-2001 02:24 AM

The problem is .. is that you are including the global.php and the config.php twice and that is causing the headers to go wild.

Viper220 12-07-2001 01:07 PM

[QUOTE]Originally posted by Goldfinger
The problem is .. is that you are including the global.php and the config.php twice and that is causing the headers to go wild.

derfelix 12-07-2001 01:57 PM

isn't there in php 4 a includeonce or requireonce statement.. that would solve the problem...
the heather problem usually comes if you insert a html statement before the include global.php
try to put in on top of the page..

Viper220 12-07-2001 03:23 PM

[QUOTE]Originally posted by derfelix
isn't there in php 4 a includeonce or requireonce statement.. that would solve the problem...
the heather problem usually comes if you insert a html statement before the include global.php
try to put in on top of the page..


All times are GMT. The time now is 04:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01228 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete