vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Simple vB User login and access control on non vB pages (https://vborg.vbsupport.ru/showthread.php?t=100992)

Billspaintball 06-10-2006 03:32 AM

Ok, try this.
Right at the top of the page put
PHP Code:

<?php 
$curdir 
getcwd ();
chdir('/path/to/your/forums');    
require_once(
'/path/to/your/forums/global.php'); 
chdir ($curdir);
?>

and put the login box where ever with
PHP Code:

<?php   
// And we put this where we want the login box 
    
require_once('/path/to/your/login_inc.php');   
?>

let us know if this works, If not, I will need the exact error message before I can look any further.

Munnday 06-10-2006 09:42 AM

I receive the following error:
Quote:

Warning: array_keys(): The first argument should be an array in /includes/functions.php on line 3277

Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 3277

Fatal error: Call to a member function on a non-object in /home/.katona/wisemonkeys/www.4wisemonkeys.com/community/includes/functions.php on line 2502

evenmonkeys 06-14-2006 02:25 AM

I am not able to run this and I have gone through the troubleshooting steps that you have provided. I am running my main site on http://website.com and I am running my forum on http://forums.website.com. I've tried using website.com/forums as well, but that is not working either. Other than the steps you have provided, do you have any other recommendations?

The reason I'm still curious is because I had the vBadvanced CMPS working on my website before, and I had it set up the exact same way. However, I am unable to figure out what made what tick. Let me know please.

nonstop 06-14-2006 08:12 AM

Quote:

Originally Posted by Yarub
I am not able to run this and I have gone through the troubleshooting steps that you have provided. I am running my main site on http://website.com and I am running my forum on http://forums.website.com. I've tried using website.com/forums as well, but that is not working either. Other than the steps you have provided, do you have any other recommendations?

The reason I'm still curious is because I had the vBadvanced CMPS working on my website before, and I had it set up the exact same way. However, I am unable to figure out what made what tick. Let me know please.

I would suggest looking at the error log file for the site in question and see if it gives some errors to point were the problem. I had a similar problem as I just recently setup the forums on something like forum.mydomain.com and the site with the loging on www.mydomain.com (these are examples). Since the location of the files for each of these domains are in totally different directory structures the php configuration open_basedir refused to all the include for security reasons (value open_basedir was set to null which means that I can include anything below the directoy of the script calling). Not sure if this may be your problem with the installation with the forums in a separate directory or not. Its all based on physical file location. If this is the problem you might have the option of having your admin set the open_basedir configuration specific to your domain such that you can include the files needed from the forums. Here is the link on php site relating to the open_basedir http://us2.php.net/features.safe-mode. Hope this helps.

s.blair 06-15-2006 04:18 PM

Great looking hack!

I've got the basics of it working on my site.

However I need to control access based on secondary 'additional' user groups rather than the primary usergroup id.

How can I have it check to see if the user is in the array of membergroup id's instead of a single usergroup?

Thanks.
Scott

Majava 06-17-2006 02:11 PM

Hi, i need help please.. i added the login box on the index page, works great. but when i try and access the other pages. i get the following error.

Code:

Warning: main(includes/0.php) [function.main]: failed to open stream: No such file or directory in /usr/home/web/wse90457/index.php on line 180

Warning: main() [function.include]: Failed opening 'includes/0.php' for inclusion (include_path='.:/usr/local/share/pear') in /usr/home/web/wse90457/index.php on line 180

I think its because my index page includes other files from /includes/ for the other pages. so basically everything is run through the index page. If you want to view it go here. www.silkroad-oasis.com.


also, if you go to http://www.silkroad-oasis.com and login on the box, it logs in and works fine, but if you go to http://silkroad-oasis.com and try and login, it logs you in, but still shows the login boxes. how to fix?

Please help. Thanks

Billspaintball 06-19-2006 10:27 AM

Quote:

Originally Posted by Majava
I think its because my index page includes other files from /includes/ for the other pages. so basically everything is run through the index page. If you want to view it go here. www.silkroad-oasis.com.


also, if you go to http://www.silkroad-oasis.com and login on the box, it logs in and works fine, but if you go to http://silkroad-oasis.com and try and login, it logs you in, but still shows the login boxes. how to fix?

Please help. Thanks

Have you tried steps 3 and 4 in the troubleshooting guide yet?

Majava 06-20-2006 04:04 PM

Quote:

Originally Posted by Billspaintball
Have you tried steps 3 and 4 in the troubleshooting guide yet?


ok, Step 3 had already been done. by default? i dont know.

I dont both things in step 4, but still i get the following errors on every other page, but it did sort out the login box problem,

Code:

Warning: main(includes/0.php) [function.main]: failed to open stream: No such file or directory in /usr/home/web/wse90457/index.php on line 180

Warning: main() [function.include]: Failed opening 'includes/0.php' for inclusion (include_path='.:/usr/local/share/pear') in /usr/home/web/wse90457/index.php on line 180

my index file is used as the main page.. when someone clicks a new page on the site the index file finds the included file and uses it. eg. index.php ---> index.php?page=status

Is there anyway to fix this warning?

Billspaintball 06-20-2006 11:07 PM

Quote:

Originally Posted by Majava
ok, Step 3 had already been done. by default? i dont know.

I dont both things in step 4, but still i get the following errors on every other page, but it did sort out the login box problem,

Yes, those steps in the troubleshooting guide will only fix the login box, not your other path problems, its two seperate issues.

Quote:

Is there anyway to fix this warning?
It looks like its a path problem, could well be caused because the path is set to your forums directory for global.php.
Try changing
Code:

<?php 
chdir('/path/to/your/forums');   
require_once('/path/to/your/forums/global.php'); 
?>

to
Code:

<?php 
$curdir = getcwd ();
chdir('/path/to/your/forums');   
require_once('/path/to/your/forums/global.php'); 
chdir ($curdir);
?>


Majava 06-21-2006 08:46 AM

Nope, still same error.

Do i need to put that still in everypage? or just the index page?

and if you need me to, i can post the index page php code.


All times are GMT. The time now is 10:19 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.01412 seconds
  • Memory Usage 1,757KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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