vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   I need to create a enw php script amd do the following! (https://vborg.vbsupport.ru/showthread.php?t=155061)

Frank H. Shaw 08-17-2007 04:57 PM

The following works fine and since it is a private forum going to it requres a password to get into it. The system ask the user for the private password and takes me to the correct fourm number 30 as it should.

$curdir = getcwd();
chdir('./forums');
require_once('./global.php');

// if (!$vbulletin->userinfo['userid'])
// {
// print_no_permission();
// }

chdir($curdir);

switch ($_POST['blue_lodge'])
{
case "John T. Heard Lodge":
$vbulletin->url = $vbulletin->options['bburl'] . '/forumdisplay.php?f=30';
eval(print_standard_redirect('redirecting to forum', false, true));
// echo "We have found it ";
break;

default:
echo "Invalid page";
break;

}

?>


But If I uncomment these lines

if (!$vbulletin->userinfo['userid'])
{
print_no_permission();
}

The login screen comes up fine but if i use my vaild user name and password it does not take me to the forum but a get a 404 error page.

If I decide to click on the register link i have the same trouble 404 error page !

Please explain how to get around this problem.

THANKS

Frank H. Shaw

I think my problem has something to do with the fact that i am runnung IIS so i have come to the realization that the chdir('./forums'); will not work on the IIS server - Please explian to me what is the problem and how to get around it.

Frank H. Shaw 08-23-2007 01:24 AM

The problem here seems to be a result of the chdir working diffently on a IIS server which runs windows 2000 and not lynex - so i have made a new thread addrees this directly thanks !

if (!$vbulletin->userinfo['userid'])
{
print_no_permission();
}

seem to have problems inside there source and might have to do with the fact that i am running on a non lynex server - which i am in fact running windows 2000 server from microsoft and running IIS - i have tested the chdir function it works diffentely on the IIS server - i have verifyed the fact by putting ecos in after using the function.


All times are GMT. The time now is 04:57 AM.

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.01566 seconds
  • Memory Usage 1,709KB
  • 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)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete