Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 02-28-2003, 01:59 PM
Kamui Shirou's Avatar
Kamui Shirou Kamui Shirou is offline
 
Join Date: Sep 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Chdir

HI folks. I do have little problems with this hack.
https://vborg.vbsupport.ru/showthrea...&pagenumber=10

I do not having probs with get it working on my server ( where the forum is placed) but get it working on another server where the site is placed. It has sometihing to do with the various directions.

on the server, where the board is, this code workz perfectly (i have to include the global.php and set the chdir)

PHP Code:
<?php
chdir
("/is/htdocs/28554/www.mangaboard.com/forums/");
require(
'global.php');
?>
But with the same settings placed on the other server the code runs into this error message

Warning: ChDir: No such file or directory (errno 2) in /homepages/45/d72897891/htdocs/vashXT/laststyle2/index2.php on line 2

Fatal error: Failed opening required 'global.php' (include_path='.:/usr/local/lib/php') in /homepages/45/d72897891/htdocs/vashXT/laststyle2/index2.php on line 3

Hope you are able to help. thx
Reply With Quote
  #2  
Old 02-28-2003, 02:03 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The chdir on the other server needs to be
chdir("/homepages/45/d72897891/htdocs/vashXT/laststyle2/forums/");

or something pretty darn similar depending on the subdirectory your forums are in.
Reply With Quote
  #3  
Old 02-28-2003, 02:48 PM
Kamui Shirou's Avatar
Kamui Shirou Kamui Shirou is offline
 
Join Date: Sep 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh you missunderstood me.
the site and the forums are on different servers.
the full path to the forum is
is/htdocs/28554/www.mangaboard.com/forums/
and the path to the site is something like
/homepages/45/d72897891/htdocs/vashXT/laststyle2/

and that causes the problems
Reply With Quote
  #4  
Old 03-01-2003, 07:25 AM
Sebastian's Avatar
Sebastian Sebastian is offline
 
Join Date: Oct 2002
Location: America
Posts: 488
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so you are installing that hack twice on two different servers? The path is not correct, did you double check it?

You don't have to use full path, if your forums is located in the webroot like: /main root/forums/

then you could do:

PHP Code:
chdir("../forums/");
require(
"global.php"); 
you cannot have a .php file in the line of chdir (change directory)..

I see you have index.php in chdir();
Reply With Quote
  #5  
Old 03-01-2003, 12:39 PM
Kamui Shirou's Avatar
Kamui Shirou Kamui Shirou is offline
 
Join Date: Sep 2002
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nope. i only install this hack one time. but on different servers.
ah. just have a look.
i uploaded the page on the server the forum is placed on for testing:
http://www.mangaboard.com/test/animeshock/index2.php

nad here is the tets page on the server where the main page is normally placed:
http://www.shamanking.org/nokx/laststyle2/index2.php
Reply With Quote
  #6  
Old 03-02-2003, 02:16 PM
Darren Lewis Darren Lewis is offline
 
Join Date: Mar 2002
Location: England
Posts: 144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, you can't use chdir if the directories you're changing from and to are on different physical servers. To use the hack on different servers would require a complete rewrite so that it didn't use the vbulletin global.php file.

It would work using the full server path, if you had something like
home/htdocs/www.site1.com
home/htdocs/www.site2.com
as the directories are on the same server.
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 04:07 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04423 seconds
  • Memory Usage 2,208KB
  • Queries Executed 13 (?)
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
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete