Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions

Reply
 
Thread Tools Display Modes
  #11  
Old 06-13-2012, 06:54 AM
ohadpartuck ohadpartuck is offline
 
Join Date: Mar 2012
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, it's not working again...

here is the code

(it's working on the local host but not on the server)

PHP Code:
chdir('../Forum');
require_once(
'global.php');
$arr         $vbulletin->userinfo;
$usergroup     $arr['displaygroupid'];    
if (
$usergroup==""
    
$usergroup $arr['usergroupid'];
//change dir back
chdir('../backtomydir'); 
--------------- Added [DATE]1339582466[/DATE] at [TIME]1339582466[/TIME] ---------------

sorry.. it's not working I didn't check it right.. it's not working on the server
Reply With Quote
  #12  
Old 06-13-2012, 10:34 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm...what happens exactly? Are you getting global.php included successfully but you're not logged in? In the adminCP, in Options > Cookies and HTTP Header Options > Path to Save Cookies, you need to have the path set to '/' (but I believe that's the default). And you custom script is available through the same domain name, right?
Reply With Quote
  #13  
Old 06-13-2012, 11:36 AM
ohadpartuck ohadpartuck is offline
 
Join Date: Mar 2012
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the custom script is under the same domain name meaning
my script is on
www.myDomain.com/mydir
and the forum is on
www.myDomain.com/Forum

but the path to save cookies in set to /Forum/
as I see it.
Is that wrong?
i don't want to change it because there is a warning there that states
"Entering an invalid setting can leave you unable to login to your forum."
Reply With Quote
  #14  
Old 06-13-2012, 11:41 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ohadpartuck View Post
but the path to save cookies in set to /Forum/
as I see it.
Is that wrong?
i don't want to change it because there is a warning there that states
"Entering an invalid setting can leave you unable to login to your forum."
It's not "wrong", but I think it might be the problem. The cookie needs to be sent to for you to be "logged in", and since your script is not in /Forum/, the cookie's not getting sent and you're always going to appear logged out.

Changing it to / should be fine, in fact it should be one of the choices from the dropdown menu. If you have a live forum it might be that users will have to log in again even if they've chosen "Remember Me". If you do end up unable to log in (which I don't think is going to happen), you can upload tools.php (which should be in the "do not upload" folder of the distribution) and use that to reset the path.
Reply With Quote
  #15  
Old 06-13-2012, 12:03 PM
ohadpartuck ohadpartuck is offline
 
Join Date: Mar 2012
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where is the path of "tools.php"?
I searched the whole Forum directory and the closest I've found is "usertools.php"
in the admicp folder.
and I don't see how my path to /Forum/ is saved there.

isn't that saved somewhere in the DB?
Reply With Quote
  #16  
Old 06-13-2012, 12:10 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry I wasn't clear. Forget about tools.php - it's a file that came with your vb package that you *would not* have uploaded, so you won't find it on your server.
Reply With Quote
  #17  
Old 06-13-2012, 01:03 PM
ohadpartuck ohadpartuck is offline
 
Join Date: Mar 2012
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so, I have no option of backing up if I indedd can't log in after this operation?
Reply With Quote
  #18  
Old 06-13-2012, 01:45 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, then you would need to find tools.php, it's just that I'm fairly certain that you won't have that problem.

If you download the distribution zip file for your version of vb (if you don't already have it). When you unzip it, there should be a "do_not_upload" folder, and in that folder there's a file named "tools.php". If you need to you can upload that to the admincp folder on you server, then in your browser go to "www.mysite.com/forum/admincp/tools.php" (using your own domain name and forum path, of course). You then need your customer number, the one you use to log in to the vbulletin.com customer area. After entering that, there's a "Reset Cookie Path" link you can use to reset it.

To make things more complicated, if you're running version vb4.2.0, tools.php doesn't work. Here's thread about that: https://www.vbulletin.com/forum/show...php-on-line-65 . If this applies to you and you want to make the change in the last post, that does appear to fix the issue.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:45 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.04395 seconds
  • Memory Usage 2,231KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete